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
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
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,...
LINKS
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
EXAMPLE
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.
PROG
(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
CROSSREFS
Cf. A005132, A079053 (also Fibonacci variation but starting with 1, 2).
Sequence in context: A215500 A188128 A336914 * A163544 A191728 A191434
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Mar 03 2004
EXTENSIONS
PARI code corrected by Colin Barker, Jun 26 2013
STATUS
approved

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 May 7 18:53 EDT 2024. Contains 372313 sequences. (Running on oeis4.)