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.

User: Aubrey Laskowski

Aubrey Laskowski's wiki page.

Aubrey Laskowski has authored 1 sequences.

A321154 a(n) = s(n)*r - s(2^r + n), where s(n) = A002487(n) starting at n = 0 and r = 1 + floor(log_2(n)).

Original entry on oeis.org

-1, -1, 0, 1, 1, 4, 3, 5, 2, 9, 7, 12, 5, 13, 8, 11, 3, 16, 13, 23, 10, 27, 17, 24, 7, 25, 18, 29, 11, 26, 15, 19, 4, 25, 21, 38, 17, 47, 30, 43, 13, 48, 35, 57, 22, 53, 31, 40, 9, 41, 32, 55, 23, 60, 37, 51, 14, 47, 33, 52, 19, 43, 24, 29, 5, 36, 31, 57, 26, 73, 47
Offset: 0

Author

Aubrey Laskowski, Oct 28 2018

Keywords

Comments

The same sequence arises for any integer value r > 1 + floor(log_2(n)).
The maximum value of a(n) between n=2^k and n=2^(k+1) is the k-th term of A023619.

Programs

  • Mathematica
    s[0] = 0; s[1] = 1; s[n_?EvenQ] := s[n] = s[n/2]; s[n_?OddQ] := s[n] = s[(n + 1)/2] + s[(n - 1)/2];
    a[0]=-1; a[1]=-1; a[n_?EvenQ] := a[n] = a[n/2]+s[n/2]; a[n_?OddQ] := a[n] = s[(n + 1)/2] + s[(n - 1)/2]+a[(n + 1)/2] + a[(n - 1)/2]

Formula

a(0)=-1; a(1)=-1;
a(2n) = a(n) + s(n);
a(2n+1) = a(n) + a(n+1) + s(2n+1).
a(n) = A156140(n) - A002487(n).