|
| |
|
|
A003312
|
|
a(1) = 3; for n>0, a(n+1) = a(n) + floor((a(n)-1)/2).
(Formerly M2308)
|
|
8
| |
|
|
3, 4, 5, 7, 10, 14, 20, 29, 43, 64, 95, 142, 212, 317, 475, 712, 1067, 1600, 2399, 3598, 5396, 8093, 12139, 18208, 27311, 40966, 61448, 92171, 138256, 207383, 311074, 466610, 699914, 1049870, 1574804, 2362205, 3543307, 5314960, 7972439, 11958658, 17937986, 26906978
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,1
|
|
|
COMMENTS
| This sequence originally defined in the 1974 reference by a sieve, as follows. Write down the numbers from 3 to infinity. Take next number, M say, that has not been crossed off. Counting through the numbers that have not yet been crossed off after that M, cross off every third term. Repeat, always crossing off every third term of those that remain. The numbers that are left form the sequence. The recurrence was found by C. L. Mallows.
|
|
|
REFERENCES
| "Sieves", Popular Computing (Calabasas, CA), Vol. 2 (No. 13, Apr 1974), pp. 6-7; sieve #5.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Solution to Problem 170, Popular Computing (Calabasas, CA), Vol. 5 (No. 51, Jun 1977), pp. 17.
|
|
|
LINKS
| T. D. Noe, Table of n, a(n) for n=1..500
Index entries for sequences generated by sieves
|
|
|
EXAMPLE
| The first few sieving stages are as follows:
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
3 4 5 X 7 8 X 10 11 XX 13 14 XX 16 17 XX 19 20 ...
3 4 5 X 7 X X 10 11 XX XX 14 XX 16 XX XX 19 20 ...
3 4 5 X 7 X X 10 XX XX XX 14 XX 16 XX XX XX 20 ...
3 4 5 X 7 X X 10 XX XX XX 14 XX XX XX XX XX 20 ...
|
|
|
MAPLE
| f:=proc(n) option remember; if n=1 then RETURN(3) fi; f(n-1)+floor( (f(n-1)-1)/2 ); end;
|
|
|
MATHEMATICA
| NestList[#+Floor[(#-1)/2]&, 3, 50] (* From Harvey P. Dale, Mar 18 2011 *)
|
|
|
PROG
| (PARI) v=vector(100); v[1]=3; for(n=2, #v, v[n]=floor((3*v[n-1]-1)/2)); v \\ Clark Kimberling (ck6(AT)evansville.edu), Dec 30 2010
(Haskell)
a003312 n = a003312_list !! (n-1)
a003312_list = sieve [3..] where
sieve :: [Integer] -> [Integer]
sieve (x:xs) = x : (sieve $ xOff xs)
xOff :: [Integer] -> [Integer]
xOff (x:x':_:xs) = x : x': (xOff xs)
-- Reinhard Zumkeller, Feb 21 2011
|
|
|
CROSSREFS
| Cf. A003309, A003310, A100464, A100562, A006999, A061418, A070885, A003311.
Sequence in context: A201025 A073957 A162311 * A022440 A088130 A046840
Adjacent sequences: A003309 A003310 A003311 * A003313 A003314 A003315
|
|
|
KEYWORD
| nonn,easy,nice
|
|
|
AUTHOR
| N. J. A. Sloane (njas(AT)research.att.com).
|
|
|
EXTENSIONS
| Entry revised Dec 01 2004
|
| |
|
|