cp's OEIS Frontend

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.

A254410 Limit of f(f(f(...f(2)...))) modulo n as the number of iterations of f(x) = 2^x - 1 grows.

Original entry on oeis.org

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

Views

Author

Max Alekseyev, Jan 30 2015

Keywords

Comments

Also, limit of f(f(f(...f(m)...))) modulo n for any integer m >= 2.

Crossrefs

Programs

  • 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 *)
  • 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) }

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.