Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A113051
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A113051 a(1) = a(2) = 1; for n>2, a(n+1) = a(n) + a(n-1) iff a(n) is prime, else a(n+1) = a(n) + 1. +0
4
1, 1, 2, 3, 5, 8, 9, 10, 11, 21, 22, 23, 45, 46, 47, 93, 94, 95, 96, 97, 193, 290, 291, 292, 293, 585, 586, 587, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 4741, 4742, 4743, 4744, 4745 (list; graph; listen)
OFFSET

1,3

COMMENT

A sequence which is locally Fibonacci at prime values.

a(n) is prime for n = 3, 4, 5, 9, 12, 15, 21, 25, 28, 37, 48, 59, ... a(n) is a nontrivial perfect power for a(6) = 8, a(7) = 9, ... a(n) is Fibonacci for a(1) = a(2) = 1, a(3) = 2, a(4) = 3, a(5) = 5, a(6) = 8, a(10) = 21 = F(8), ...

EXAMPLE

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

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

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

a(6) = 8 because a(6-1) = 5 is prime, hence a(6) = a(5) + a(4) = 5 + 3 = 8.

a(7) = 9 because a(7-1) = 8 is not prime, hence a(7) = a(6) + 1 = 8 + 1 = 9.

a(8) = 10 because a(8-1) = 9 is not prime, hence a(8) = a(7) + 1 = 9 + 1 = 10.

MATHEMATICA

a[1] = a[2] = 1; a[n_] := a[n] = If[ PrimeQ[ a[n - 1]], a[n - 1] + a[n - 2], a[n - 1] + 1]; Table[ a[n], {n, 53}] (from Robert G. Wilson v (rgwv(at)rgwv.com), Oct 14 2005)

CROSSREFS

Cf. A000040, A000045, A113050.

Sequence in context: A026260 A002153 A047607 this_sequence A047372 A096974 A027756

Adjacent sequences: A113048 A113049 A113050 this_sequence A113052 A113053 A113054

KEYWORD

easy,nonn

AUTHOR

Jonathan Vos Post (jvospost2(AT)yahoo.com), Oct 12 2005

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified August 29 17:54 EDT 2008. Contains 143238 sequences.


AT&T Labs Research