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.

Showing 1-7 of 7 results.

A072270 A partial product representation of A006131 and A072265.

Original entry on oeis.org

1, 1, 13, 9, 101, 5, 701, 49, 361, 29, 31021, 33, 204101, 181, 1021, 1889, 8799541, 233, 57746701, 1361, 41581, 7589, 2486401661, 1633, 161532401, 49661, 22810681, 58241, 702418373381, 2245, 4608956945501, 3437249, 74991181, 2135149, 2802699901, 75921, 1302034904649701, 14007941, 3219888061, 3019201
Offset: 1

Views

Author

Miklos Kristof, Jul 09 2002

Keywords

Comments

Define f(n) = A006131(n-1) and L(n) = 4*f(n-1)+f(n+1), which implies L(n) = A072265(n), n>1.
For even n, f(n) = product_{d|n} a(d) and for odd n, f(n) = product_{d|n} a(2d).
Taking logarithms defines the sequence a(.) via a Mobius transformation (see A072183).
Writing f(n) and L(n) in terms of Binet formulas leads to a representation as cyclotomic polynomials.

Examples

			f(12)=a(1)*a(2)*a(3)*a(4)*a(6)*a(12) = 1*1*13*9*5*33 = 19305 for even n=12.
f(9)=a(2)*a(6)*a(18)= 1*5*233 = 1165 for odd n=9.
L(6)=a(4)*a(12) = 9*33 = 297 = 4*f(5)+f(7) = 4*29+181 for even n=6.
L(15)=a(1)*a(3)*a(5)*a(15) = 1*13*101*1021 = 1340573 for odd n=15.
		

Crossrefs

Programs

  • Maple
    A072270 := proc(n) if n <=2 then 1; else h := (1+sqrt(17))/2 ; cy := numtheory[cyclotomic](n,x) ; g := degree(cy) ; (h-1)^g*subs(x=h^2/4,cy) ; expand(%) ; end if; end proc: # R. J. Mathar, Nov 17 2010

Formula

Let h=(1+sqrt(17))/2, Phi(n, x) = n-th cyclotomic polynomial, so x^n-1= product_{d|n} Phi(d, x), and let g(d) be the order of Phi(d, x). Then a(n)=(h-1)^g(n)*Phi(n, h^2/4), n>2.
a(p) = L(p) for odd prime p.
a(2p) = f(p) for odd prime p.
a(2^k+1) = L(2^k).
a(3*2^k = L(2^k)-4^k.
L(n) = product_{d|n} a(d) for odd n.
L(n*2^k) = product_{d|n} a(d*2^(k+1)) for k>0 and odd n.

Extensions

Divided argument of Phi by 4; moved comments to formula section - R. J. Mathar, Nov 17 2010

A085488 Duplicate of A072265.

Original entry on oeis.org

2, 1, 9, 13, 49, 101, 297, 701, 1889, 4693, 12249, 31021, 80017, 204101, 524169
Offset: 0

Views

Author

Keywords

A027286 a(n) = Sum_{k=0..2n} (k+1) * A026584(n, k).

Original entry on oeis.org

1, 4, 18, 56, 190, 564, 1722, 4976, 14454, 40940, 115698, 322728, 896558, 2471588, 6786090, 18537184, 50459366, 136844892, 370030434, 997705240, 2683514526, 7201203988, 19284880794, 51546789456, 137541880150, 366412976332
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,4,18,56]; [n le 4 select I[n] else 2*Self(n-1) +7*Self(n-2) -8*Self(n-3) -16*Self(n-4): n in [1..31]]; // G. C. Greubel, Dec 12 2021
    
  • Mathematica
    LinearRecurrence[{2,7,-8,-16},{1,4,18,56}, 30] (* G. C. Greubel, Dec 12 2021 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -16,-8,7,2]^n*[1;4;18;56])[1,1] \\ Charles R Greathouse IV, Oct 21 2022
  • Sage
    [2^(n-1)*(n+1)*(14*lucas_number2(n+2, 1/2, -1) + 5*lucas_number2(n+1, 1/2, -1))/17 for n in (0..30)] # G. C. Greubel, Dec 12 2021
    

Formula

