A192512 Number of ludic numbers (A003309) not greater than n.
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
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
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 *)