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.

A106832 4*n-2 and 6*n alternatively.

Original entry on oeis.org

2, 6, 6, 12, 10, 18, 14, 24, 18, 30, 22, 36, 26, 42, 30, 48, 34, 54, 38, 60, 42, 66, 46, 72, 50, 78, 54, 84, 58, 90, 62, 96, 66, 102, 70, 108, 74, 114, 78, 120, 82, 126, 86, 132, 90, 138, 94, 144, 98, 150
Offset: 1

Views

Author

Zak Seidov, May 19 2005

Keywords

Programs

  • Magma
    &cat[[4*n-2,6*n]: n in [1..25]]; // Bruno Berselli, Sep 26 2011
  • Maple
    a:=n->add(2+add((-1)^j, j=2..n),j=1..n):seq(a(n),n=1..69); # Zerinvary Lajos, Dec 13 2008
  • Mathematica
    Flatten[Table[{4n-2,6n},{n,30}]] (* or *) LinearRecurrence[{0,2,0,-1},{2,6,6,12},60] (* Harvey P. Dale, Aug 14 2013 *)

Formula

a(n) = n*(3 - (n mod 2)).
From Bruno Berselli, Sep 26 2011: (Start)
G.f.: 2*x*(1+3*x+x^2)/(1-x^2)^2.
a(n) = (1/2)*((-1)^n+5)*n.
a(n) = -a(-n) = A195013(n) - A195013(-n). (End)
a(n) = 2*a(n-2) - a(n-4); a(1)=2, a(2)=6, a(3)=6, a(4)=12. - Harvey P. Dale, Aug 14 2013

Extensions

Definition corrected by Bruno Berselli, Sep 26 2011