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

A127080 Infinite square array read by antidiagonals: Q(m, 0) = 1, Q(m, 1) = 1; Q(m, 2k) = (m - 2k + 1)*Q(m+1, 2k-1) - (2k-1)*Q(m+2,2k-2), m*Q(m, 2k+1) = (m - 2k)*Q(m+1, 2k) - 2k(m+1)*Q(m+2, 2k-1).

Original entry on oeis.org

1, 1, 1, 1, 1, -2, 1, 1, -1, -5, 1, 1, 0, -4, 12, 1, 1, 1, -3, 3, 43, 1, 1, 2, -2, -4, 28, -120, 1, 1, 3, -1, -9, 15, -15, -531, 1, 1, 4, 0, -12, 4, 48, -288, 1680, 1, 1, 5, 1, -13, -5, 75, -105, 105, 8601, 1, 1, 6, 2, -12, -12, 72, 24, -624, 3984, -30240, 1, 1, 7, 3, -9, -17, 45, 105, -735, 945, -945, -172965
Offset: 0

Views

Author

N. J. A. Sloane, Mar 24 2007

Keywords

Comments

Comment from N. J. A. Sloane, Jan 29 2020: (Start)
It looks like there was a missing 2 in the definition, which I have now corrected. The old definition was:
(Wrong!) Infinite square array read by antidiagonals: Q(m, 0) = 1, Q(m, 1) = 1; Q(m, 2k) = (m - 2k + 1)*Q(m+1, 2k-1) - (2k-1)*Q(m+2, k-2), m*Q(m, 2k+1) = (m - 2k)*Q(m+1, 2k) - 2k(m+1)*Q(m+2, 2k-1). (Wrong!) (End)

Examples

			Array begins:
     1,    1,    1,    1,    1,   1,   1,    1,    1,    1, ... (A000012)
     1,    1,    1,    1,    1,   1,   1,    1,    1,    1, ... (A000012)
    -2,   -1,    0,    1,    2,   3,   4,    5,    6,    7, ... (A023444)
    -5,   -4,   -3,   -2,   -1,   0,   1,    2,    3,    4, ... (A023447)
    12,    3,   -4,   -9,  -12, -13, -12,   -9,   -4,    3, ... (A127146)
    43,   28,   15,    4,   -5, -12, -17,  -20,  -21,  -20, ... (A127147)
  -120,  -15,   48,   75,   72,  45,   0,  -57, -120, -183, ... (A127148)
  -531, -288, -105,   24,  105, 144, 147,  120,   69,    0, ...
  1680,  105, -624, -735, -432, 105, 720, 1281, 1680, 1833, ...
		

References

  • V. van der Noort and N. J. A. Sloane, Paper in preparation, 2007.

Crossrefs

See A105937 for another version.
Columns give A127137, A127138, A127144, A127145;
Rows give A127146, A127147, A127148.

