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.

A062781 Number of arithmetic progressions of four terms and any mean which can be extracted from the set of the first n positive integers.

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 5, 7, 9, 12, 15, 18, 22, 26, 30, 35, 40, 45, 51, 57, 63, 70, 77, 84, 92, 100, 108, 117, 126, 135, 145, 155, 165, 176, 187, 198, 210, 222, 234, 247, 260, 273, 287, 301, 315, 330, 345, 360, 376, 392
Offset: 1

Views

Author

Santi Spadaro, Jul 18 2001

Keywords

Comments

This sequence seems to be a shifted version of the Somos sequence A058937.
Equal to the partial sums of A002264 (cf. A130518) but with initial index 1 instead of 0. - Hieronymus Fischer, Jun 01 2007
Apart from offset, the same as A130518. - R. J. Mathar, Jun 13 2008
Apart from offset, the same as A001840. - Michael Somos, Sep 18 2010

Crossrefs

Programs

  • Maple
    seq(coeff(series(x^4/((1-x^3)*(1-x)^2),x,n+1), x, n), n = 1 .. 50); # Muniru A Asiru, Nov 25 2018
  • Mathematica
    RecurrenceTable[{a[0]==0, a[n]==Floor[n/3] + a[n-1]}, a, {n, 49}] (* Jon Maiga, Nov 25 2018 *)
  • Sage
    [floor(binomial(n,2)/3) for n in range(0,50)] # Zerinvary Lajos, Dec 01 2009

Formula

a(n) = P(n,4), where P(n,k) = n*floor(n/(k - 1)) - (1/2)(k - 1)(floor(n/(k - 1))*(floor(n/(k - 1)) + 1)); recursion: a(n) = a(n-3) + n - 3; a(1) = a(2) = a(3) = 0.
From Hieronymus Fischer, Jun 01 2007: (Start)
a(n) = (1/2)*floor((n-1)/3)*(2*n - 3 - 3*floor((n-1)/3)).
G.f.: x^4/((1 - x^3)*(1 - x)^2). (End)
a(n) = floor((n-1)/3) + a(n-1). - Jon Maiga, Nov 25 2018
E.g.f.: ((4 - 6*x + 3*x^2)*exp(x) - 4*exp(-x/2)*cos(sqrt(3)*x/2))/18. - Franck Maminirina Ramaharo, Nov 25 2018