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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A113058 a(1) = a(2) = a(3) = 1; for n>2, a(n+1) = a(n) + a(n-1) + a(n-2) iff a(n) is prime, else a(n+1) = a(n) + 1. 1
1, 1, 1, 2, 4, 5, 11, 20, 21, 22, 23, 66, 67, 156, 157, 380, 381, 382, 383, 1146, 1147, 1148, 1149, 1150, 1151, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 10368, 10369, 31104, 31105, 31106, 31107, 31108, 31109, 31110, 31111, 31112, 31113 (list; graph; refs; listen; history; internal format)
OFFSET

1,4

COMMENTS

A sequence which is locally tribonacci at prime values. a(n) is prime for a(4) = 2, a(6) = 5, a(7) = 11, a(11) = 23, a(13) = 67, a(15) = 157, a(19) = 383, a(25) = 1151, a(33) = 3457, a(35) = 10369, a(53) = 31121, ... a(n) is a Fibonacci number for n = 1, 2, 3, 4, 6, 9, ...

EXAMPLE

a(4) = 2 because a(4-1) = 1 is not prime, so a(4) = a(3) + 1 = 2.

a(5) = 4 because a(5-1) = 2 is prime, so a(5) = a(4) + a(3) + a(2) = 2 + 1 + 1 = 4.

a(6) = 5 because a(6-1) = 4 is not prime, so a(6) = a(5) + 1 = 4 + 1 = 5.

a(7) = 11 because a(7-1) = 5 is prime, so a(7) = a(6) + a(5) + a(4) = 5 + 4 + 2 = 11.

a(8) = 20 because a(8-1) = 11 is prime, so a(8) = a(7) + a(6) + a(5) = 11 + 5 + 4 = 20.

21.

CROSSREFS

Cf. A000040, A000073, A000213, A001590, A113050, A113051, A113057.

Sequence in context: A192581 A095023 A049913 * A066145 A095022 A101961

Adjacent sequences:  A113055 A113056 A113057 * A113059 A113060 A113061

KEYWORD

easy,nonn

AUTHOR

Jonathan Vos Post (jvospost3(AT)gmail.com), Oct 13 2005

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 00:09 EST 2012. Contains 205978 sequences.