login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A192512 Number of ludic numbers (A003309) not greater than n. 10

%I #11 Dec 10 2021 07:24:22

%S 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,

%T 11,11,11,11,11,12,12,12,12,13,13,14,14,14,14,15,15,15,15,15,15,16,16,

%U 16,16,16,16,16,16,17,17,17,17,17,17,18,18,18,18,19

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

%H Reinhard Zumkeller, <a href="/A192512/b192512.txt">Table of n, a(n) for n = 1..10000</a>

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

%t 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];

%t ludicQ[n_, nmax_] /; 1 <= n <= nmax := MemberQ[a3309[nmax], n];

%t nmax = 100;

%t b[n_] := Boole[ludicQ[n, nmax]];

%t Array[b, nmax] // Accumulate (* _Jean-François Alcover_, Dec 09 2021, after _Ray Chandler_ in A003309 *)

%o (Haskell)

%o a192512 n = a192512_list !! (n-1)

%o a192512_list = scanl1 (+) $ map a192490 [1..]

%Y Cf. A003309.

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

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Jul 05 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)