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.

A213013 (2^3^4^5^...^n) mod n.

Original entry on oeis.org

0, 2, 0, 2, 2, 1, 0, 8, 2, 2, 8, 5, 8, 2, 0, 2, 8, 18, 12, 8, 2, 16, 8, 2, 18, 26, 8, 11, 2, 2, 0, 2, 2, 22, 8, 31, 18, 5, 32, 2, 8, 27, 24, 17, 16, 8, 32, 43, 2, 2, 44, 45, 26, 2, 8, 56, 40, 47, 32, 33, 2, 8, 0, 57, 2, 5, 36, 62, 22, 60, 8, 1, 68, 2, 56, 57, 44, 8, 32, 80, 2, 2, 8, 2
Offset: 2

Views

Author

Max Alekseyev, Jun 02 2012

Keywords

Comments

a(n) = 0 iff n is a power of 2.

Crossrefs

A variant of A092188.

Programs

  • PARI
    { a(n,m=n,s=2) = local(g); if(s==n, return(n%m)); g=factor(gcd(s,m)); for(i=1,matsize(g)[1], g[i,2]=valuation(m,g[i,1]); m\=g[i,1]^g[i,2]); g=prod(i=1,matsize(g)[1],g[i,1]^g[i,2]); lift( chinese( Mod(0,g), Mod(s,m)^a(n,eulerphi(m),s+1) )) }