cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

1, 1, 4, 2, 11, 5, 3, 29, 66, 40, 17, 201, 451, 275, 116, 1378, 3091, 1885, 795, 9445, 21186, 12920, 5449, 64737, 145211, 88555, 37348, 443714, 995291, 606965, 255987, 3041261, 6821826, 4160200, 1754561, 20845113, 46757491, 28514435, 12025940
Offset: 1

Views

Author

Benoit Cloitre, Mar 03 2004

Keywords

Comments

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,...

Examples

			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.
		

Crossrefs

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

Programs

  • 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

Formula

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.
For n>=0, a(4n+5) = 11/3*Luc(4n+2), a(4n+6) = 5*Fib(4n+2).
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
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

Extensions

PARI code corrected by Colin Barker, Jun 26 2013