login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007952 Generated by a sieve: keep first number, drop every 2nd, keep first, drop every 3rd, keep first, drop every 4th, etc. 19

%I

%S 0,1,3,5,9,11,17,21,29,33,41,47,57,59,77,81,101,107,117,131,149,153,

%T 173,191,209,213,239,257,273,281,321,329,359,371,401,417,441,453,497,

%U 509,539,569,611,621,647,671,717,731,779,801,839,869,917,929,989,1001,1053,1067

%N Generated by a sieve: keep first number, drop every 2nd, keep first, drop every 3rd, keep first, drop every 4th, etc.

%C Also called the sieve of Tchoukaillon (or Mancala, or Kalahari).

%C If k+1 occurs at rank i for the first time, then i is given by the program: i = 0: for j = k to 1 step -1: i = 1 + i + int ( i / j ): next: - Claude Lenormand (claude.lenormand(AT)free.fr), Jan 15 2001

%C A082447(n+1) = (number of terms <= n); see A141262 for primes. - _Reinhard Zumkeller_, Jun 21 2008

%D D. Betten, Kalahari and the Sequence "Sloane No. 377", Annals Discrete Math., 37, 51-58, 1988.

%D Y. David, On a sequence generated by a sieving process, Riveon Lematematika, 11 (1957), 26-31.

%D M. Le, On the Smarandache n-ary Sieve, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 146-147.

%H L. K. Mitchell, <a href="/A007952/b007952.txt">Table of n, a(n) for n = 0..7549</a>

%H D. M. Broline and _Daniel E. Loeb_, <a href="http://arXiv.org/abs/math.CO/9502225">The combinatorics of Mancala-Type games: Ayo, Tchoukaillon and 1/Pi</a>, J. Undergrad. Math. Applic., vol. 16 (1995), pp. 21-36.

%H P. Erdős and E. Jabotinsky, On a sequence of integers ..., Indagationes Math., 20, 115-128, 1958. <a href="http://www.renyi.hu/~p_erdos/1958-08.pdf">part I</a> <a href="http://www.renyi.hu/~p_erdos/1958-09.pdf">part II</a>

%H N. J. A. Sloane, <a href="http://neilsloane.com/doc/sg.txt">My favorite integer sequences</a>, in Sequences and their Applications (Proceedings of SETA '98).

%H F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/OPNS.pdf">Only Problems, Not Solutions!</a>

%H <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a>

%F Equals A002491(n) - 1. Equals A108696 - 2.

%t f[n_] := Fold[#2*Floor[#1/#2 + 1] &, n, Reverse@ Range[n - 1]]; Array[f, 55] (* From David Wilson *)

%o (PARI) a(n)=if(n<1, 0, t1=n; c=1; while(c<sum(k=1, n, if(k<0, 0, t0=1; u=k; while(t0*floor(u/t0)>0, t0++; u=t0*floor(u/t0)); t0)), t1=floor((2*c+1)/2/c*t1);c++); t1) [_Benoit Cloitre_, Jan 18 2013]

%o (Haskell)

%o a007952 n = a007952_list !! n

%o a007952_list = f 1 [0..] where

%o f k (x:xs) = x : f (k + 1) (g xs) where

%o g ws = us ++ (g vs) where (us, _:vs) = splitAt k ws

%o -- _Reinhard Zumkeller_, Jan 19 2014

%Y Cf. A002491, A007952, A028920, A028931, A028932, A028933, A108696, A140060, A141271, A141272.

%K nonn,easy,nice

%O 0,3

%A _N. J. A. Sloane_, R. Muller

%E Corrected and extended by _David W. Wilson_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 14 05:00 EDT 2021. Contains 342941 sequences. (Running on oeis4.)