A077461 Duplicate of A077444.
2, 14, 82, 478, 2786, 16238, 94642, 551614, 3215042, 18738638, 109216786
Offset: 1
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.
G.f. = x + 2*x^2 + 5*x^3 + 12*x^4 + 29*x^5 + 70*x^6 + 169*x^7 + 408*x^8 + 985*x^9 + ... From _Enrique Navarrete_, Dec 15 2023: (Start) From the comment on compositions with Fibonacci number of parts, F(n), there are F(1)=1 type of 1, F(2)=1 type of 2, F(3)=2 types of 3, F(4)=3 types of 4, F(5)=5 types of 5 and F(6)=8 types of 6. The following table gives the number of compositions of n=6 with Fibonacci number of parts: Composition, number of such compositions, number of compositions of this type: 6, 1, 8; 5+1, 2, 10; 4+2, 2, 6; 3+3, 1, 4; 4+1+1, 3, 9; 3+2+1, 6, 12; 2+2+2, 1, 1; 3+1+1+1, 4, 8; 2+2+1+1, 6, 6; 2+1+1+1+1, 5, 5; 1+1+1+1+1+1, 1, 1; for a total of a(6)=70 compositions of n=6. (End).
a := [0,1];; for n in [3..10^3] do a[n] := 2 * a[n-1] + a[n-2]; od; A000129 := a; # Muniru A Asiru, Oct 16 2017
a000129 n = a000129_list !! n a000129_list = 0 : 1 : zipWith (+) a000129_list (map (2 *) $ tail a000129_list) -- Reinhard Zumkeller, Jan 05 2012, Feb 05 2011
[0] cat [n le 2 select n else 2*Self(n-1) + Self(n-2): n in [1..35]]; // Vincenzo Librandi, Aug 08 2015
A000129 := proc(n) option remember; if n <=1 then n; else 2*procname(n-1)+procname(n-2); fi; end; a:= n-> (<<2|1>, <1|0>>^n)[1, 2]: seq(a(n), n=0..40); # Alois P. Heinz, Aug 01 2008 A000129 := n -> `if`(n<2, n, 2^(n-1)*hypergeom([1-n/2, (1-n)/2], [1-n], -1)): seq(simplify(A000129(n)), n=0..31); # Peter Luschny, Dec 17 2015
CoefficientList[Series[x/(1 - 2*x - x^2), {x, 0, 60}], x] (* Stefan Steinerberger, Apr 08 2006 *) Expand[Table[((1 + Sqrt[2])^n - (1 - Sqrt[2])^n)/(2Sqrt[2]), {n, 0, 30}]] (* Artur Jasinski, Dec 10 2006 *) LinearRecurrence[{2, 1}, {0, 1}, 60] (* Harvey P. Dale, Jan 04 2012 *) a[ n_] := With[ {s = Sqrt@2}, ((1 + s)^n - (1 - s)^n) / (2 s)] // Simplify; (* Michael Somos, Jun 01 2013 *) Table[Fibonacci[n, 2], {n, 0, 20}] (* Vladimir Reshetnikov, May 08 2016 *) Fibonacci[Range[0, 20], 2] (* Eric W. Weisstein, Sep 30 2017 *) a[ n_] := ChebyshevU[n - 1, I] / I^(n - 1); (* Michael Somos, Oct 30 2021 *)
a[0]:0$ a[1]:1$ a[n]:=2*a[n-1]+a[n-2]$ A000129(n):=a[n]$ makelist(A000129(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
makelist((%i)^(n-1)*ultraspherical(n-1,1,-%i),n,0,24),expand; /* Emanuele Munarini, Mar 07 2018 */
for (n=0, 4000, a=contfracpnqn(vector(n, i, 1+(i>1)))[2, 1]; if (a > 10^(10^3 - 6), break); write("b000129.txt", n, " ", a)); \\ Harry J. Smith, Jun 12 2009
{a(n) = imag( (1 + quadgen( 8))^n )}; /* Michael Somos, Jun 01 2013 */
{a(n) = if( n<0, -(-1)^n, 1) * contfracpnqn( vector( abs(n), i, 1 + (i>1))) [2, 1]}; /* Michael Somos, Jun 01 2013 */
a(n)=([2, 1; 1, 0]^n)[2,1] \\ Charles R Greathouse IV, Mar 04 2014
{a(n) = polchebyshev(n-1, 2, I) / I^(n-1)}; /* Michael Somos, Oct 30 2021 */
from itertools import islice def A000129_gen(): # generator of terms a, b = 0, 1 yield from [a,b] while True: a, b = b, a+2*b yield b A000129_list = list(islice(A000129_gen(),20)) # Chai Wah Wu, Jan 11 2022
[lucas_number1(n, 2, -1) for n in range(30)] # Zerinvary Lajos, Apr 22 2009
From _Muniru A Asiru_, Mar 19 2018: (Start) For k=1, 2*1^2 - 1 = 2 - 1 = 1 = 1^2. For k=5, 2*5^2 - 1 = 50 - 1 = 49 = 7^2. For k=29, 2*29^2 - 1 = 1682 - 1 = 1681 = 41^2. ... (End) G.f. = x + 5*x^2 + 29*x^3 + 169*x^4 + 985*x^5 + 5741*x^6 + ... - _Michael Somos_, Jun 26 2022
a:=[1,5];; for n in [3..25] do a[n]:=6*a[n-1]-a[n-2]; od; a; # Muniru A Asiru, Mar 19 2018
a001653 n = a001653_list !! n a001653_list = 1 : 5 : zipWith (-) (map (* 6) $ tail a001653_list) a001653_list -- Reinhard Zumkeller, May 07 2013
I:=[1,5]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Feb 22 2014
a[0]:=1: a[1]:=5: for n from 2 to 26 do a[n]:=6*a[n-1]-a[n-2] od: seq(a[n], n=0..20); # Zerinvary Lajos, Jul 26 2006 A001653:=-(-1+5*z)/(z**2-6*z+1); # Conjectured (correctly) by Simon Plouffe in his 1992 dissertation; gives sequence except for one of the leading 1's
LinearRecurrence[{6,-1}, {1,5}, 40] (* Harvey P. Dale, Jul 12 2011 *) a[ n_] := -(-1)^n ChebyshevU[2 n - 2, I]; (* Michael Somos, Jul 22 2018 *) Numerator[{1} ~Join~ Table[FromContinuedFraction[Flatten[Table[{1, 4}, n]]], {n, 1, 40}]]; (* Greg Dresden, Sep 10 2019 *)
{a(n) = subst(poltchebi(n-1) + poltchebi(n), x, 3)/4}; /* Michael Somos, Nov 02 2002 */
a(n)=([5,2;2,1]^(n-1))[1,1] \\ Lambert Klasen (lambert.klasen(AT)gmx.de), corrected by Eric Chen, Jun 14 2018
{a(n) = -(-1)^n * polchebyshev(2*n-2, 2, I)}; /* Michael Somos, Jun 26 2022 */
a002203 n = a002203_list !! n a002203_list = 2 : 2 : zipWith (+) (map (* 2) $ tail a002203_list) a002203_list -- Reinhard Zumkeller, Oct 03 2011
I:=[2,2]; [n le 2 select I[n] else 2*Self(n-1)+Self(n-2): n in [1..35]]; // Vincenzo Librandi, Aug 15 2015
A002203 := proc(n) option remember; if n <= 1 then 2; else 2*procname(n-1)+procname(n-2) ; end if; end proc: # R. J. Mathar, May 11 2013 # second Maple program: a:= n-> (<<0|1>, <1|2>>^n. <<2, 2>>)[1, 1]: seq(a(n), n=0..30); # Alois P. Heinz, Jan 26 2018 a := n -> 2*I^n*ChebyshevT(n, -I): seq(simplify(a(n)), n = 0..30); # Peter Luschny, Dec 03 2023
Table[LucasL[n, 2], {n, 0, 30}] (* Zerinvary Lajos, Jul 09 2009 *) LinearRecurrence[{2, 1}, {2, 2}, 50] (* Vincenzo Librandi, Aug 15 2015 *) Table[(1 - Sqrt[2])^n + (1 + Sqrt[2])^n, {n, 0, 20}] // Expand (* Eric W. Weisstein, Oct 03 2017 *) LucasL[Range[0, 20], 2] (* Eric W. Weisstein, Oct 03 2017 *) CoefficientList[Series[(2 (1 - x))/(1 - 2 x - x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Oct 03 2017 *)
first(m)=my(v=vector(m));v[1]=2;v[2]=2;for(i=3,m,v[i]=2*v[i-1]+v[i-2]);v; \\ Anders Hellström, Aug 15 2015
a(n) = my(w=quadgen(8)); (1+w)^n + (1-w)^n; \\ Michel Marcus, Jun 17 2021
[lucas_number2(n,2,-1) for n in range(0, 29)] # Zerinvary Lajos, Apr 30 2009
G.f. = 1 + 7*x + 41*x^2 + 239*x^3 + 1393*x^4 + 8119*x^5 + 17321*x^6 + ... - _Michael Somos_, Jun 26 2022
a002315 n = a002315_list !! n a002315_list = 1 : 7 : zipWith (-) (map (* 6) (tail a002315_list)) a002315_list -- Reinhard Zumkeller, Jan 10 2012
I:=[1,7]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Mar 22 2015
A002315 := proc(n) option remember; if n = 0 then 1 ; elif n = 1 then 7; else 6*procname(n-1)-procname(n-2) ; end if; end proc: # Zerinvary Lajos, Jul 26 2006, modified R. J. Mathar, Apr 30 2017 a:=n->abs(Im(simplify(ChebyshevT(2*n+1,I)))):seq(a(n),n=0..20); # Leonid Bedratyuk, Dec 17 2017 # third Maple program: a:= n-> (<<0|1>, <-1|6>>^n. <<1, 7>>)[1, 1]: seq(a(n), n=0..22); # Alois P. Heinz, Aug 25 2024
a[0] = 1; a[1] = 7; a[n_] := a[n] = 6a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 20}] (* Robert G. Wilson v, Jun 09 2004 *) Transpose[NestList[Flatten[{Rest[#],ListCorrelate[{-1,6},#]}]&, {1,7},20]][[1]] (* Harvey P. Dale, Mar 23 2011 *) Table[ If[n>0, a=b; b=c; c=6b-a, b=-1; c=1], {n, 0, 20}] (* Jean-François Alcover, Oct 19 2012 *) LinearRecurrence[{6, -1}, {1, 7}, 20] (* Bruno Berselli, Apr 03 2018 *) a[ n_] := -I*(-1)^n*ChebyshevT[2*n + 1, I]; (* Michael Somos, Jun 26 2022 *)
{a(n) = subst(poltchebi(abs(n+1)) - poltchebi(abs(n)), x, 3)/2};
{a(n) = if(n<0, -a(-1-n), polsym(x^2-2*x-1, 2*n+1)[2*n+2]/2)};
{a(n) = my(w=3+quadgen(32)); imag((1+w)*w^n)};
for (i=1,10000,if(Mod(sigma(i^2+1,2),2)==1,print1(i,",")))
{a(n) = -I*(-1)^n*polchebyshev(2*n+1, 1, I)}; /* Michael Somos, Jun 26 2022 */
CoefficientList[Series[4 (1 - x)/(1 - 6 x + x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 14 2014 *)
a(n)=if(n<1,0,subst(poltchebi(n)+poltchebi(n-1),x,3))
z = 5000; u = Table[{p, e} = Transpose[FactorInteger[n]]; Times @@ (p^Mod[e, 2]), {n, z}]; Table[u[[n^2 + 4]], {n, 1, Sqrt[z - 4]}] (* Clark Kimberling, Jul 20 2015, based on T. D. Noe's program at A007913 *)
A013946(n)=core(n^2+4) \\ M. F. Hasler, Dec 08 2010
Most@Nest[If[#[[-2]] >= 4 #[[-1]], Append[Most@#, #[[-1]] + #[[-2]]], Insert[#, #[[-1]] + #[[-2]], -2]] &, {1, 1}, 47] (* Ivan Neretin, Apr 27 2017 *)
using Nemo function A301383List(len) R, x = PowerSeriesRing(ZZ, len+2, "x") f = divexact(1+3*x-2*x^2, 1-7*x+7*x^2-x^3) [coeff(f, k) for k in 0:len] end A301383List(23) |> println # Peter Luschny, Mar 21 2018
m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+3*x-2*x^2)/(1-7*x+7*x^2-x^3)));
f:= gfun:-rectoproc({a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3), a(0)=1,a(1)=10,a(2)=61},a(n),remember): map(f, [$0..50]); # Robert Israel, Mar 21 2018
CoefficientList[Series[(1 + 3 x - 2 x^2)/(1 - 7 x + 7 x^2 - x^3), {x, 0, 30}], x]
makelist(coeff(taylor((1+3*x-2*x^2)/(1-7*x+7*x^2-x^3), x, 0, n), x, n), n, 0, 30);
Vec((1+3*x-2*x^2)/(1-7*x+7*x^2-x^3)+O(x^30))
m=30; L.= PowerSeriesRing(ZZ, m); f=(1+3*x-2*x^2)/(1-7*x+7*x^2-x^3); print(f.coefficients())
[Evaluate(DicksonSecond(2*n+1, -1), 2) -(-1)^n: n in [0..30]]; // G. C. Greubel, Aug 21 2022
CoefficientList[ Series[(1+8x-x^2)/((1+x)(1-6x+x^2)), {x,0,30}], x] (* Robert G. Wilson v, Apr 06 2005 *) LinearRecurrence[{5,5,-1}, {1,13,69}, 30] (* Harvey P. Dale, Jun 03 2017 *)
[lucas_number1(2*n+2,2,-1) -(-1)^n for n in (0..30)] # G. C. Greubel, Aug 21 2022
Comments