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!)
A120760 a(1) = a(2) = 1. a(n) = a(n-1) + (largest nonprime {1 or composite} among the first n-2 terms of the sequence). 2
1, 1, 2, 3, 4, 5, 9, 13, 22, 31, 53, 75, 97, 172, 247, 419, 666, 913, 1579, 2492, 3405, 5897, 9302, 12707, 22009, 34716, 56725, 91441, 148166, 239607, 387773, 627380, 1015153, 1642533, 2657686, 4300219, 6957905, 11258124, 18216029, 29474153 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
Among the first 8 terms of the sequence, 9 is the largest nonprime. So a(10) = a(9) + 9 = 22 + 9 = 31.
MAPLE
isA018252 := proc(n) if n = 1 or not isprime(n) then true ; else false ; fi ; end: A120760 := proc(nmin) local a, lnpr, k; a := [1, 1, 2] ; while nops(a) < nmin do lnpr :=0 ; for k in [op(1..nops(a)-1, a)] do if isA018252(k) then lnpr := max(lnpr, k) ; fi ; od: a := [op(a), a[ -1]+lnpr] ; od: RETURN(a) ; end: A120760(80) ; # R. J. Mathar, Sep 18 2007
CROSSREFS
Cf. A120761.
Sequence in context: A253181 A107365 A026484 * A245449 A337647 A346600
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 03 2006
EXTENSIONS
More terms from R. J. Mathar, Sep 18 2007
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 11:31 EDT 2024. Contains 371792 sequences. (Running on oeis4.)