Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A159978
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A159978 Distance of consecutive Fibonacci terms to nxtprm(n) +0
2
1, 1, 1, 2, 2, 3, 4, 2, 3, 4, 8, 5, 6, 2, 3, 4, 4, 7, 20, 14, 3, 2, 4, 13, 4, 10, 11, 16, 14, 23, 4, 4, 25, 10, 14, 35, 6, 24, 3, 2, 6, 7, 12, 20, 9, 48, 10, 5, 28, 18, 23, 14, 14, 11, 16, 10, 21, 4, 62, 13, 38, 12, 7, 16, 12, 19, 36, 28, 143, 32, 58, 29, 96, 100, 33, 2, 30, 27, 12, 62, 25 (list; graph; listen)
OFFSET

1,4

LINKS

T. D. Noe, Table of n, a(n) for n=1..1000

FORMULA

Fibonacci sequence 1 1 2 3 5 8 13 21 34 . . . . Compute distance to next prime (even if term is already prime).

a(n)=A013632(A000045(n)). [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 29 2009]

EXAMPLE

a(6)=3 because the 6th Fibonacci term is 8 and the distance to nextprm(n) is 3 (11-8=3).

MAPLE

A159978 := proc(n) local f; f := combinat[fibonacci](n) ; nextprime(f)-f ; end: seq(A159978(n), n=1..100) ; [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 29 2009]

PROGRAM

(Other) UBASIC: 10 'FiboB 20 A=1:print A; 30 B=1:print B; 40 C=A+B:print C; :T=T+1:print "<"; nxtprm(C)-C; ">"; 50 D=B+C:print D; :print "<"; nxtprm(D)-D; ">"; 60 A=C:B=D:if T>22 then stop:else 40

CROSSREFS

A159977

Sequence in context: A105689 A117632 A127731 this_sequence A098223 A114892 A143595

Adjacent sequences: A159975 A159976 A159977 this_sequence A159979 A159980 A159981

KEYWORD

easy,nonn

AUTHOR

Enoch Haga (Enokh(AT)comcast.net), Apr 28 2009

EXTENSIONS

Extended by R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 29 2009

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 November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research