|
Search: id:A120760
|
|
|
| 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). |
|
+0 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; listen)
|
|
|
OFFSET
|
1,3
|
|
|
LINKS
|
Leroy Quet, Home Page (listed in lieu of email address)
|
|
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 this_sequence A050160 A099472 A060732
Adjacent sequences: A120757 A120758 A120759 this_sequence 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
|
|
|
Search completed in 0.002 seconds
|