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-4 of 4 results.

A153518 Triangular T(n,k) = T(n-1, k) + T(n-1, k-1) + 5*T(n-2, k-1), read by rows.

Original entry on oeis.org

2, 5, 5, 2, 46, 2, 2, 123, 123, 2, 2, 135, 476, 135, 2, 2, 147, 1226, 1226, 147, 2, 2, 159, 2048, 4832, 2048, 159, 2, 2, 171, 2942, 13010, 13010, 2942, 171, 2, 2, 183, 3908, 26192, 50180, 26192, 3908, 183, 2, 2, 195, 4946, 44810, 141422, 141422, 44810, 4946, 195, 2
Offset: 1

Views

Author

Roger L. Bagula, Dec 28 2008

Keywords

Examples

			Triangle begins as:
  2;
  5,   5;
  2,  46,    2;
  2, 123,  123,     2;
  2, 135,  476,   135,      2;
  2, 147, 1226,  1226,    147,      2;
  2, 159, 2048,  4832,   2048,    159,     2;
  2, 171, 2942, 13010,  13010,   2942,   171,    2;
  2, 183, 3908, 26192,  50180,  26192,  3908,  183,   2;
  2, 195, 4946, 44810, 141422, 141422, 44810, 4946, 195, 2;
		

Crossrefs

Sequences with variable (p,q,j): A153516 (0,1,2), this sequences (0,1,3), A153520 (0,1,4), A153521 (0,1,5), A153648 (1,0,3), A153649 (1,1,4), A153650 (1,4,5), A153651 (1,5,6), A153652 (2,1,7), A153653 (2,1,8), A153654 (2,1,9), A153655 (2,1,10), A153656 (2,3,9), A153657 (2,7,10).
Cf. A123011.

