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.

A292599 a(1) = 0; for n > 1, a(n) = A010051(n) + 2*a(floor(n/2)).

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 3, 4, 4, 6, 7, 4, 5, 6, 6, 8, 9, 8, 9, 12, 12, 14, 15, 8, 8, 10, 10, 12, 13, 12, 13, 16, 16, 18, 18, 16, 17, 18, 18, 24, 25, 24, 25, 28, 28, 30, 31, 16, 16, 16, 16, 20, 21, 20, 20, 24, 24, 26, 27, 24, 25, 26, 26, 32, 32, 32, 33, 36, 36, 36, 37, 32, 33, 34, 34, 36, 36, 36, 37, 48, 48, 50, 51, 48, 48, 50, 50, 56, 57, 56, 56, 60, 60, 62, 62, 32
Offset: 1

Views

Author

Antti Karttunen, Sep 27 2017

Keywords

Comments

1-bits in base-2 expansion of a(n) indicate the positions of primes in the sequence [n, floor(n/2), floor(n/4), ..., 1].

Crossrefs

Cf. also A292596 (variant for odd primes).

Programs

  • Maple
    A292599 := proc(n)
        option remember;
        if n = 1 then
            0 ;
        else
            A010051(n) + 2*procname(floor(n/2)) ;
        end if;
    end proc:
    seq(A292599(n),n=1..100) ; # R. J. Mathar, Sep 28 2017
  • Mathematica
    a[1] = 0; a[n_] := a[n] = Boole[PrimeQ[n]] + 2*a[Floor[n/2]]; Array[a, 96] (* Jean-François Alcover, Sep 29 2017 *)

Formula

a(1) = 0; for n > 1, a(n) = A010051(n) + 2*a(floor(n/2)).
Other identities. For all n >= 1:
A000120(a(n)) = A078349(n).
A007814(1+a(n)) = A292936(n).