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.

Previous Showing 11-16 of 16 results.

A097137 Convolution of 3^n and floor(n/2).

Original entry on oeis.org

0, 0, 1, 4, 14, 44, 135, 408, 1228, 3688, 11069, 33212, 99642, 298932, 896803, 2690416, 8071256, 24213776, 72641337, 217924020, 653772070, 1961316220, 5883948671, 17651846024, 52955538084, 158866614264, 476599842805
Offset: 0

Views

Author

Paul Barry, Jul 29 2004

Keywords

Comments

a(n+1) gives partial sums of A033113 and second partial sums of A015518(n+1). Binomial transform of {0,0,1,1,4,4,16,16,...}.
Partial sums of floor(3^n/8) = round(3^n/8). - Mircea Merca, Dec 28 2010

Crossrefs

Column k=3 of A368296.
Cf. A033113.

Programs

  • GAP
    a:=[0,0,1,4];; for n in [5..30] do a[n]:=4*a[n-1]-2*a[n-2]-4*a[n-3] +3*a[n-4]; od; a; # G. C. Greubel, Jul 14 2019
  • Magma
    [Round((3*3^n-4*n-4)/16): n in [0..30]]; // Vincenzo Librandi, Jun 25 2011
    
  • Maple
    A097137 := proc(n) add( floor(3^i/8),i=0..n) ; end proc:
  • Mathematica
    CoefficientList[Series[x^2/((1-x)^2(1-3x)(1+x)),{x,0,30}],x]  (* Harvey P. Dale, Mar 11 2011 *)
  • PARI
    my(x='x+O('x^30)); concat([0,0], Vec(x^2/((1-x)^2*(1-3*x)*(1+x)))) \\ G. C. Greubel, Jul 14 2019
    
  • Sage
    (x^2/((1-x)^2*(1-3*x)*(1+x))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jul 14 2019
    

Formula

G.f.: x^2/((1-x)^2*(1-3*x)*(1+x)).
a(n) = 4*a(n-1) - 2*a(n-2) - 4*a(n-3) + 3*a(n-4).
a(n) = Sum_{k=0..n} floor((n-k)/2)*3^k = Sum_{k=0..n} floor(k/2)*3^(n-k).
From Mircea Merca, Dec 26 2010: (Start)
a(n) = round((3*3^n - 4*n - 4)/16) = floor((3*3^n - 4*n - 3)/16) = ceiling((3*3^n - 4*n - 5)/16) = round((3*3^n - 4*n - 3)/16).
a(n) = a(n-2) + (3^(n-1)-1)/2, n > 2. (End)
a(n) = (floor(3^(n+1)/8) - floor((n+1)/2))/2. - Seiichi Manyama, Dec 22 2023

A052929 Expansion of g.f. (2-3*x-x^2)/((1-x^2)*(1-3*x)).

Original entry on oeis.org

2, 3, 10, 27, 82, 243, 730, 2187, 6562, 19683, 59050, 177147, 531442, 1594323, 4782970, 14348907, 43046722, 129140163, 387420490, 1162261467, 3486784402, 10460353203, 31381059610, 94143178827, 282429536482, 847288609443, 2541865828330, 7625597484987, 22876792454962
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Crossrefs

Cf. A052531: 2^n + (1+(-1)^n)/2.

Programs

  • GAP
    List([0..30], n-> 3^n + (1+(-1)^n)/2 ); # G. C. Greubel, Oct 17 2019
  • Magma
    [&+[(-1)^k+2^k*Binomial(n,k): k in [0..n]]: n in [0..30]]; // Bruno Berselli, Aug 27 2013
    
  • Maple
    spec:= [S, {S=Union(Sequence(Prod(Z,Z)), Sequence(Union(Z,Z,Z)))}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
    seq(3^n + (1+(-1)^n)/2, n=0..30); # G. C. Greubel, Oct 17 2019
  • Mathematica
    Table[3^n + (1+(-1)^n)/2, {n, 0, 30}] (* Bruno Berselli, Aug 27 2013 *)
    LinearRecurrence[{3, 1, -3}, {2, 3, 10}, 40] (* Vincenzo Librandi, Mar 09 2018 *)
    Table[3^n + Fibonacci[n+1,0], {n,0,30}] (* G. C. Greubel, Oct 17 2019 *)
  • PARI
    x='x+O('x^30); Vec((2-3*x-x^2)/((1-x^2)*(1-3*x))) \\ Altug Alkan, Mar 09 2018
    
  • Sage
    [3^n + (1+(-1)^n)/2 for n in (0..30)] # G. C. Greubel, Oct 17 2019
    

Formula

G.f.: (2-3*x-x^2)/((1-x^2)*(1-3*x)).
a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3), a(0)=2, a(1)=3, a(2)=10.
a(n) = 3^n + Sum_{alpha=RootOf(-1+z^2)} alpha^(-n)/2.
a(n) = 2*A033113(n+1) - 3*A033113(n) - A033113(n-1). - R. J. Mathar, Nov 28 2011
From Bruno Berselli, Aug 27 2013: (Start)
a(n) = 3^n + (1 + (-1)^n)/2.
a(n) = Sum_{k=0..n} (-1)^k + 2^k*binomial(n,k). (End)
E.g.f.: exp(3*x) + cosh(x). - Elmo R. Oliveira, Mar 16 2025

