Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A079053
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A079053 Recaman Fibonacci variation: a(1)=1; a(2)=2; for n > 2, a(n) = a(n-1)+a(n-2)-F(n) if that number is positive and not already in the sequence, otherwise a(n) = a(n-1)+a(n-2)+F(n) where F(n) denote the n-th Fibonacci number. +0
7
1, 2, 5, 4, 14, 10, 11, 42, 19, 6, 114, 264, 145, 32, 787, 1806, 996, 218, 5395, 12378, 6827, 1494, 36978, 84840, 46793, 10240, 253451, 581502, 320724, 70186, 1737179, 3985674, 2198275, 481062, 11906802, 27318216, 15067201, 3297248, 81610435 (list; graph; listen)
OFFSET

1,2

COMMENT

Starting with other initial values a(1)=x a(2)=y gives the same kind of recurrence relations.

FORMULA

For n>2, if n==0 or 2 (mod 4) a(n)=2*a(n-1)-a(n-2)-a(n-4); if n==1 or 3 (mod 4) a(n)=a(n-2)+2*a(n-3)+a(n-4) lim n ->infinity a(4n)/a(4n-1)=2.29433696806047607330083539....; lim n ->infinity a(4n-1)/a(4n-2)=24.7510757456062014116731647..; lim n ->infinity a(4n-2)/a(4n-3)=0.218836132868832627648170038...; lim n ->infinity a(4n-3)/a(4n-4)=0.551544105222898180785441647...

EXAMPLE

a(10)=6 because a(9)+a(8)-F(10)=19+42-55=6 and 6 is not already in the sequence. a(11)=42 because a(10)+a(9)-F(11)=6+19-89 < 0 then a(11)=6+19+89=114.

PROGRAM

(PARI) an=vector(100); an[1]=1; an[2]=2; a(n)=if(n<0, 0, an[n]); for(n=3, 100, an[n]=if(abs(sign(a(n-1)+a(n-2)-fibonacci(n))-1)+setsearch(Set(vector(n-1, i, a(i))), a(n-1)+a(n-2)-fibonacci(n)), a(n-1)+a(n-2)+fibonacci(n), a(n-1)+a(n-2)-fibonacci(n)))

CROSSREFS

Cf. A005132.

Sequence in context: A117824 A122212 A102468 this_sequence A002518 A093727 A065160

Adjacent sequences: A079050 A079051 A079052 this_sequence A079054 A079055 A079056

KEYWORD

nice,nonn

AUTHOR

Benoit Cloitre (benoit7848c(AT)orange.fr), Feb 02 2003

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 23 17:09 EST 2009. Contains 167438 sequences.


AT&T Labs Research