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.

A340667 a(n) is derived from n by replacing each 0 in its binary representation with a string of n 0's.

Original entry on oeis.org

0, 1, 4, 3, 256, 65, 192, 7, 16777216, 524289, 2098176, 8195, 50331648, 49153, 114688, 15, 18446744073709551616, 4503599627370497, 36028797019226112, 1099511627779, 2305844108725321728, 17592190238721, 70368756760576, 67108871, 14167099448608935641088
Offset: 0

Views

Author

Alois P. Heinz, Jan 15 2021

Keywords

Crossrefs

Main diagonal of A340666.

Programs

  • Maple
    a:= n-> Bits[Join](subs(0=[0$n][], Bits[Split](n))):
    seq(a(n), n=0..25);
    # second Maple program:
    b:= proc(n, k) option remember; `if`(n<2, n,
         `if`(irem(n, 2, 'r')=1, b(r, k)*2+1, b(r, k)*2^k))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..25);
  • Python
    def A340667(n):
        return 0 if n == 0 else int(bin(n)[2:].replace('0','0'*n),2) # Chai Wah Wu, Jan 29 2021

Formula

a(n) = n <=> n in { A000225 }.
a(n) = n^n <=> n in { A000079 }.
A000120(a(n)) = A000120(n).
A023416(a(n)) = n * A023416(n) for n >= 1.