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.

A192512 Number of ludic numbers (A003309) not greater than n.

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 19
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 05 2011

Keywords

Crossrefs

Cf. A003309.
Cf. A192490 (first differences), A000720 (number of primes).

Programs

  • Haskell
    a192512 n = a192512_list !! (n-1)
    a192512_list = scanl1 (+) $ map a192490 [1..]
  • Mathematica
    a3309[nmax_] := a3309[nmax] = Module[{t = Range[2, nmax], k, r = {1}}, While[Length[t] > 0, k = First[t]; AppendTo[r, k]; t = Drop[t, {1, -1, k}]]; r];
    ludicQ[n_, nmax_] /; 1 <= n <= nmax := MemberQ[a3309[nmax], n];
    nmax = 100;
    b[n_] := Boole[ludicQ[n, nmax]];
    Array[b, nmax] // Accumulate (* Jean-François Alcover, Dec 09 2021, after Ray Chandler in A003309 *)

Formula

a(n) = #{A003309(k): 1<=k<=n} = Sum_{k=1..n} A192490(k).