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

A276508 a(n) = (2*5^n + 3*(-1)^(floor((n-1)/3)) + (-1)^n)/6.

Original entry on oeis.org

0, 2, 9, 42, 208, 1041, 5208, 26042, 130209, 651042, 3255208, 16276041, 81380208, 406901042, 2034505209, 10172526042, 50862630208, 254313151041, 1271565755208, 6357828776042, 31789143880209, 158945719401042, 794728597005208, 3973642985026041, 19868214925130208, 99341074625651042
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 06 2016

Keywords

Comments

Number of 1’s in substitution system {1 -> 12321, 2 -> 23132, 3 -> 31213} at step n from initial string "3" (see example). Number of 2’s: A000351(n) - A010892(n+1) - 2*a(n). Number of 3’s: A010892(n+1) + a(n).
Excluding zero, convolution of A000351 and A174737.

Examples

			Evolution from initial string "3": 3 -> 31213 -> 3121312321231321232131213 -> ...
Therefore, number of 1’s at step n:
a(0) = 0;
a(1) = 2;
a(2) = 9, etc.
		

Crossrefs

Programs

  • Maple
    A276508:=n->(2*5^n + 3*(-1)^(floor((n-1)/3)) + (-1)^n)/6: seq(A276508(n), n=0..30); # Wesley Ivan Hurt, Sep 07 2016
  • Mathematica
    Table[(2 5^n + 3 (-1)^Floor[(n - 1)/3] + (-1)^n)/6, {n, 0, 25}]
    LinearRecurrence[{6, -6, 5}, {0, 2, 9}, 26]
  • PARI
    concat(0, Vec(x*(2-3*x)/((1-5*x)*(1-x+x^2)) + O(x^99))) \\ Altug Alkan, Sep 06 2016

Formula

O.g.f.: x*(2 - 3*x)/((1 - 5 x)*(1 - x + x^2)).
E.g.f.: (exp(9*x/2) - 2*sin(Pi/6-sqrt(3)*x/2))*exp(x/2)/3.
a(n) = 6*a(n-1) - 6*a(n-2) + 5*a(n-3).
a(n) = (5^n + sqrt(3)*sin(Pi*n/3) - cos(Pi*n/3))/3.
a(n) = (A020729(n) + A057079(n-1))/3.

A178703 Partial sums of round(3^n/7).

Original entry on oeis.org

0, 0, 1, 5, 17, 52, 156, 468, 1405, 4217, 12653, 37960, 113880, 341640, 1024921, 3074765, 9224297, 27672892, 83018676, 249056028, 747168085, 2241504257, 6724512773, 20173538320, 60520614960, 181561844880
Offset: 0

Views

Author

Mircea Merca, Dec 28 2010

Keywords

Examples

			a(6) = 0 + 0 + 1 + 4 + 12 + 35 + 104 = 156.
		

Programs

  • Magma
    [Floor((3*3^n-1)/14): n in [0..30]]; // Vincenzo Librandi, May 01 2011
    
  • Maple
    A178703 := proc(n) add( round(3^i/7),i=0..n) ; end proc:
  • Mathematica
    Table[Floor[(3^(n+1)-1)/14], {n,0,30}] (* G. C. Greubel, Jan 25 2019 *)
  • PARI
    vector(30, n, n--; ((3^(n+1)-1)/14)\1) \\ G. C. Greubel, Jan 25 2019
    
  • Sage
    [floor((3^(n+1)-1)/14) for n in (0..30)] # G. C. Greubel, Jan 25 2019

Formula

a(n) = round((3*3^n - 7)/14).
a(n) = floor((3*3^n - 1)/14).
a(n) = ceiling((3*3^n - 13)/14).
a(n) = a(n-6) + 52*3^(n-5), n > 5.
a(n) = 5*a(n-1) - 8*a(n-2) + 7*a(n-3) - 3*a(n-4), n > 3.
G.f.: x^2/((1 - x)*(1 - 3*x)*(1 - x + x^2)).
a(n) = 3^(n+1)/14 - 1/2 + A174737(n)/7. - R. J. Mathar, Jan 08 2011
Showing 1-2 of 2 results.