OFFSET
0,5
LINKS
FORMULA
EXAMPLE
a(4) = 1 because n=3 is a prime;
a(5) = 2 because n=4 is a semiprime;
a(9) = 0 because n=8 is not prime neither semiprime.
MATHEMATICA
psp[n_]:=Which[PrimeQ[n], 1, PrimeOmega[n]==2, 2, True, 0]; Join[{0}, Array[ psp, 110]] (* Harvey P. Dale, Sep 18 2011 *)
PROG
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, May 04 2005
STATUS
approved