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.

A007379 Earliest sequence with a(a(n)) = 4n.

Original entry on oeis.org

0, 2, 4, 5, 8, 12, 7, 24, 16, 10, 36, 13, 20, 44, 15, 56, 32, 18, 68, 21, 48, 76, 23, 88, 28, 26, 100, 29, 96, 108, 31, 120, 64, 34, 132, 37, 40, 140, 39, 152, 144, 42, 164, 45, 52, 172, 47, 184, 80, 50, 196, 53, 176, 204, 55, 216, 60, 58, 228, 61, 224, 236, 63, 248
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Which[ Mod[n, 8] == 0, 4*a[n/4], Mod[n, 8] == 1, n+1, Mod[n, 8] == 2, 4*(n-2)+4, Mod[n, 8] == 3, n+2, Mod[n, 8] == 4, 4*a[(n-4)/4+1], Mod[n, 8] == 5, 4*(n-5) + 12, Mod[n, 8] == 6, n+1, True, 4*(n-7)+24]; a[0] = 0; Table[ a[n], {n, 0, 63}] (* Jean-François Alcover, Sep 24 2012 *)

Formula

a(8n)=4*a(2n), a(8n+1)=8n+2, a(8n+2)=32n+4, a(8n+3)=8n+5, a(8n+4)=4*a(2n+1), a(8n+5)=32n+12, a(8n+6)=8n+7, a(8n+7)=32n+24

Extensions

Formula and more terms from Henry Bottomley, Apr 27 2000