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”).

A254410
Limit of f(f(f(...f(2))...) modulo n as the number of iterations of f(x) = 2^x - 1 grows.
3
0, 1, 1, 3, 2, 1, 1, 7, 1, 7, 6, 7, 10, 1, 7, 15, 8, 1, 1, 7, 1, 17, 17, 7, 2, 23, 1, 15, 26, 7, 3, 31, 28, 25, 22, 19, 34, 1, 10, 7, 4, 1, 1, 39, 37, 17, 35, 31, 1, 27, 25, 23, 32, 1, 17, 15, 1, 55, 36, 7, 5, 3, 1, 63, 62, 61, 43, 59, 40, 57, 49, 55, 1, 71, 52, 39, 50, 49, 75, 47, 1, 45, 66, 43, 42, 1, 55, 39, 63, 37, 36, 63, 34, 35, 77, 31, 65, 1, 28, 27
OFFSET
1,4
COMMENTS
Also, limit of f(f(f(...f(m))...) modulo n for any integer m >= 2.
LINKS
FORMULA
a(n) = limit of A007013(m) mod n as m grows.
a(n) = A007013(A227944(n) + k) mod n for any k >= 1. In particular, a(n) = A007013(n) mod n.
MATHEMATICA
Clear[a]; Unprotect[Power]; 0^0 = 1; a[1]=0; a[n_] := a[n] = Module[{g, m = n}, g = 2^IntegerExponent[m, 2]; m = Floor[m/g]; Mod[ ChineseRemainder[ {0, Mod[2, m]^a[EulerPhi[m]]}, {g, m}] - 1, n]]; Array[a, 100] (* Jean-François Alcover, Jan 01 2016, adapted from PARI *)
PROG
(PARI) { A254410(m) = my(g); if(m==1, return(0)); g=2^valuation(m, 2); m\=g; lift( chinese(Mod(0, g), Mod(2, m)^A254410(eulerphi(m)) ) - 1) }
CROSSREFS
Sequence in context: A113185 A132069 A259786 * A073201 A118654 A111760
KEYWORD
nonn,easy,nice,look
AUTHOR
Max Alekseyev, Jan 30 2015
STATUS
approved