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.

A200672 Partial sums of A173862.

Original entry on oeis.org

1, 2, 3, 5, 7, 9, 13, 17, 21, 29, 37, 45, 61, 77, 93, 125, 157, 189, 253, 317, 381, 509, 637, 765, 1021, 1277, 1533, 2045, 2557, 3069, 4093, 5117, 6141, 8189, 10237, 12285, 16381, 20477, 24573, 32765, 40957, 49149, 65533, 81917, 98301, 131069, 163837, 196605
Offset: 1

Views

Author

Jeremy Gardiner, Nov 20 2011

Keywords

Comments

Partial sums of powers of 2 repeated 3 times.

Examples

			a(4) = 1+1+1+2 = 5.
		

Crossrefs

Programs

  • BASIC
    for i=0 to 12 : for j=1 to 3 : s=s+2^i : print s : next j : next i
    
  • Magma
    I:=[1,2,3,5]; [n le 4 select I[n] else Self(n-1) + 2*Self(n-3)- 2*Self(n-4): n in [1..50]]; // Vincenzo Librandi, Nov 16 2018
  • Mathematica
    CoefficientList[Series[(1 + x + x^2) / ((x - 1) (2 x^3 - 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Nov 16 2018 *)
    Accumulate[Flatten[Table[PadRight[{},3,2^n],{n,0,20}]]] (* or *) LinearRecurrence[ {1,0,2,-2},{1,2,3,5},60] (* Harvey P. Dale, Jul 12 2022 *)

Formula

G.f.: x*(1+x+x^2) / ( (x-1)*(2*x^3-1) ). - R. J. Mathar, Nov 28 2011
a(3*n) = 3*(2^n-1) = 3*A000225(n). - Philippe Deléham, Mar 13 2013
a(n) = 2*a(n-3) + 3 for n > 3. - Yuchun Ji, Nov 16 2018