Programs

  • Magma
    f:= func< n,j | Round(((3-(-1)^n)/2)*NthPrime(j)^(n-1) - 2^((3-(-1)^n)/2)) >;
    function T(n,k,p,q,j)
      if n eq 2 then return NthPrime(j);
      elif (n eq 3 and k eq 2 or n eq 4 and k eq 2 or n eq 4 and k eq 3) then return f(n,j);
      elif (k eq 1 or k eq n) then return 2;
      else return T(n-1,k,p,q,j) + T(n-1,k-1,p,q,j) + (p*j+q)*NthPrime(j)*T(n-2,k-1,p,q,j);
      end if; return T;
    end function;
    [T(n,k,0,1,3): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 04 2021
  • Maple
    A153518 := proc(n,k) option remember ; if n =1 then 2; elif n = 2 then 5; elif k=1 or k=n then 2; elif n = 3 then 46 ; elif n = 4 then 123 ; else procname(n-1,k-1)+procname(n-1,k)+5*procname(n-2,k-1) ; end: end: for n from 1 to 13 do for k from 1 to n do printf("%d,",A153518(n,k)) ; od: od: # R. J. Mathar, Jan 22 2009
  • Mathematica
    T[n_, k_, p_, q_, j_]:= T[n,k,p,q,j]= If[n==2, Prime[j], If[n==3 && k==2 || n==4 && 2<=k<=3, ((3-(-1)^n)/2)*Prime[j]^(n-1) -2^((3-(-1)^n)/2), If[k==1 || k==n, 2, T[n-1,k,p,q,j] + T[n-1,k-1,p,q,j] + (p*j+q)*Prime[j]*T[n-2,k-1,p,q,j] ]]];
    Table[T[n,k,0,1,3], {n,12}, {k,n}]//Flatten (* modified by G. C. Greubel, Mar 04 2021 *)
  • Sage
    @CachedFunction
    def f(n,j): return ((3-(-1)^n)/2)*nth_prime(j)^(n-1) - 2^((3-(-1)^n)/2)
    def T(n,k,p,q,j):
        if (n==2): return nth_prime(j)
        elif (n==3 and k==2 or n==4 and 2<=k<=3): return f(n,j)
        elif (k==1 or k==n): return 2
        else: return T(n-1,k,p,q,j) + T(n-1,k-1,p,q,j) + (p*j+q)*nth_prime(j)*T(n-2,k-1,p,q,j)
    flatten([[T(n,k,0,1,3) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Mar 04 2021
    

Formula

T(n,k) = T(n-1, k) + T(n-1, k-1) + 5*T(n-2, k-1).
Recurrence row sums: s(n) = 2*s(n-1) + 5*s(n-2), n > 4, with s(1) = 2, s(2) = 10, s(3) = 50, s(4) = 250. - R. J. Mathar, Jan 22 2009
From G. C. Greubel, Mar 04 2021: (Start)
T(n,k,p,q,j) = T(n-1,k,p,q,j) + T(n-1,k-1,p,q,j) + (p*j+q)*prime(j)*T(n-2,k-1,p,q,j) with T(2,k,p,q,j) = prime(j), T(3,2,p,q,j) = 2*prime(j)^2 -4, T(4,2,p,q, j) = T(4,3,p,q,j) = prime(j)^2 -2, T(n,1,p,q,j) = T(n,n,p,q,j) = 2 and (p, q, j) = (0,1,3).
Sum_{k=0..n} T(n,k,0,1,3) = 4*(-5)^n*[n<2] + 50*(i*sqrt(5))^(n-2)*(ChebyshevU(n-2, -i/sqrt(5)) - (3*i/sqrt(5))*ChebyshevU(n-3, -i/sqrt(5))) = 4*(-5)^n*[n<2] + 50*A123011(n-2). (End)

Extensions

More terms from R. J. Mathar, Jan 22 2009
Edited by G. C. Greubel, Mar 04 2021

A164549 a(n) = 4*a(n-1) + 2*a(n-2) for n > 1; a(0) = 1, a(1) = 6.

Original entry on oeis.org

1, 6, 26, 116, 516, 2296, 10216, 45456, 202256, 899936, 4004256, 17816896, 79276096, 352738176, 1569504896, 6983495936, 31072993536, 138258966016, 615181851136, 2737245336576, 12179345048576, 54191870867456
Offset: 0

Views

Author

Klaus Brockhaus, Aug 15 2009

Keywords

Comments

Binomial transform of A123011. Inverse binomial transform of A164550.
INVERT transform of the sequence (1, 5, 5*3, 5*3^2, 5*3^3, 5*3^4, ...); i.e., of (1, 5, 15, 45, 135, 405, ...). The sequence can also be obtained by extracting the upper left terms in matrix powers of [(1,5); (1,3)]. - Gary W. Adamson, Jul 31 2016
The sequence is A090017 (1, 4, 18, 80, 356, ...) convolved with (1, 2, 0, 0, 0, ...). Also, the upper left terms extracted from matrix powers of [(1,5); (1,3)]. - Gary W. Adamson, Aug 20 2016

Crossrefs

Programs

  • Magma
    [ n le 2 select 5*n-4 else 4*Self(n-1)+2*Self(n-2): n in [1..22] ];
    
  • Mathematica
    LinearRecurrence[{4,2},{1,6},30] (* Harvey P. Dale, Mar 16 2013 *)
    CoefficientList[Series[(1 +2x)/(1 -4x -2x^2), {x, 0, 24}], x] (* Michael De Vlieger, Aug 02 2016 *)
  • PARI
    Vec((1+2*x)/(1-4*x-2*x^2) + O(x^30)) \\ Michel Marcus, Feb 04 2016
    
  • Sage
    [(i*sqrt(2))^n*(chebyshev_U(n, -i*sqrt(2)) - sqrt(2)*i*chebyshev_U(n-1, -i*sqrt(2))) for n in (0..30)] # G. C. Greubel, Jul 16 2021

Formula

a(n) = ((3+2*sqrt(6))*(2+sqrt(6))^n + (3-2*sqrt(6))*(2-sqrt(6))^n)/6.
G.f.: (1+2*x)/(1-4*x-2*x^2).
a(n) = (i*sqrt(2))^n*(ChebyshevU(n, -i*sqrt(2)) - sqrt(2)*i*ChebyshevU(n-1, -i*sqrt(2))). - G. C. Greubel, Jul 16 2021

A154235 a(n) = ( (4 + sqrt(6))^n - (4 - sqrt(6))^n )/(2*sqrt(6)).

Original entry on oeis.org

1, 8, 54, 352, 2276, 14688, 94744, 611072, 3941136, 25418368, 163935584, 1057300992, 6819052096, 43979406848, 283644733824, 1829363802112, 11798463078656, 76094066608128, 490767902078464, 3165202550546432
Offset: 1

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Jan 05 2009

Keywords

Comments

Lim_{n -> infinity} a(n)/a(n-1) = 4 + sqrt(6) = 6.4494897427....
Binomial transform of A164550, second binomial transform of A164549, third binomial transform of A123011, fourth binomial transform of A164532.
Binomial transform is A164551, second binomial transform is A164552, third binomial transform is A164553.

Crossrefs

Cf. A010464 (decimal expansion of square root of 6), A123011, A164532, A164549, A164550, A164551, A164552, A164553.

Programs

  • GAP
    a:=[1,8];; for n in [3..30] do a[n]:=8*a[n-1]-10*a[n-2]; od; a; # G. C. Greubel, May 21 2019
  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-6); S:=[ ((4+r)^n-(4-r)^n)/(2*r): n in [1..20] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jan 07 2009
    
  • Mathematica
    LinearRecurrence[{8, -10}, {1, 8}, 30] (* or *) Table[Simplify[((4 + Sqrt[6])^n -(4-Sqrt[6])^n)/(2*Sqrt[6])], {n, 30}] (* G. C. Greubel, Sep 06 2016 *)
  • PARI
    a(n)=([0,1; -10,8]^(n-1)*[1;8])[1,1] \\ Charles R Greathouse IV, Sep 07 2016
    
  • PARI
    my(x='x+O('x^30)); Vec(x/(1-8*x+10*x^2)) \\ G. C. Greubel, May 21 2019
    
  • Sage
    [lucas_number1(n,8,10) for n in range(1, 21)] # Zerinvary Lajos, Apr 23 2009
    

Formula

From Philippe Deléham, Jan 06 2009: (Start)
a(n) = 8*a(n-1) - 10*a(n-2) for n > 1, where a(0)=0, a(1)=1.
G.f.: x/(1 - 8*x + 10*x^2). (End)

Extensions

Extended beyond a(7) by Klaus Brockhaus, Jan 07 2009
Edited by Klaus Brockhaus, Oct 04 2009

A164532 a(n) = 6*a(n-2) for n > 2; a(1) = 1, a(2) = 4.

Original entry on oeis.org

1, 4, 6, 24, 36, 144, 216, 864, 1296, 5184, 7776, 31104, 46656, 186624, 279936, 1119744, 1679616, 6718464, 10077696, 40310784, 60466176, 241864704, 362797056, 1451188224, 2176782336, 8707129344, 13060694016, 52242776064, 78364164096
Offset: 1

Views

Author

Klaus Brockhaus, Aug 15 2009

Keywords

Comments

Interleaving of A000400 and A067411 without initial term 1.
Binomial transform is apparently A123011. Fourth binomial transform is A154235.

Crossrefs

Cf. A000400 (powers of 6), A067411, A123011, A154235.

Programs

  • Magma
    [ n le 2 select 3*n-2 else 6*Self(n-2): n in [1..29] ];
    
  • Mathematica
    LinearRecurrence[{0,6}, {1,4}, 40] (* G. C. Greubel, Jul 16 2021 *)
  • Sage
    [((1 - (-1)^n)*sqrt(6)/2 + 2*(1 + (-1)^n))*6^(n/2 -1) for n in (1..40)] # G. C. Greubel, Jul 16 2021

Formula

a(n) = (5 - (-1)^n)*6^(1/4*(2*n - 5 + (-1)^n)).
G.f.: x*(1+4*x)/(1-6*x^2).
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011
a(n) = ((1-(-1)^n)*sqrt(6)/2 + 2*(1+(-1)^n))*6^(n/2 -1). - G. C. Greubel, Jul 16 2021
Showing 1-4 of 4 results.