Programs

  • Maple
    f:= proc(k) option remember;
          if `mod`(k,2)=0 then k!/(k/2)!
        else 2^(k-1)*((k-1)/2)!*add(binomial(2*j, j)/8^j, j=0..((k-1)/2))
          fi; end;
    Q:= proc(n, k) option remember;
          if n=0 then (-1)^binomial(k, 2)*f(k)
        elif k<2 then 1
        elif `mod`(k,2)=0 then (n-k+1)*Q(n+1,k-1) - (k-1)*Q(n+2,k-2)
        else ( (n-k+1)*Q(n+1,k-1) - (k-1)*(n+1)*Q(n+2,k-2) )/n
          fi; end;
    seq(seq(Q(n-k, k), k=0..n), n=0..12); # G. C. Greubel, Jan 30 2020
  • Mathematica
    Q[0, k_]:= Q[0,k]= (-1)^Binomial[k, 2]*If[EvenQ[k], k!/(k/2)!, 2^(k-1)*((k-1)/2)!* Sum[Binomial[2*j, j]/8^j, {j, 0, (k-1)/2}] ];
    Q[n_, k_]:= Q[n,k]= If[k<2, 1, If[EvenQ[k], (n-k+1)*Q[n+1, k-1] - (k-1)*Q[n+2, k-2], ((n -k+1)*Q[n+1, k-1] - (k-1)*(n+1)*Q[n+2, k-2])/n]];
    Table[Q[n-k,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jan 30 2020 *)
  • Sage
    @CachedFunction
    def f(k):
        if (mod(k, 2)==0): return factorial(k)/factorial(k/2)
        else: return 2^(k-1)*factorial((k-1)/2)*sum(binomial(2*j, j)/8^j for j in (0..(k-1)/2))
    def Q(n,k):
        if (n==0): return (-1)^binomial(k, 2)*f(k)
        elif (k<2): return 1
        elif (mod(k,2)==0): return (n-k+1)*Q(n+1,k-1) - (k-1)*Q(n+2,k-2)
        else: return ( (n-k+1)*Q(n+1,k-1) - (k-1)*(n+1)*Q(n+2,k-2) )/n
    [[Q(n-k,k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jan 30 2020

Formula

E.g.f.: Sum_{k >= 0} Q(m,2k) x^k/k! = (1+4x)^((m-1)/2)/(1+2x)^(m/2), Sum_{k >= 0} Q(m,2k+1) x^k/k! = (1+4x)^((m-2)/2)/(1+2x)^((m+1)/2).

Extensions

More terms added by G. C. Greubel, Jan 30 2020

A154599 a(n) = 2*n^2 + 20*n + 8.

Original entry on oeis.org

30, 56, 86, 120, 158, 200, 246, 296, 350, 408, 470, 536, 606, 680, 758, 840, 926, 1016, 1110, 1208, 1310, 1416, 1526, 1640, 1758, 1880, 2006, 2136, 2270, 2408, 2550, 2696, 2846, 3000, 3158, 3320, 3486, 3656, 3830, 4008, 4190, 4376, 4566, 4760, 4958, 5160
Offset: 1

Views

Author

Vincenzo Librandi, Jan 12 2009

Keywords

Comments

Tenth diagonal of A144562.
2*a(n) + 84 is a square.

Crossrefs

Programs

  • Magma
    I:=[30, 56, 86]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 26 2012
    
  • Mathematica
    LinearRecurrence[{3, -3, 1}, {30, 56, 86}, 50] (* Vincenzo Librandi, Feb 26 2012 *)
    Table[2n^2+20n+8,{n,50}] (* Harvey P. Dale, Jun 15 2019 *)
  • PARI
    for(n=1, 40, print1(2*n^2+20*n+8", ")); \\ Vincenzo Librandi, Feb 26 2012
    
  • SageMath
    [2*n^2+20*n+8 for n in range(1,41)] # G. C. Greubel, May 30 2024

Formula

From R. J. Mathar, Jan 05 2011: (Start)
a(n) = 2*A127147(n+13).
G.f.: 2*x*(5-4*x)*(3-x)/(1-x)^3. (End)
From Amiram Eldar, Feb 25 2023: (Start)
Sum_{n>=1} 1/a(n) = 79/952 - cot(sqrt(21)*Pi)*Pi/(4*sqrt(21)).
Sum_{n>=1} (-1)^(n+1)/a(n) = 2851/14280 - cosec(sqrt(21)*Pi)*Pi/(4*sqrt(21)). (End)
E.g.f.: 2*(-4 + (4 + 11*x + x^2)*exp(x)). - G. C. Greubel, May 30 2024

A164582 a(n) = 5*a(n - 1) - a(n - 2), with n>2, a(1)=2, a(2)=3.

Original entry on oeis.org

2, 3, 13, 62, 297, 1423, 6818, 32667, 156517, 749918, 3593073, 17215447, 82484162, 395205363, 1893542653, 9072507902, 43468996857, 208272476383, 997893385058, 4781194448907, 22908078859477, 109759199848478, 525887920382913, 2519680402066087
Offset: 1

Views

Author

Vincenzo Librandi, Aug 17 2009

Keywords

Comments

From Klaus Purath, Aug 18 2024: (Start)
For any two consecutive terms (x,y), x^2 - 5xy + y^2 = -17 = A127147(6) always applies. In general, the following applies to all recurrences (t) with constant coefficients (5,-1) and t(0) = 2 and two consecutive terms (x,y): x^2 - 5xy + y^2 = A127147(t(1)+3) for any integer t(1). This includes and interprets the Feb 08 2014 comment on A003501 by Colin Barker.
By analogy to this, for three consecutive terms (x,y,z) of any recurrence (t) of the form (5,-1) with t(0) = 2: y^2 - xz = A127147(t(1)+3).
a(n) = t(n) - t(n-1) = (t(n+1) - t(n-2))/6, where (t) is any third order recurrence with constant coefficients (6,-6,1) and initial values t(0) = x, t(1) = x + 2, t(2) = x + 5 for any integer x.
a(n) = t(n-1) + t(n) = (t(n-2) + t(n+1))/4, where (t) is any third order recurrence with constant coefficients (4,4,-1) and initial values t(0) = x, t(1) = 2 - x, t(2) = x + 1 for any integer x. (End)

Programs

  • Magma
    [n le 2 select n+1 else 5*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 12 2013
    
  • Mathematica
    CoefficientList[Series[(2 - 7 x) / (1 - 5 x + x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 12 2013 *)
    LinearRecurrence[{5,-1},{2,3},30] (* Harvey P. Dale, Apr 06 2016 *)
  • PARI
    Vec(x*(2 - 7*x) / (1 - 5*x + x^2) + O(x^30)) \\ Colin Barker, Nov 08 2017

Formula

a(n) = 5*a(n-1) - a(n-2) = 2*A004254(n) - 7*A004254(n-1).
G.f.: x*(2-7*x) / (1-5*x+x^2).
a(n) = (2^(-1-n)*((5+sqrt(21))^n*(-31+7*sqrt(21)) + (5-sqrt(21))^n*(31+7*sqrt(21)))) / sqrt(21). - Colin Barker, Nov 08 2017
a(n) = (a(n-1)^2 + 17)/a(n-2). - Klaus Purath, Aug 30 2020

Extensions

Extended by R. J. Mathar, Aug 19 2009
Showing 1-3 of 3 results.