Extensions

More terms from James Sellers, Jun 05 2000

A089815 a(n) = floor((n+2)^(n+2)/((n+2)^2-1)).

Original entry on oeis.org

1, 3, 17, 130, 1333, 17157, 266305, 4842756, 101010101, 2377597255, 62350352785, 1802828015430, 56984650387477, 1954883439200265, 72340172838076673, 2872362020438669320, 121815504877079063701, 5495610154611982192011, 262801002506265664160401
Offset: 0

Views

Author

Paul Barry, Nov 12 2003

Keywords

Crossrefs

Programs

  • Magma
    [Floor((n+2)^(n+2)/((n+2)^2-1)): n in [0..50]]; // G. C. Greubel, Oct 10 2017
  • Maple
    A089815:=n->floor((n+2)^(n+2)/((n+2)^2-1)): seq(A089815(n), n=0..30); # Wesley Ivan Hurt, Apr 11 2017
  • Mathematica
    Table[Floor[(n + 2)^(n + 2)/((n + 2)^2 - 1)], {n, 0, 50}] (* G. C. Greubel, Oct 10 2017 *)
  • PARI
    for(n=0,50, print1(floor((n+2)^(n+2)/((n+2)^2-1)), ", ")) \\ G. C. Greubel, Oct 10 2017
    

A089816 a(n) = floor((n+3)^(n+2)/((n+3)^2-1)).

Original entry on oeis.org

1, 4, 26, 222, 2451, 33288, 538084, 10101010, 216145205, 5195862732, 138679078110, 4070332170534, 130325562613351, 4521260802379792, 168962471790509960, 6767528048726614650, 289242639716420115369
Offset: 0

Views

Author

Paul Barry, Nov 12 2003

Keywords

Crossrefs

Programs

  • Magma
    [Floor((n+3)^(n+2)/((n+3)^2-1)): n in [0..25]]; // G. C. Greubel, Oct 11 2017
  • Mathematica
    Table[Floor[(n + 3)^(n + 2)/((n + 3)^2 - 1)], {n, 0, 50}] (* G. C. Greubel, Oct 11 2017 *)
  • PARI
    for(n=0, 25, print1(floor((n+3)^(n+2)/((n+3)^2-1)), ", ")) \\ G. C. Greubel, Oct 11 2017
    

A340395 a(n) = A340131(A001006(n)).

Original entry on oeis.org

5, 15, 50, 150, 455, 1365, 4100, 12300, 36905, 110715, 332150, 996450, 2989355, 8968065, 26904200, 80712600, 242137805, 726413415, 2179240250, 6537720750, 19613162255, 58839486765, 176518460300, 529555380900, 1588666142705, 4765998428115, 14297995284350
Offset: 2

