login
This site is supported by donations 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; internal format)
OFFSET

1,3

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 (mathar(AT)strw.leidenuniv.nl), Sep 18 2007

CROSSREFS

Cf. A120761.

Sequence in context: A140298 A107365 A026484 * A050160 A099472 A191321

Adjacent sequences:  A120757 A120758 A120759 * A120761 A120762 A120763

KEYWORD

nonn

AUTHOR

Leroy Quet Jul 03 2006

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 18 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 03:33 EST 2012. Contains 205694 sequences.