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.

A103457 a(n) = 3^n + 1 - 0^n.

Original entry on oeis.org

1, 4, 10, 28, 82, 244, 730, 2188, 6562, 19684, 59050, 177148, 531442, 1594324, 4782970, 14348908, 43046722, 129140164, 387420490, 1162261468, 3486784402, 10460353204, 31381059610, 94143178828, 282429536482, 847288609444
Offset: 0

Views

Author

Paul Barry, Feb 07 2005

Keywords

Crossrefs

Programs

  • Magma
    [1] cat [3^n + 1: n in [1..30]]; // G. C. Greubel, Jun 22 2021
    
  • Mathematica
    Join[{1},LinearRecurrence[{4,-3},{4,10},30]] (* Harvey P. Dale, Mar 29 2015 *)
  • PARI
    my(x='x+O('x^50)); Vec((1-3*x^2)/((1-x)*(1-3*x))) \\ Altug Alkan, Dec 04 2015
    
  • Sage
    [1]+[3^n + 1 for n in (1..30)] # G. C. Greubel, Jun 22 2021

Formula

G.f.: (1-3*x^2)/((1-x)*(1-3*x)).
a(n) = Sum_{k=0..n} binomial(n, k)*0^(k(n-k))*3^k.
From R. J. Mathar, Aug 04 2008: (Start)
a(n) = A034472(n), n>0.
a(n) = A094388(n-1), n>1.
a(n+1) - a(n) = A110593(n+1). (End)
a(n) = 3*a(n-1) - 2, with a(1)=4. - Vincenzo Librandi, Dec 29 2010
From J. Conrad, Nov 25 2015: (Start)
For n>0, a(n) = 2 * (A011782(0) + A011782(n) + Sum_{x=1..n-1} Sum_{k=0..x-1}(binomial(x-1,k)*(A011782(k+1) + A011782(n-x+k)))).
Alternatively, for n>0, a(n) = A027649(n) - 2 * Sum_{x=1..n-1}Sum_{k=0..x-1}(binomial(x-1,k)*(A011782(k+1) + A011782(n-x+k))). (End)
E.g.f.: -1 + exp(x) + exp(3*x). - G. C. Greubel, Jun 22 2021