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!)
A097557 a(n+1) = a(n) + number of nonprimes so far; a(1) = 1. 1
1, 2, 3, 4, 6, 9, 13, 17, 21, 26, 32, 39, 47, 55, 64, 74, 85, 97, 109, 121, 134, 148, 163, 178, 194, 211, 228, 246, 265, 285, 306, 328, 351, 375, 400, 426, 453, 481, 510, 540, 571, 602, 634, 667, 701, 735, 770, 806, 843, 881, 919, 957, 996, 1036, 1077, 1119 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(2) = a(1) + #{1} = 1 + 1 = 2;
a(3) = a(2) + #{1} = 2 + 1 = 3;
a(4) = a(3) + #{1} = 3 + 1 = 4;
a(5) = a(4) + #{1,4} = 4 + 2 = 6;
a(6) = a(5) + #{1,4,6} = 6 + 3 = 9;
a(7) = a(6) + #{1,4,6,9} = 9 + 4 = 13;
a(8) = a(7) + #{1,4,6,9} = 13 + 4 = 17;
a(9) = a(8) + #{1,4,6,9} = 17 + 4 = 21;
a(10) = a(9) + #{1,4,6,9,21} = 21 + 5 = 26.
PROG
(Haskell)
a097557 n = a097557_list !! (n-1)
a097557_list = 1 : f 1 0 where
f x z = y : f y z' where
y = x + z'; z' = z + 1 - fromIntegral (a010051' x)
-- Reinhard Zumkeller, Aug 16 2013
CROSSREFS
Sequence in context: A189035 A137446 A240028 * A175848 A240079 A240727
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 27 2004
STATUS
approved

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 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)