OFFSET
1,6
COMMENTS
From the randomness of the graph, it seems likely that every number will eventually occur. a(n)=1 for the n in A094358. When do 5 and 23 occur? The number 14 finally appears at n=34913. a(n) can be computed rapidly using two applications of the powermod function.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
EXAMPLE
MATHEMATICA
Table[e=IntegerExponent[n, 2]; d=n/2^e; k=MultiplicativeOrder[2, d]; r=PowerMod[2, n, k]-e; r=Mod[r, k]; 2^e PowerMod[2, r, d], {n, 100}]
Table[PowerMod[2, 2^n, n], {n, 100}] (* Harvey P. Dale, Oct 16 2022 *)
PROG
(PARI) a(n)=my(ph=eulerphi(n)); lift(Mod(2, n)^(ph+lift(Mod(2, ph)^n))) \\ Charles R Greathouse IV, Feb 24 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Jan 28 2009
STATUS
approved