G.f.: (1+2*x+3*x^2)/(1-x-4*x^2)^2.
From G. C. Greubel, Dec 12 2021: (Start)
a(n) = 2^(n-3)*( -6*F(n+1, 1/2) + Sum_{j=0..n} F(n-j+1, 1/2)*( 14*F(j+1, 1/2) + 5*F(j, 1/2) ), where F(n, x) are the Fibonacci polynomials.
a(n) = (2^(n-1)/17)*(n+1)*( 14*L(n+2, 1/2) + 5*L(n+1, 1/2) ), where L(n, x) are the Lucas polynomials.
a(n) = 2*a(n-1) + 7*a(n-2) - 8*a(n-3) - 16*a(n-4). (End)

A206776 a(n) = 3*a(n-1) + 2*a(n-2) for n>1, a(0)=2, a(1)=3.

Original entry on oeis.org

2, 3, 13, 45, 161, 573, 2041, 7269, 25889, 92205, 328393, 1169589, 4165553, 14835837, 52838617, 188187525, 670239809, 2387094477, 8501763049, 30279478101, 107841960401, 384084837405, 1367938433017, 4871984973861, 17351831787617, 61799465310573
Offset: 0

Views

Author

Bruno Berselli, Jan 10 2013

Keywords

Comments

This is the Lucas sequence V(3,-2).
Inverse binomial transform of this sequence is A072265.
a(n) = A124805(n) - 1 for n>0.

Examples

			G.f. = 2 + 3*x + 13*x^2 + 45*x^3 + 161*x^4 + 573*x^5 + 2041*x^6 + 7269*x^7 + ...
		

References

  • Ronald L. Graham, Donald E. Knuth, Oren Patashnik, Concrete Mathematics, 2nd ed., Addison-Wesley, 1994. Exercise 7.49(c), pages 379, 573.

Crossrefs

Cf. A189736 (same recurrence but with initial values reversed).

Programs

  • Magma
    [n le 1 select n+2 else 3*Self(n)+2*Self(n-1): n in [0..25]];
    
  • Maple
    A206776 := proc(n)
        option remember ;
        if n <= 1 then
            n+2 ;
        else
            3*procname(n-1)+2*procname(n-2) ;
        end if;
    end proc:
    seq(A206776(n),n=0..30) ; # R. J. Mathar, Feb 18 2024
  • Mathematica
    RecurrenceTable[{a[n] == 3 a[n - 1] + 2 a[n - 2], a[0] == 2, a[1] == 3}, a[n], {n, 25}]
    LinearRecurrence[{3,2},{2,3},30] (* Harvey P. Dale, Apr 29 2014 *)
    a[ n_] := If[ n < 0, (-2)^n a[ -n], ((3 + Sqrt[17])/2)^n + ((3 - Sqrt[17])/2)^n // Expand]; (* Michael Somos, Oct 13 2016 *)
    a[ n_] := If[ n < 0, (-2)^n a[ -n], Boole[n == 0] + SeriesCoefficient[ ((1 + 3*x + Sqrt[1 + 6*x + 17*x^2])/2)^n, {x, 0, n}]]; (* Michael Somos, Oct 13 2016 *)
  • Maxima
    a[0]:2$ a[1]:3$ a[n]:=3*a[n-1]+2*a[n-2]$ makelist(a[n], n, 0, 25);
    
  • PARI
    Vec((2-3*x)/(1-3*x-2*x^2) + O(x^30)) \\ Michel Marcus, Jun 26 2015
    
  • PARI
    {a(n) = 2 * real(( (3 + quadgen(68)) / 2 )^n)}; /* Michael Somos, Oct 13 2016 */
    
  • PARI
    {a(n) = my(w = quadgen(-8)); simplify(w^n * subst(2 * polchebyshev(n), x, -3/4*w))}; /* Michael Somos, Oct 13 2016 */
    
  • PARI
    for(n=0,25,print1(round(((3+sqrt(17))/2)^n+((3-sqrt(17))/2)^n),", ")) \\ Hugo Pfoertner, Nov 19 2018

Formula

G.f.: (2-3*x)/(1-3*x-2*x^2).
a(n) = ((3-sqrt(17))^n+(3+sqrt(17))^n)/2^n.
a(n) = [x^n] ( (1 + 3*x + sqrt(1 + 6*x + 17*x^2))/2 )^n for n >= 1. - Peter Bala, Jun 23 2015
a(n) = (-2)^n * a(-n) for all n in Z. - Michael Somos, Oct 13 2016
If c = (3 + sqrt(17))/2, then c^n = (a(n) + sqrt(17)*A007482(n-1)) / 2. - Michael Somos, Oct 13 2016
E.g.f.: 2*exp(3*x/2)*cosh(sqrt(17)*x/2). - Stefano Spezia, Oct 21 2022
a(n) = 2*A007482(n)-3*A007482(n-1). - R. J. Mathar, Feb 18 2024

A075117 Table by antidiagonals of generalized Lucas numbers: T(n,k) = T(n,k-1) + n*T(n,k-2) with T(n,0)=2 and T(n,1)=1.

Original entry on oeis.org

2, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 4, 5, 1, 2, 1, 7, 7, 7, 1, 2, 1, 11, 17, 10, 9, 1, 2, 1, 18, 31, 31, 13, 11, 1, 2, 1, 29, 65, 61, 49, 16, 13, 1, 2, 1, 47, 127, 154, 101, 71, 19, 15, 1, 2, 1, 76, 257, 337, 297, 151, 97, 22, 17, 1, 2, 1, 123, 511, 799, 701, 506, 211, 127, 25, 19, 1, 2
Offset: 0

Views

Author

Henry Bottomley, Sep 02 2002

Keywords

Examples

			Array starts as:
  2, 1,  1,  1,  1,   1, ...;
  2, 1,  3,  4,  7,  11, ...;
  2, 1,  5,  7, 17,  31, ...;
  2, 1,  7, 10, 31,  61, ...;
  2, 1,  9, 13, 49, 101, ...;
  2, 1, 11, 16, 71, 151, ...; etc.
		

Crossrefs

Cf. A060959.
Columns include: A007395, A000012, A005408, A016777, A056220, A062786.

Programs

  • Magma
    [2^(1+k-n)*(&+[Binomial(n-k,2*j)*(1+4*k)^j: j in [0..Floor((n-k)/2)]]): k in [0..n], n in [0..13]]; // G. C. Greubel, Jan 27 2020
    
  • Maple
    seq(seq( 2^(1+k-n)*add( binomial(n-k, 2*j)*(1+4*k)^j, j=0..floor((n-k)/2)), k=0..n), n=0..13); # G. C. Greubel, Jan 27 2020
  • Mathematica
    T[n_, k_]:= ((1 + Sqrt[1+4n])/2)^k + ((1 - Sqrt[1+4n])/2)^k; Table[If[n==0 && k==0, 2, T[k, n-k]]//Simplify, {n,0,13}, {k,0,n}]//Flatten (* G. C. Greubel, Jan 27 2020 *)
  • Sage
    def T(n, k): return 2^(1-k)*sum( binomial(k, 2*j)*(1+4*n)^j for j in (0..floor(k/2)) )
    [[T(k,n-k) for k in (0..n)] for n in (0..13)] # G. C. Greubel, Jan 27 2020

Formula

T(n, k) = ((1+sqrt(4*n+1))/2)^k + ((1-sqrt(4*n+1))/2)^k = 2*A060959(n, k+1) - A060959(n, k).
T(n, k) = 2^(1-k)*Sum_{j=0..floor(k/2)} binomial(k, 2*j)*(1+4*n)^j. - G. C. Greubel, Jan 27 2020

A075118 Variant on Lucas numbers: a(n) = a(n-1) + 3*a(n-2) with a(0)=2 and a(1)=1.

Original entry on oeis.org

2, 1, 7, 10, 31, 61, 154, 337, 799, 1810, 4207, 9637, 22258, 51169, 117943, 271450, 625279, 1439629, 3315466, 7634353, 17580751, 40483810, 93226063, 214677493, 494355682, 1138388161, 2621455207, 6036619690, 13900985311, 32010844381, 73713800314, 169746333457
Offset: 0

Views

Author

Henry Bottomley, Sep 02 2002

Keywords

Comments

The sequence 4,1,7,.. = 2*0^n+A075118(n) is given by trace(A^n) where A=[1,1,1,1;1,0,0,0;1,0,0,0;1,0,0,0]. - Paul Barry, Oct 01 2004
For n>2, a(n) is the numerator of the value of the continued fraction 1+3/(1+3/(1+...+3/7)) where there are n-2 1's. - Alexander Mark, Aug 16 2020

Examples

			a(4) = a(3)+3*a(2) = 10+3*7 = 31.
		

References

  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", Wiley, 2001, p. 471.

Crossrefs

Programs

  • GAP
    a:=[2,1];; for n in [3..40] do a[n]:=a[n-1]+3*a[n-2]; od; a; # G. C. Greubel, Jan 15 2020
  • Magma
    I:=[2,1]; [n le 2 select I[n] else Self(n-1)+3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Jul 20 2013
    
  • Magma
    R:=PowerSeriesRing(Integers(), 33); Coefficients(R!((2-x)/(1-x-3*x^2))); // Marius A. Burtea, Jan 15 2020
    
  • Maple
    a:= n-> (Matrix([[1,2]]). Matrix([[1,1], [3,0]])^n)[1,2]:
    seq(a(n), n=0..35);  # Alois P. Heinz, Aug 15 2008
  • Mathematica
    a[0]=2; a[1]=1; a[n_]:= a[n]= a[n-1] +3a[n-2]; Table[a[n], {n, 0, 30}]
    CoefficientList[Series[(2-x)/(1-x-3x^2), {x,0,40}], x] (* Vincenzo Librandi, Jul 20 2013 *)
    LinearRecurrence[{1,3},{2,1},40] (* Harvey P. Dale, Jun 18 2017 *)
    Table[Round[Sqrt[3]^n*LucasL[n, 1/Sqrt[3]]], {n,0,40}] (* G. C. Greubel, Jan 15 2020 *)
  • PARI
    my(x='x+O('x^30)); Vec((2-x)/(1-x-3*x^2)) \\ G. C. Greubel, Dec 21 2017
    
  • PARI
    polsym(x^2-x-3, 44) \\ Joerg Arndt, Jan 22 2023
    
  • Sage
    [lucas_number2(n,1,-3) for n in range(0, 30)] # Zerinvary Lajos, Apr 30 2009
    

Formula

a(n) = ((1+sqrt(13))/2)^n + ((1-sqrt(13))/2)^n.
a(n) = 2*A006130(n) - A006130(n-1) = A075117(3, n).
G.f.: (2-x)/(1-x-3*x^2). - Philippe Deléham, Nov 15 2008
a(n) = [x^n] ( (1 + x + sqrt(1 + 2*x + 13*x^2))/2 )^n for n >= 1. - Peter Bala, Jun 23 2015
a(n) = 3^(n/2) * Lucas(n, 1/sqrt(3)). - G. C. Greubel, Jan 15 2020

A081708 a(n) = a(n-1) + 64*a(n-2) starting with a(0) = 2 and a(1) = 1.

Original entry on oeis.org

2, 1, 129, 193, 8449, 20801, 561537, 1892801, 37831169, 158970433, 2580165249, 12754272961, 177884848897, 994158318401, 12378788647809, 76004921025473, 868247394485249, 5732562340115521, 61300395587171457, 428184385354564801, 4351409702933538049
Offset: 0

Views

Author

Helmut Schmiedel (a.positiv(AT)web.de), Apr 03 2003

Keywords

Crossrefs

Cf. A072265.

Programs

  • PARI
    a(n) = my(w = quadgen(257)); w^n + (1 - w)^n;
    
  • PARI
    Vec((2-x)/(1-x-64*x^2) + O(x^30)) \\ Colin Barker, Feb 22 2016

Formula

a(n) = ((1 + sqrt(257))/2)^n + ((1 - sqrt(257))/2)^n.
G.f.: (2-x) / (1-x-64*x^2). - Colin Barker, Feb 22 2016

Extensions

More terms from Michel Marcus, Aug 24 2013
Showing 1-7 of 7 results.