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.

A132353 a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4), starting with 1, 2, 6, 20.

Original entry on oeis.org

1, 2, 6, 20, 61, 183, 547, 1640, 4920, 14762, 44287, 132861, 398581, 1195742, 3587226, 10761680, 32285041, 96855123, 290565367, 871696100, 2615088300, 7845264902, 23535794707, 70607384121, 211822152361, 635466457082
Offset: 0

Views

Author

Paul Curtz, Nov 24 2007

Keywords

Comments

A132868(n) - a(n) = A128834(n) (discovered in 1995).

Crossrefs

Cf. A129339.

Programs

  • Magma
    I:=[1,2,6,20]; [n le 4 select I[n] else 3*Self(n-1) - Self(n-3) + 3*Self(n-4): n in [1..30]]; // G. C. Greubel, Jan 15 2018
  • Mathematica
    LinearRecurrence[{3, 0, -1, 3}, {1, 2, 6, 20}, 50] (* G. C. Greubel, Jan 15 2018 *)
    nxt[{a_,b_,c_,d_}]:={b,c,d,3d-b+3a}; NestList[nxt,{1,2,6,20},50][[;;,1]] (* Harvey P. Dale, Feb 17 2025 *)
  • PARI
    x='x+O('x^30); Vec((1-x+3*x^3)/((1-3*x)*(1+x)*(x^2-x+1))) \\ G. C. Greubel, Jan 15 2018
    

Formula

Also a(n) - 3^(n+1) = hexaperiodic 1, -1, -3, -1, 1, 3; cf. A132951.
From R. J. Mathar, Apr 04 2008: (Start)
O.g.f.: (1-x+3*x^3)/((1-3*x)*(1+x)*(x^2-x+1)).
a(n) = -(-1)^n/12 + 3^(n+1)/4 + A057079(n+2)/3. (End)

Extensions

More terms from R. J. Mathar, Apr 04 2008

A194272 Array T(n,k) with 6 columns read by rows in which row n lists 3*n-2, 3*n-1, 3*n, 3*n, 3*n, 3*n.

Original entry on oeis.org

1, 2, 3, 3, 3, 3, 4, 5, 6, 6, 6, 6, 7, 8, 9, 9, 9, 9, 10, 11, 12, 12, 12, 12, 13, 14, 15, 15, 15, 15, 16, 17, 18, 18, 18, 18, 19, 20, 21, 21, 21, 21, 22, 23, 24, 24, 24, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 31, 32, 33, 33, 33, 33, 34, 35, 36, 36, 36, 36
Offset: 1

Views

Author

Omar E. Pol, Aug 20 2011

Keywords

Comments

Also first differences of A194273 which is also a sequence related to cellular automata.

Examples

			Array begins:
1,  2,  3,  3,  3,  3,
4,  5,  6,  6,  6,  6,
7,  8,  9,  9,  9,  9,
10, 11, 12, 12, 12, 12,
13, 14, 15, 15, 15, 15,
16, 17, 18, 18, 18, 18,
19, 20, 21, 21, 21, 21,
22, 23, 24, 24, 24, 24,
...
Sum of row n gives 18*n-3 = A008600(n) - 3.
G.f. = x + 2*x^2 + 3*x^3 + 3*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 5*x^8 + ...
		

Crossrefs

Column 1: A016777. Column 2: A016789. Every column 3, 4, 5 and 6: positive integers of A008585.

Programs

  • Magma
    [Floor((n+3)/6) + Floor((n+4)/6) + Floor((n+5)/6) : n in [1..100]]; // Wesley Ivan Hurt, Apr 04 2015
    
  • Maple
    A194272:=n->floor((n+3)/6) + floor((n+4)/6) + floor((n+5)/6): seq(A194272(n), n=1..100); # Wesley Ivan Hurt, Apr 04 2015
  • Mathematica
    Table[Floor[(n + 3)/6] + Floor[(n + 4)/6] + Floor[(n + 5)/6], {n, 100}] (* Wesley Ivan Hurt, Apr 04 2015 *)
  • PARI
    x='x+O('x^60); Vec(x*(1-x^3)/((1-x)^2*(1-x^6))) \\ G. C. Greubel, Aug 13 2018

Formula

From Michael Somos, May 12 2014: (Start)
Euler transform of length 6 sequence [2, 0, -1, 0, 0, 1].
G.f.: x * (1-x^3) / ( (1-x)^2 * (1-x^6) ).
a(n-1) = A047926(n) - A132868(n). (End)
From Wesley Ivan Hurt, Apr 04 2015, Sep 08 2015: (Start)
a(n) = 2*a(n-1)-a(n-2)-a(n-3)+2*a(n-4)-a(n-5), n>5.
a(n) = floor((n+3)/6) + floor((n+4)/6) + floor((n+5)/6).
a(n) = Sum_{i=0..n-1} floor(i/6) - floor((i-3)/6). (End)
Showing 1-2 of 2 results.