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.

A137213 First differences of A137212.

Original entry on oeis.org

0, 1, 4, 15, 52, 173, 560, 1779, 5576, 17305, 53308, 163287, 497980, 1513541, 4587944, 13878075, 41910032, 126395953, 380795380, 1146267039, 3448170436, 10367130845, 31156000928, 93599839107, 281117798360, 844121793481
Offset: 0

Views

Author

Paul Curtz, Mar 06 2008

Keywords

Crossrefs

Programs

  • Magma
    [n le 3 select (n-1)^2 else 5*Self(n-1) -5*Self(n-2) -3*Self(n-3): n in [1..31]]; // G. C. Greubel, Jan 05 2022
    
  • Mathematica
    LinearRecurrence[{5,-5,-3},{0,1,4},30] (* Harvey P. Dale, Apr 18 2019 *)
  • Sage
    [3^n - lucas_number1(n+1,2,-1) for n in (0..30)] # G. C. Greubel, Jan 05 2022

Formula

From R. J. Mathar, Mar 17 2008: (Start)
O.g.f.: 1/(1-3*x) - 1/(1-2*x-x^2) = x*(1-x)/( (1-3*x)*(1-2*x-x^2) ).
a(n) = 3^n - A000129(n+1). (End)

Extensions

More terms from R. J. Mathar, Mar 17 2008

A193519 a(n) = (2/3)*Sum_{i=1..n-1} A000129(i)*3^(n-i).

Original entry on oeis.org

0, 0, 2, 10, 40, 144, 490, 1610, 5168, 16320, 50930, 157546, 484120, 1480080, 4507162, 13683050, 41439200, 125259264, 378051170, 1139641930, 3432176008, 10328516880, 31062778570, 93374780426, 280574458640, 842810055360, 2531053642322, 7599494558890, 22813774416760, 68478238362384
Offset: 0

Views

Author

N. J. A. Sloane, Jul 29 2011

Keywords

Comments

Number of ternary words of length n on {0,1,2} containing the subwords 02 or 20. - Philippe Deléham, Apr 27 2012

Examples

			a(3) = 10 because among the 3^3 = 27 ternary words of length 3 only 10, namely 002, 020, 021, 022, 102, 120, 200, 201, 202, 220 contain the subwords 02 or 20. - _Philippe Deléham_, Apr 27 2012
		

Crossrefs

Programs

  • Magma
    [n le 3 select 2*Floor((n-1)/2) else 5*Self(n-1) -5*Self(n-2) -3*Self(n-3): n in [1..31]]; // G. C. Greubel, Jan 05 2022
    
  • Mathematica
    Table[(2*3^n - LucasL[n+1, 2])/2, {n, 0, 30}] (* G. C. Greubel, Jan 05 2022 *)
  • Sage
    [(2*3^n - lucas_number2(n+1, 2, -1))/2 for n in (0..30)] # G. C. Greubel, Jan 05 2022

Formula

a(n) = 2*A137212(n).
G.f.: 2*x^2/((1-3*x)*(1-2*x-x^2)). - Philippe Deléham, Apr 27 2012
a(n) = 5*a(n-1) - 5*a(n-2) - 3*a(n-3), a(0) = a(1) = 0, a(2) = 2. - Philippe Deléham, Apr 27 2012
a(n) = (1/2)*(2*3^n - A002203(n+1)). - G. C. Greubel, Jan 05 2022
Showing 1-2 of 2 results.