login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A091484 Recamán's Fibonacci variation : a(1)=a(2)=1 then a(n) = a(n-1)+a(n-2)-F(n) if that number is >0 and not already in the sequence; a(n) = a(n-1)+a(n-2)+F(n) otherwise where F(n) denotes the n-th Fibonacci number. 0

%I #20 Apr 06 2014 02:50:49

%S 1,1,4,2,11,5,3,29,66,40,17,201,451,275,116,1378,3091,1885,795,9445,

%T 21186,12920,5449,64737,145211,88555,37348,443714,995291,606965,

%U 255987,3041261,6821826,4160200,1754561,20845113,46757491,28514435,12025940

%N Recamán's Fibonacci variation : a(1)=a(2)=1 then a(n) = a(n-1)+a(n-2)-F(n) if that number is >0 and not already in the sequence; a(n) = a(n-1)+a(n-2)+F(n) otherwise where F(n) denotes the n-th Fibonacci number.

%C Unlike Recamán's sequence, this one has "simple" behavior since the sequence of signs of a(n+1)-a(n) becomes 4-periodic sequence -1,-1,1,1,-1,-1,1,1,-1,-1,...

%F With phi=(1+sqrt(5))/2 for n>1 : a(4n)=floor(r*phi^(4n)) where r = (-675+327*sqrt(5))/90; a(4n+1)=floor(s*phi^(4n+1)) where s=(-132+66*sqrt(5))/18; a(4n+2)=floor(s*phi^(4n+2)) where t= (-15+7*sqrt(5))/2; a(4n+3)=floor(u*phi^(4n+3)) where u=(-115+52*sqrt(5))/15.

%F For n>=0, a(4n+5) = 11/3*Luc(4n+2), a(4n+6) = 5*Fib(4n+2).

%F For n>=3, the sequence satisfies the order 8 linear recurrence: a(n+8)-7*a(n+4)+a(n)=0. - _Benoit Cloitre_, Apr 30 2006

%F Empirical g.f.: x*(6*x^7-4*x^6+17*x^5-12*x^4+3*x^3-5*x^2-1) / ((x^2+x-1)*(x^4+3*x^2+1)). - _Colin Barker_, Jun 26 2013

%e a(6)+a(5)=5+11=16 and F(7)=13. Since 16-13=3 is not already in the sequence, a(7)= a(6)+a(5)-F(7)=3.

%o (PARI) m=200; a=vector(m); a[1]=1; a[2]=1; for(n=3, m, a[n]=if(n<0, 0, 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)))); a

%Y Cf. A005132, A079053 (also Fibonacci variation but starting with 1, 2).

%K nonn,easy

%O 1,3

%A _Benoit Cloitre_, Mar 03 2004

%E PARI code corrected by _Colin Barker_, Jun 26 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 10:22 EDT 2024. Contains 371268 sequences. (Running on oeis4.)