|
Search: id:A128609
|
|
|
| A128609 |
|
a(1)=a(2)=1. a(n) = a(n-2) + a(n-1) + (number of terms from among {a(1),a(2),...a(n-1)} which are prime). |
|
+0 1
|
|
| 1, 1, 2, 4, 7, 13, 23, 40, 67, 112, 184, 301, 490, 796, 1291, 2093, 3390, 5489, 8885, 14380, 23271, 37657, 60935, 98599, 159541, 258148, 417697, 675853, 1093558, 1769419, 2862985, 4632412, 7495405, 12127825, 19623238, 31751071, 51374317
(list; graph; listen)
|
|
|
OFFSET
|
1,3
|
|
|
EXAMPLE
|
There are 5 prime among the first 9 terms of the sequence. So a(10) = a(8) + a(9) + 5 = 40 + 67 + 5 = 112.
|
|
MAPLE
|
a[1]:=1: a[2]:=1: for n from 3 to 45 do ct:=0: a[n]:=a[n-1]+a[n-2]+ct: for j from 3 to n-1 do if isprime(a[j])=true then a[n]:=a[n]+1 else fi od: od: seq(a[n], n=1..45); - Emeric Deutsch (deutsch(AT)duke.poly.edu), May 25 2007
|
|
CROSSREFS
|
Adjacent sequences: A128606 A128607 A128608 this_sequence A128610 A128611 A128612
Sequence in context: A130709 A073832 A051013 this_sequence A114832 A136299 A003116
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Leroy Quet (qq-quet(AT)mindspring.com), May 08 2007
|
|
EXTENSIONS
|
More terms from Emeric Deutsch (deutsch(AT)duke.poly.edu), May 25 2007
|
|
|
Search completed in 0.002 seconds
|