Views

Author

Gennady Eremin, Jan 06 2021

Keywords

Comments

This sequence is associated with A340131, whose terms are sorted by the length of their ternary code. Elements with the same length of ternary code form a range that has a maximum. The maximal term of the n-range (a set of elements with ternary code length n in A340131) is a(n). Example: numbers 29, 33, 44, 45 and 50 have a ternary length of 4 (see A340131), respectively a(4) = 50.
Ternary code for a(n) is 12..12 for even n and 12..120 for odd n.

Examples

			A001006(2) = 2, so a(2) = A340131(2) = 5.
A001006(3) = 4, so a(3) = A340131(4) = 15, etc.
		

Crossrefs

Subsequence of A340131.

Programs

  • PARI
    Vec(5/(1 - 3*x - x^2 + 3*x^3) + O(x^30)) \\ Andrew Howroyd, Jan 08 2021

Formula

a(n) = 5*3^(n-2*k)*(9^k-1)/8 where k = floor(n/2).
a(n+1) = 3*a(n) for even n >= 2; a(n+1) = 3*a(n)+5 for odd n >= 3.
a(n) = 5*A033113(n-1).
a(n) = (5/8)*(3^n - (-1)^(n-1) - 2).
a(n) = 2*a(n-1) + 3*a(n-2) + 5 for n > 3.
From Stefano Spezia, Jan 06 2021: (Start)
G.f.: 5*x^2/(1 - 3*x - x^2 + 3*x^3).
a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3) for n > 4. (End)

A270346 a(n) is the number whose base-11 digits are, in order, the first n terms of the simple periodic sequence: repeat 2,3,5,7.

Original entry on oeis.org

2, 25, 280, 3087, 33959, 373552, 4109077, 45199854, 497198396, 5469182359, 60161005954, 661771065501, 7279481720513, 80074298925646, 880817288182111, 9688990170003228, 106578891870035510, 1172367810570390613, 12896045916274296748, 141856505079017264235
Offset: 1

Views

Author

Harvey P. Dale, Mar 15 2016

Keywords

Comments

The periodic sequence comprises the first four primes, and the selected base is the fifth prime.

Examples

			a(8) = 45199854 = 23572357_11.
		

Crossrefs

Cf. A033113.

Programs

  • GAP
    a:=[2,25,280,3087,33959];; for n in [6..30] do a[n]:=11*a[n-1]+a[n-4]-11*a[n-5]; od; a; # G. C. Greubel, Jul 14 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( x*(2+3*x+5*x^2+7*x^3)/((1-x^4)*(1-11*x)) )); // G. C. Greubel, Jul 14 2019
    
  • Mathematica
    Table[FromDigits[PadRight[{},n,{2,3,5,7}],11],{n,30}] (* or *) LinearRecurrence[{11,0,0,1,-11},{2,25,280,3087,33959},31]
  • PARI
    a(n) = (-2074+305*(-1)^n+(370+410*I)*(-I)^n+(370-410*I)*I^n+1029*11^n)/4880 \\ Colin Barker, Jul 31 2016
    
  • PARI
    Vec(x*(2+3*x+5*x^2+7*x^3)/((1-x)*(1+x)*(1-11*x)*(1+x^2)) + O(x^30)) \\ Colin Barker, Jul 31 2016
    
  • Sage
    a=(x*(2+3*x+5*x^2+7*x^3)/((1-x^4)*(1-11*x))).series(x, 30).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Jul 14 2019
    

Formula

a(1)=2, a(2)=25, a(3)=280, a(4)=3087, a(5)=33959, a(n) = 11*a(n-1) + a(n-4) - 11*a(n-5). - Harvey P. Dale, Mar 15 2016
G.f.: x*(2+3*x+5*x^2+7*x^3) / ((1-x)*(1+x)*(1-11*x)*(1+x^2)). - Colin Barker, Jul 31 2016
Previous Showing 11-16 of 16 results.