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.

Showing 1-3 of 3 results.

A292598 a(n) is the number of odd primes in the sequence [n, floor(n/2), floor(n/4), ..., 1].

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 2, 0, 0, 1, 2, 1, 2, 2, 2, 0, 1, 0, 1, 1, 1, 2, 3, 1, 1, 2, 2, 2, 3, 2, 3, 0, 0, 1, 1, 0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 3, 4, 1, 1, 1, 1, 2, 3, 2, 2, 2, 2, 3, 4, 2, 3, 3, 3, 0, 0, 0, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 2, 2, 3, 2, 2, 3, 3, 4, 4, 1, 2, 1, 1, 1, 2, 1, 2, 2, 2
Offset: 1

Views

Author

Antti Karttunen, Sep 27 2017

Keywords

Crossrefs

Formula

a(1) = a(2) = 0; for n > 2, a(n) = A010051(n) + a(floor(n/2)).
a(n) = A000120(A292596(n)).
For all n >= 1, a(n) <= A078349(n).

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).

A292597 a(1) = 1; for n > 1, a(n) = c(n) + 2*a(floor(n/2)), where c(n) is the characteristic function of odd composites, A071904.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 4, 8, 9, 8, 8, 8, 8, 8, 9, 16, 16, 18, 18, 16, 17, 16, 16, 16, 17, 16, 17, 16, 16, 18, 18, 32, 33, 32, 33, 36, 36, 36, 37, 32, 32, 34, 34, 32, 33, 32, 32, 32, 33, 34, 35, 32, 32, 34, 35, 32, 33, 32, 32, 36, 36, 36, 37, 64, 65, 66, 66, 64, 65, 66, 66, 72, 72, 72, 73, 72, 73, 74, 74, 64, 65, 64, 64, 68, 69, 68, 69, 64, 64, 66, 67
Offset: 1

Views

Author

Antti Karttunen, Sep 27 2017

Keywords

Comments

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

Crossrefs

Formula

a(1) = 1; for n > 1, a(n) = (A000035(n)*(1-A010051(n))) + 2*a(floor(n/2)).
For all n >= 1, a(n) + A292596(n) = n.
Showing 1-3 of 3 results.