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.

A360096 To get a(n), replace 0's in the binary expansion of n with (-1) and interpret the result in base n.

Original entry on oeis.org

0, 1, 1, 4, 11, 21, 41, 57, 439, 640, 909, 1222, 1859, 2354, 2953, 3616, 61167, 78303, 98837, 123121, 152379, 185641, 224113, 268227, 344999, 405601, 473901, 550423, 637363, 732483, 837929, 954305, 32472031, 37912414, 44058661, 50977186, 58741163, 67420476
Offset: 0

Views

Author

Alois P. Heinz, Jan 25 2023

Keywords

Comments

The empty bit string is used as binary expansion of 0, so a(0) = 0.

Crossrefs

Main diagonal of A360099.

Programs

  • Maple
    b:= proc(n, k) option remember; local m;
          `if`(n=0, 0, k*b(iquo(n, 2, 'm'), k)+2*m-1)
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..44);
    # second Maple program:
    a:= n-> (l-> add((2*l[i]-1)*n^(i-1), i=1..nops(l)))(Bits[Split](n)):
    seq(a(n), n=0..44);

Formula

a(n) = [x^n] g_n(x) where g_k(x) satisfies g_k(x) = k*(x+1)*g_k(x^2) + x/(1+x).
a(n) = A(n,n) where A(n,k) = k*A(floor(n/2),k)+2*(n mod 2)-1 for n>0, A(0,k)=0.
a(n) = A360099(n,n).
a(n) mod 2 = A057427(n) if n is even; a(n) mod 2 = A030300(n) if n is odd.