I'm new on this and the help seems not as helpful on this particular subject The prime numbers between 1 and 100 mathematica show steps


closed as off-topic by Sjoerd C. de Vries, Karsten 7., eldo, rm -rf Nov 8 '15 at 22:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Sjoerd C. de Vries, Karsten 7., eldo, rm -rf
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ – "the help seems not as helpful on this particular subject". On the contrary, simply searching for prime numbers gives you all the information you need. $\endgroup$ – Graumagier Nov 8 '15 at 21:33
  • 3
    $\begingroup$ The first example in the reference for Prime is: Table[Prime[n], {n, 25}] $\endgroup$ – bill s Nov 8 '15 at 21:33
  • $\begingroup$ thank you very much.Does this answer mathematica programs.? $\endgroup$ – Ahmet Nov 8 '15 at 21:36
  • $\begingroup$ Your question seems to ask to find those integers from 1 to 100 that are prime. A direct translation of the question into Mathematica code gives an answer: Select[Range[100], PrimeQ] $\endgroup$ – murray Nov 9 '15 at 14:58

You could use

t=Table[FactorInteger[k],{k,1,100}] (* show the factors *)  
Cases[t,{{_,1}}]  (* select only those with one factor with exponent 1 *)

You need to use PrimePi to find how many primes are less than 100

Array[Prime, PrimePi[100]]
  • 2
    $\begingroup$ He doesn't "need". But certainly he "could" $\endgroup$ – Dr. belisarius Nov 9 '15 at 0:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.