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.

A292384 a(1) = 1; for n > 1, a(n) = 4*a(A252463(n)) + (n mod 4).

Original entry on oeis.org

1, 6, 27, 24, 109, 110, 439, 96, 97, 438, 1759, 440, 7037, 1758, 443, 384, 28149, 390, 112599, 1752, 1753, 7038, 450399, 1760, 389, 28150, 387, 7032, 1801597, 1774, 7206391, 1536, 7033, 112598, 1775, 1560, 28825565, 450398, 28155, 7008, 115302261, 7014, 461209047, 28152, 1761, 1801598, 1844836191, 7040, 1557, 1558, 112603, 112600
Offset: 1

Views

Author

Antti Karttunen, Sep 15 2017

Keywords

Comments

a(n) encodes in its base-4 representation the succession of modulo 4 residues obtained when map x -> A252463(x), starting from x=n, is iterated down to the eventual 1.

Crossrefs

Programs

  • Python
    from sympy.core.cache import cacheit
    from sympy import factorint, prevprime, prod
    def a064989(n):
        f = factorint(n)
        return 1 if n == 1 else prod(prevprime(i)**f[i] for i in f if i != 2)
    def a252463(n): return 1 if n==1 else n//2 if n%2==0 else a064989(n)
    @cacheit
    def a(n): return 1 if n==1 else 4*a(a252463(n)) + n%4
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Sep 21 2017

Formula

a(1) = 1; for n > 1, a(n) = 4*a(A252463(n)) + A010873(n).