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.

A084076 Length of list created by n substitutions k -> Range[-1-abs(k), abs(k)+1] starting with {1}.

Original entry on oeis.org

1, 5, 27, 157, 963, 6141, 40323, 270845, 1852419, 12857341, 90337283, 641286141, 4592533507, 33139654653, 240723001347, 1758796578813, 12916805074947, 95300512382973, 706044251602947, 5250379998560253, 39176121681444867
Offset: 0

Views

Author

Wouter Meeussen, May 11 2003

Keywords

Comments

2*a(n-1) is the second diagonal of the triangle A115195.
Row sums of A167432. Hankel transform is A167435. - Paul Barry, Nov 03 2009

Examples

			{1}
{-2,-1,0,1,2}
{-3,-2,-1,0,1,2,3,-2,-1,0,1,2,-1,0,1,-2,-1,0,1,2,-3,-2,-1,0,1,2,3}
		

Crossrefs

Third column (m=2) of triangle A115193, called C(1, 2).

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 40); Coefficients(R!( (1-5*x -(1- x)*Sqrt(1-8*x))/(4*x^2*(1+x)) )); // G. C. Greubel, Nov 23 2022
    
  • Mathematica
    Rest@CoefficientList[InverseSeries[Series[ -((1+5*n+2*n^2-(1+2*n)*Sqrt[1+6*n+n^2] )/(4*n^2)), {n, 0, 28}]], n] or Length/@Flatten/@NestList[ # /. k_Integer :> Range[ -1-Abs[k], Abs[k]+1]&, {1}, 8]
    Flatten[{1,RecurrenceTable[{(n+2)*(7*n-5)*a[n] == (7*n-2)*(7*n-1)*a[n-1] + 4*(2*n-1)*(7*n+2)*a[n-2],a[1]==5,a[2]==27},a,{n,20}]}] (* Vaclav Kotesovec, Oct 14 2012 *)
  • PARI
    {a(n) = my(L); L = [1]; if(n < 0, 0, for(i = 1, n, L = concat([ vector(3 + 2*abs(k), i, i - abs(k) - 2) | k <- L])); #L)}; /* Michael Somos, Nov 23 2022 */
  • Sage
    def A084076_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-5*x -(1-x)*sqrt(1-8*x))/(4*x^2*(1+x)) ).list()
    A084076_list(40) # G. C. Greubel, Nov 23 2022
    

Formula

G.f. is the series reversion of -((1 + 5*x + 2*x^2 - (1 + 2*x)*sqrt(1 + 6*x + x^2))/(4*x^2)).
G.f.: 2*((c(2*x))^3)/(1+c(2*x)) with the o.g.f. c(x) of A000108 (Catalan numbers).
a(n) = Sum_{j=1..n+1} A115195(n, j), n >= 0.
G.f.: (-1 + (1-x)*c(2*x))/(x*(1+x)); cf. A115139. - Wolfdieter Lang, Feb 23 2006
D-finite with recurrence: (n+2)*(7*n-5)*a(n) = (7*n-2)*(7*n-1)*a(n-1) + 4*(2*n-1)*(7*n+2)*a(n-2). - Vaclav Kotesovec, Oct 14 2012
a(n) ~ 7*2^(3n+3)/(9*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 14 2012
D-finite with recurrence (n+2)*a(n) = 2*(4*n+1)*a(n-1) + (n+16)*a(n-2) - 4*(2*n-3)*a(n-3). - R. J. Mathar, Mar 10 2022
a(n) = ( (7*n-1)*(7*n-2)*a(n-1) + 4*(2*n-1)*(7*n+2)*a(n-2) )/((n+2)*(7*n-5)), with a(0) = 1, a(1) = 5. - G. C. Greubel, Nov 23 2022

A084075 Length of list created by n substitutions k -> Range( -abs(k+1), abs(k-1), 2) starting with {1}.

Original entry on oeis.org

1, 2, 5, 12, 33, 86, 249, 680, 2033, 5722, 17485, 50260, 156033, 455534, 1431281, 4228752, 13412193, 40003058, 127840085, 384232156, 1235575201, 3737280582, 12080678505, 36736735672, 119276490193, 364372758986, 1187542872989
Offset: 0

Views

Author

Wouter Meeussen, May 11 2003

Keywords

Examples

			{1}, {-2,0}, {-1,1,3,-1,1}, {0,2,-2,0,-4,-2,0,2,0,2,-2,0}
		

Crossrefs

Cf. A027307, A215067, A034015 (even bisection).

Programs

  • Magma
    I:=[1,2,5,12]; [n le 4 select I[n] else (6*(35*n^2-55*n-76)*Self(n-1) + (275*n^4-770*n^3-203*n^2+1736*n-912)*Self(n-2) -6*(5*n^2+5*n-28)*Self(n-3) + (n-4)*(n-2)*(25*n^2+5*n-48)*Self(n-4))/(n*(n+2)*(25*n^2-45*n-28)): n in [1..41]]; // G. C. Greubel, Nov 24 2022
    
  • Mathematica
    Rest@CoefficientList[InverseSeries[Series[ (-1-6n-8n^2+(1+2n)^2 Sqrt[1+4n])/( 2(n+4n^2+4n^3)), {n, 0, 40}]], n]
    Length/@Flatten/@NestList[ #/.k_Integer:>Range[-Abs[k+1], Abs[k-1], 2] &, {1}, 8]
  • Python
    # replace iterates lists as described in Example.
    def replace(L):
        return [i for k in L for i in range(-abs(k + 1), 1 + abs(k - 1), 2)]
    def a(n):
      L = [1]
      for k in range(n): L=replace(L)
      return len(L)
    print([a(n) for n in range(12)]) # F. Chapoton, Nov 15 2024
  • SageMath
    @CachedFunction
    def a(n): # a = A084075
        if n < 4: return (1, 2, 5, 12)[n]
        else: return (6*(35*n^2 +15*n -96)*a(n-1) +(275*n^4+330*n^3-863*n^2+120*n+126)*a(n-2) -6*(5*n^2+15*n-18)*a(n-3) +(n-3)*(n-1)*(25*n^2+55*n-18)*a(n-4))/((n+1)*(n+3)*(25*n^2+5*n-48))
    [a(n) for n in range(41)] # G. C. Greubel, Nov 24 2022
    

Formula

G.f. is the series reversion of (-1 -6*x -8*x^2 + (1+2*x)^2 * sqrt(1+4*x))/(2*(x +4*x^2 +4*x^3)).
a(2*n) = A027307(n)/2, n >= 1.
a(n) = ( 6*(35*n^2 +15*n -96)*a(n-1) + (275*n^4 +330*n^3 -863*n^2 +120*n +126)*a(n-2) - 6*(5*n^2 +15*n -18)*a(n-3) + (n-3)*(n-1)*(25*n^2 +55*n -18)*a(n-4) )/((n+1)*(n+3)*(25*n^2 +5*n -48)), n >= 4. - G. C. Greubel, Nov 24 2022

A084077 Length of list created by n substitutions k -> Range(-abs(k+1), abs(k-1)) starting with {1}.

Original entry on oeis.org

1, 3, 11, 41, 159, 633, 2575, 10657, 44735, 190017, 815231, 3527681, 15378687, 67478401, 297777407, 1320753665, 5884652543, 26326301697, 118211192831, 532574203905, 2406726828031, 10906541371393
Offset: 0

Views

Author

Wouter Meeussen, May 11 2003

Keywords

Examples

			{1}, {-2,-1,0}, {-1,0,1,2,3,0,1,2,-1,0,1}
		

Crossrefs

Programs

  • Magma
    I:=[1,3,11]; [n le 3 select I[n] else (3*(7*n^2 -11*n +6)*Self(n-1) + 2*(28*n^2 -51*n +14)*Self(n-2) + 4*(n-2)*(7*n-4)*Self(n-3))/((n+2)*(7*n-11)): n in [1..41]]; // G. C. Greubel, Nov 23 2022
    
  • Mathematica
    Length/@Flatten/@NestList[ # /. k_Integer:>Range[ -Abs[k+1], Abs[k-1]]&, {1}, 8]
    Flatten[{1,RecurrenceTable[{(n+3)*(7*n-4)*a[n] == 3*(7*n^2+3*n+2)*a[n-1] + 2*(28*n^2+5*n-9)*a[n-2] + 4*(n-1)*(7*n+3)*a[n-3],a[1]==3,a[2]==11,a[3]==41},a,{n,20}]}] (* Vaclav Kotesovec, Oct 14 2012 *)
  • SageMath
    @CachedFunction
    def a(n):  # a = A084077
        if (n<3): return (1,3,11)[n]
        else: return (3*(7*n^2 +3*n +2)*a(n-1) + 2*(28*n^2 +5*n -9)*a(n-2) + 4*(n-1)*(7*n+3)*a(n-3))/((n+3)*(7*n-4))
    [a(n) for n in range(31)] # G. C. Greubel, Nov 23 2022

Formula

invOGF satisfies n - (1+3*n)*a(n) - 2*n*(1+n)*a(n)^2 - 2*n^2*a(n)^3 = 0. [Is it true?]
Recurrence: (n+3)*(7*n-4)*a(n) = 3*(7*n^2+3*n+2)*a(n-1) + 2*(28*n^2+5*n-9)*a(n-2) + 4*(n-1)*(7*n+3)*a(n-3). - Vaclav Kotesovec, Oct 14 2012
a(n) ~ sqrt(52+34*sqrt(2))*(2+2*sqrt(2))^n/(sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 14 2012

A137842 Number of paths from (0,0) if n is even, or from (2,1) if n is odd, to (3n,0) that stay in first quadrant (but may touch horizontal axis) and where each step is (2,1), (1,2) or (1,-1).

Original entry on oeis.org

1, 1, 2, 4, 10, 24, 66, 172, 498, 1360, 4066, 11444, 34970, 100520, 312066, 911068, 2862562, 8457504, 26824386, 80006116, 255680170, 768464312, 2471150402, 7474561164, 24161357010, 73473471344, 238552980386, 728745517972
Offset: 0

Views

Author

Paul Barry, Feb 13 2008

Keywords

Comments

Row sums of the inverse of the Riordan array (1/(1+x^2),x(1-x^2)/(1+x^2)).
a(n) is the maximum number of distinct sets that can be obtained as complete parenthesizations of “S_1 union S_2 intersect S_3 union S_4 intersect S_5 union ... S_{n+1}”, where the total of n union and intersection operations alternate, starting with a union, and S_1, S_2, ... , S_{n+1} are sets. - Alexander Burstein, Nov 22 2023

Crossrefs

Cf. A084078. [From R. J. Mathar, Feb 28 2009]

Formula

G.f.: (1+v^2)/(1-v), where v=2*sqrt(x^2+3)*sin(asin(x(x^2+18)/((x^2+3)^(3/2)))/3)/3-x/3; a(2n)=A027307(n); a(2n+1)=A032349(n+1).
Showing 1-4 of 4 results.