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.

A341509 a(n) = 2^j if n is of the form 2^i - 2^j with i > j, and 0 otherwise.

Original entry on oeis.org

0, 1, 2, 1, 4, 0, 2, 1, 8, 0, 0, 0, 4, 0, 2, 1, 16, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 2, 1, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 2, 1, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, Feb 13 2021

Keywords

Crossrefs

Cf. A023758 (after its initial zero, gives the positions nonzero terms).

Programs

  • PARI
    A006519(n) = (1<A340375(n) = if(n<5, 1, n>>=valuation(n, 2); n++; n>>valuation(n, 2)==1); \\ After function "is" given in A023758
    A341509(n) = if(!n,n,A340375(n)*A006519(n));

Formula

a(0) = 0, and for n >= 1, a(n) = A340375(n) * A006519(n).
a(n) = A156552(A014963(A005940(1+n))).