This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A155836 #13 Oct 16 2022 15:07:02 %S A155836 0,0,1,0,1,4,4,0,4,6,3,4,9,2,1,0,1,16,4,16,4,16,3,16,21,16,13,16,16, %T A155836 16,8,0,4,18,11,16,33,16,22,16,37,16,4,20,31,6,21,16,4,16,1,16,42,52, %U A155836 36,16,28,54,20,16,57,16,4,0,61,16,21,52,64,16,12,16,4,16,31,24,4,16,73,16,40 %N A155836 2^(2^n) mod n. %C A155836 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. %H A155836 T. D. Noe, <a href="/A155836/b155836.txt">Table of n, a(n) for n = 1..10000</a> %e A155836 a(1941491)=a(43228711)=a(75548489)=5 and a(100867561)=23. See A155886 for the first occurrence of each number. [From _T. D. Noe_, Jan 31 2009] %t A155836 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}] %t A155836 Table[PowerMod[2,2^n,n],{n,100}] (* _Harvey P. Dale_, Oct 16 2022 *) %o A155836 (PARI) a(n)=my(ph=eulerphi(n));lift(Mod(2,n)^(ph+lift(Mod(2,ph)^n))) \\ _Charles R Greathouse IV_, Feb 24 2012 %Y A155836 A015910 (2^n mod n), A036236. %K A155836 nonn %O A155836 1,6 %A A155836 _T. D. Noe_, Jan 28 2009