A085327 Duplicate of A069403.
1, 3, 9, 25, 67, 177, 465, 1219, 3193, 8361, 21891, 57313, 150049, 392835, 1028457
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.
Concatenation([1], List([2..40], n-> 2*Fibonacci(n))); # G. C. Greubel, Jul 10 2019
a128588 n = a128588_list !! (n-1) a128588_list = 1 : cows where cows = 2 : 4 : zipWith (+) cows (tail cows) -- Reinhard Zumkeller, May 14 2015
[1] cat [2*Fibonacci(n): n in [2..40]]; // G. C. Greubel, Jul 10 2019
a:= n-> `if`(n<2, n, 2*(<<0|1>, <1|1>>^n)[1,2]): seq(a(n), n=1..50); # Alois P. Heinz, Apr 28 2018
nn=40; a=(1-x^3)/(1-x); b=x*(1-x^2)/(1-x); CoefficientList[Series[a^2 /(1-b^2), {x,0,nn}], x] (* Geoffrey Critzer, Sep 01 2012 *) LinearRecurrence[{1,1}, {1,2,4}, 40] (* Harvey P. Dale, Mar 29 2017 *) Join[{1}, 2*Fibonacci[Range[2,40]]] (* G. C. Greubel, Jul 10 2019 *)
{a(n) = if( n<2, n==1, 2 * fibonacci(n))}; /* Michael Somos, Jul 18 2015 */
[1]+[2*fibonacci(n) for n in (2..40)] # G. C. Greubel, Jul 10 2019
spec := [S, S=Prod(Sequence(Union(Prod(Sequence(Z),Z),Z)),Union(Z,Z))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
LinearRecurrence[{3, -1}, {0, 2, 4}, 30] (* or *) Nest[Append[#, 3 #[[-1]] - #[[-2]]] &, {0, 2, 4}, 27] (* or *) CoefficientList[Series[-2 x (-1 + x)/(1 - 3 x + x^2), {x, 0, 29}], x] (* Michael De Vlieger, Jul 18 2018 *)
concat(0, Vec(2*x*(1-x)/(1-3*x+x^2) + O(x^50))) \\ Colin Barker, Mar 30 2016
a(n) = fibonacci(max(0,2*n-1))<<1; \\ Kevin Ryde, Mar 25 2021
The first six polynomials and reductions: 1 -> 1 x -> x x + x^3 -> 1 + 3*x x^2 + x^3 + x^5 -> 5 + 8*x x^2 + 2*x^4 + x^5 + x^7 -> 16 + 25*x x^3 + 2*x^4 + 3*x^6 + x^7 + x^9 -> 49 + 79*x, so that A192904 = (1,0,1,5,16,49,...) and A192905 = (0,1,3,8,25,79,...)
a:=[1,0,1,5];; for n in [5..40] do a[n]:=3*a[n-1]+a[n-3]+a[n-4]; od; a; # G. C. Greubel, Jan 10 2019
m:=40; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (1-x)*(1-2*x-x^2)/(1-3*x-x^3-x^4) )); // G. C. Greubel, Jan 10 2019
(* To obtain general results, delete the next line. *) u = 1; v = 1; a = 1; b = 1; c = 0; d = 1; e = 1; f = 0; q = x^2; s = u*x + v; z = 24; p[0, x_] := a; p[1, x_] := b*x + c; p[n_, x_] := d*(x^2)*p[n - 1, x] + e*x*p[n - 2, x] + f; Table[Expand[p[n, x]], {n, 0, 8}] reduce[{p1_, q_, s_, x_}]:= FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1] t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}]; u0 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A192904 *) u1 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192905 *) Simplify[FindLinearRecurrence[u0]] (* recurrence for 0-sequence *) Simplify[FindLinearRecurrence[u1]] (* recurrence for 1-sequence *) LinearRecurrence[{3,0,1,1}, {1,0,1,5}, 40] (* G. C. Greubel, Jan 10 2019 *)
my(x='x+O('x^40)); Vec((1-x)*(1-2*x-x^2)/(1-3*x-x^3-x^4)) \\ G. C. Greubel, Jan 10 2019
((1-x)*(1-2*x-x^2)/(1-3*x-x^3-x^4)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jan 10 2019
Northwest corner: 2....5....7...13...15...18...20...34...36... 1....3....6....8...10...14...16...19...20... 4....9...11...17...22...24...27...29...31... 12..25...30...32...46...59...64...66...72... Examples: 20=13+5+2=F(7)+F(5)+F(3), zero evens, so 20 is in row 0. 19=13+5+1=F(7)+F(5)+F(2), one even, so 19 is in row 1. 22=21+1=F(8)+F(2), two evens, so 22 is in row 2.
f[n_] := Module[{i = Ceiling[Log[GoldenRatio, Sqrt[5]*n]], v = {}, m = n}, While[i > 1, If[Fibonacci[i] <= m, AppendTo[v, 1]; m -= Fibonacci[i], If[v != {}, AppendTo[v, 0]]]; i--]; Total[Reverse[v][[1 ;; -1 ;; 2]]]]; T = GatherBy[SortBy[ Range[10^4], f], f]; Table[Table[T[[n - k + 1, k]], {k, n, 1, -1}], {n, 1, Length[T]}] // Flatten (* Amiram Eldar, Feb 04 2020 *)
Concatenation([1], List([1..30], n -> 1+2*Fibonacci(2*(n-1)))); # G. C. Greubel, Jan 11 2019
[1] cat [1+2*Fibonacci(2*(n-1)): n in [1..30]]; // G. C. Greubel, Jan 11 2019
u = 1; v = 1; a = 1; b = 1; c = 1; d = 1; e = 0; f = 1; q = x^2; s = u*x + v; z = 26; p[0, x_] := a; p[1, x_] := b*x + c p[n_, x_] := d*(x^2)*p[n - 1, x] + e*x*p[n - 2, x] + f; Table[Expand[p[n, x]], {n, 0, 8}] reduce[{p1_, q_, s_, x_}]:= FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1] t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}]; u0 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A192908 *) u1 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A069403 *) Simplify[FindLinearRecurrence[u0]] (* recurrence for 0-sequence *) Simplify[FindLinearRecurrence[u1]] (* recurrence for 1-sequence *) LinearRecurrence[{4,-4,1}, {1,1,3,7}, 30] (* G. C. Greubel, Jan 11 2019 *)
vector(30, n, n--; if(n==0,1,1+2*fibonacci(2*n-2))) \\ G. C. Greubel, Jan 11 2019
[1]+[1+2*fibonacci(2*(n-1)) for n in (1..30)] # G. C. Greubel, Jan 11 2019
G.f. = 1 + 3*x + 9*x^2 + 27*x^3 + 73*x^4 + 195*x^5 + 513*x^6 + ... - _Michael Somos_, Aug 19 2023
A084707:=[1,3,9,27]; [n le 4 select A084707[n] else 3*Self(n-1)-3*Self(n-3)+Self(n-4): n in [1..30]]; // Wesley Ivan Hurt, Aug 15 2016
[(8*Lucas(2*n) -(-1)^n)/5 -2: n in [0..40]]; // G. C. Greubel, Apr 15 2023
a:=proc(n) option remember; if n=0 then 1 elif n=1 then 3 elif n=2 then 9 elif n=3 then 27 else 3*a(n-1)-3*a(n-3)+a(n-4); fi; end: seq(a(n), n=0..40); # Wesley Ivan Hurt, Aug 15 2016
a[n_]:=a[n]=3a[n-1] -3a[n-3] +a[n-4]; a[0]=1; a[1]=3; a[2]=9; a[3]=27; Table[ a[n], {n, 0, 27}] Transpose[NestList[Join[Rest[#],ListCorrelate[{1,-3,0,3},#]]&, {1,3,9,27},30]][[1]] CoefficientList[Series[(1+3 x^3)/(1-3 x+3 x^3-x^4),{x,0,30}],x] (* Harvey P. Dale, Mar 14 2011 *) a[ n_] := Floor[(LucasL[2*n] - 1)*8/5]; (* Michael Somos, Aug 19 2023 *)
{a(n) = my(w=quadgen(5)); (real((1+w)^n*(2+w))-1)*8\5}; /* Michael Somos, Aug 19 2023 */
[(8*lucas_number2(2*n,1,-1) -(-1)^n)/5 -2 for n in range(41)] # G. C. Greubel, Apr 15 2023
First few rows of the triangle: 1; 2, 1; 3, 4, 2; 4, 9, 9, 3; 5, 16, 24, 17, 5; 6, 25, 50, 55, 33, 8; 7, 36, 90, 135, 123, 61, 13; ...
Comments