login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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, 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; refs; listen; history; internal format)
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

Sequence in context: A130709 A073832 A051013 * A168043 A114832 A136299

Adjacent sequences:  A128606 A128607 A128608 * A128610 A128611 A128612

KEYWORD

nonn

AUTHOR

Leroy Quet May 08 2007

EXTENSIONS

More terms from Emeric Deutsch (deutsch(AT)duke.poly.edu), May 25 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 17 23:08 EST 2012. Contains 206085 sequences.