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.

A026476 For n>3, a(n) = 7*n - 21 + 2*(-1)^n.

Original entry on oeis.org

1, 3, 4, 9, 12, 23, 26, 37, 40, 51, 54, 65, 68, 79, 82, 93, 96, 107, 110, 121, 124, 135, 138, 149, 152, 163, 166, 177, 180, 191, 194, 205, 208, 219, 222, 233, 236, 247, 250, 261, 264, 275, 278, 289, 292, 303, 306, 317, 320, 331, 334, 345, 348, 359, 362, 373, 376
Offset: 1

Views

Author

Keywords

Comments

The old definition of this sequence was "a(n) = least positive integer > a(n-1) and not equal to a(i)+a(j)+a(k) for 1<=i<=j<=k<=n". However, Ralf Stephan observes that this does not fit the terms shown. (It produces A109474.) The present definition (due to Stephan) has been adopted as a temporary solution. It would be nice to have a definition similar to the original one. - N. J. A. Sloane, Nov 24 2004
From Philippe Deléham, Nov 21 2016: (Start)
First differences are 2, 1, 5, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11,...
For n>3, numbers that are congruent to 9 or 12 mod 14. (End)

Crossrefs

Programs

  • Magma
    [1,3,4] cat [7*n - 21 + 2*(-1)^n: n in [4..60]]; // Vincenzo Librandi, Oct 18 2013
    
  • Mathematica
    CoefficientList[Series[(1 + 2 x + 3 x^3 + 2 x^4 + 6 x^5)/((1 - x)^2 (1 + x)), {x, 0, 60}], x] (* Vincenzo Librandi, Oct 18 2013 *)
  • PARI
    a(n) = if(n>3, 7*n - 21 + 2*(-1)^n, [1,3,4][n]) \\ Charles R Greathouse IV, Nov 21 2016

Formula

a(n) = a(n-1)+a(n-2)-a(n-3) for n>6. G.f.: x*(1+2*x+3*x^3+2*x^4+6*x^5)/((1-x)^2*(1+x)). - Colin Barker, May 02 2012

Extensions

More terms from David Duran (dduran(AT)ashland.edu), Dec 14 2005