-1
$\begingroup$

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

$\endgroup$
4
  • 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, 2015 at 21:33
  • 3
    $\begingroup$ The first example in the reference for Prime is: Table[Prime[n], {n, 25}] $\endgroup$
    – bill s
    Nov 8, 2015 at 21:33
  • $\begingroup$ thank you very much.Does this answer mathematica programs.? $\endgroup$
    – Ahmet
    Nov 8, 2015 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, 2015 at 14:58

2 Answers 2

3
$\begingroup$

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 *)
$\endgroup$
0
0
$\begingroup$

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

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

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