A078697 Duplicate of A066629.
1, 2, 5, 8, 15, 24, 41, 66, 109, 176, 287, 464, 753, 1218, 1973, 3192, 5167, 8360, 13529
Offset: 0
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.
a:=[1,1];; for n in [3..40] do a[n]:=a[n-1]+a[n-2]+(-1)^n; od; a; # Muniru A Asiru, Aug 09 2018
[n le 2 select 1 else Self(n-1)+Self(n-2)+(-1)^n: n in [1..50]]; // Vincenzo Librandi, Aug 13 2018
seq(coeff(series(x*(1+x-x^2)/((1+x)*(1-x-x^2)), x,n+1),x,n),n=1..40); # Muniru A Asiru, Aug 09 2018
Table[ Floor[ GoldenRatio^(k-1) ] - Floor[ GoldenRatio^(k-1) / Sqrt[5] ], {k, 1, 100} ] (* Federico Provvedi, Mar 26 2013 *) LinearRecurrence[{0, 2, 1}, {1, 1, 1}, 40] (* Vincenzo Librandi, Aug 13 2018 *)
{ for (n=1, 250, if (n>2, a=a1 + a2 + (-1)^n; a2=a1; a1=a, a=a1=1; a=a2=1); write("b066983.txt", n, " ", a) ) } \\ Harry J. Smith, Apr 15 2010
vector(40, n, 2*fibonacci(n-2) + (-1)^n) \\ G. C. Greubel, Dec 26 2019
from sympy import fibonacci def A066983(n): return (fibonacci(n-2)<<1)+(-1 if n&1 else 1) # Chai Wah Wu, May 05 2025
[2*fibonacci(n-2) + (-1)^n for n in (1..40)] # G. C. Greubel, Dec 26 2019
a154691 n = a154691_list !! n a154691_list = 1 : zipWith (+) a154691_list (drop 2 $ map (* 2) a000045_list) -- Reinhard Zumkeller, Nov 17 2013
A154691:= func< n | 2*Fibonacci(n+3) - 3 >; [A154691(n): n in [0..40]]; // G. C. Greubel, Jan 18 2025
A154691 := proc(n) coeftayl( (1+x+x^2)/(1-x-x^2)/(1-x),x=0,n) ; end proc:
Fibonacci[Range[3,60]]*2 -3 (* Vladimir Joseph Stephan Orlovsky, Mar 19 2010 *) CoefficientList[Series[(1 + x + x^2)/((1 - x - x^2)(1 - x)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 18 2012 *)
Vec((1+x+x^2) / ((1-x-x^2)*(1-x)) + O(x^60)) \\ Colin Barker, Feb 01 2017
def A154691(n): return 2*fibonacci(n+3) - 3 print([A154691(n) for n in range(41)]) # G. C. Greubel, Jan 18 2025
[0^n-(3+(-1)^n)/2+2*Fibonacci(n+1):n in [0..40]]; // Vincenzo Librandi, Sep 12 2016
Join[{1}, LinearRecurrence[{1, 2, -1, -1}, {1, 2, 5, 8}, 25]] (* G. C. Greubel, Sep 11 2016 *) CoefficientList[Series[(1 - x^2 + 2 x^3 + x^4) / ((1 - x^2) (1 - x - x^2)), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 12 2016 *)
First few rows of the triangle = 1; 1, 1; 2, 2, 1; 1, 2, 2, 3; 2, 2, 2, 6, 3; 1, 2, 2, 6, 6, 7; 2, 2, 2, 6, 6, 14, 9; 1, 2, 2, 6, 6, 14, 18, 17; 2, 2, 2, 6, 6, 14, 18, 34, 25; 1, 2, 2, 6, 6, 14, 18, 34, 50, 43; ...
[n: n in [0..2000] | IsPrime(2*Fibonacci(n+2)+((-1)^n-3) div 2)];
with(combinat): A271729:=n->`if`(isprime(2*fibonacci(n+2)+((-1)^n-3)/2), n, NULL): seq(A271729(n), n=1..3*10^3); # Wesley Ivan Hurt, Apr 13 2016
Select[Range[10000], PrimeQ[(2 Fibonacci[# + 2] + ((-1)^# - 3) / 2)] &]
lista(nn) = for(n=1, nn, if(ispseudoprime(2*fibonacci(n+2)+((-1)^n-3)/2), print1(n, ", "))); \\ Altug Alkan, Apr 13 2016
Comments