login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A072209
Number of primitive roots of those integers with at least one primitive root.
2
1, 1, 1, 1, 2, 1, 2, 2, 2, 4, 4, 2, 8, 2, 6, 4, 10, 8, 4, 6, 12, 8, 8, 12, 6, 16, 12, 10, 22, 12, 8, 24, 6, 12, 28, 16, 8, 20, 24, 24, 12, 24, 18, 16, 40, 12, 40, 22, 32, 12, 40, 32, 24, 52, 36, 48, 28, 40, 16, 40, 36, 48, 20, 64, 44, 24, 24, 72, 40, 48, 24, 18, 54
OFFSET
1,5
COMMENTS
Essentially sequence A046144 with all zero entries deleted.
FORMULA
a(n) = phi(phi(A033948(n))).
MATHEMATICA
Reap[ Do[ If[n == 1, Sow[1], If[ IntegerQ[ PrimitiveRoot[n]], Sow[ EulerPhi[ EulerPhi[n]]]]] , {n, 1, 100}]][[2, 1]] (* Jean-François Alcover, Feb 24 2012 *)
Join[{1}, (Length/@PrimitiveRootList[Range[300]])/.(0->Nothing)] (* Harvey P. Dale, Oct 01 2024 *)
PROG
(PARI) is(n)=if(n%2, isprimepower(n) || n==1, n==2 || n==4 || (isprimepower(n/2, &n) && n>2));
lista(nn) = for (n=1, nn, if (is(n), print1(eulerphi(eulerphi(n)), ", "))); \\ Michel Marcus, May 12 2017
CROSSREFS
Sequence in context: A208216 A208217 A009213 * A226559 A060169 A117958
KEYWORD
nice,nonn
AUTHOR
Lekraj Beedassy, Jul 03 2002
STATUS
approved