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.

A143101 Partial sums of A143097.

Original entry on oeis.org

1, 3, 7, 10, 15, 22, 28, 36, 46, 55, 66, 79, 91, 105, 121, 136, 153, 172, 190, 210, 232, 253, 276, 301, 325, 351, 379, 406, 435, 466, 496, 528, 562, 595, 630, 667, 703, 741, 781, 820, 861, 904, 946, 990, 1036, 1081, 1128, 1177, 1225, 1275, 1327, 1378, 1431
Offset: 1

Views

Author

Gary W. Adamson, Jul 24 2008

Keywords

Examples

			a(3) = 7 = T(3) + 1 since 3 == 0 mod 3 and T(3) = 6.
a(4) = 10 = T(4) since 4 == 1 mod 3.
		

Crossrefs

Programs

  • Maple
    A143097 := proc(n) if(n<=1)then return n: elif(n mod 3 <= 1)then return n+1-2*(n mod 3): else return n: fi: end: A143101 := proc(n) option remember: if(n=0)then return 0:else return procname(n-1)+A143097(n):fi: end:seq(A143101(n),n=1..60); # Nathaniel Johnston, Apr 30 2011
  • Mathematica
    With[{nn=70},Accumulate[Join[{1},Riffle[Rest[Select[Range[nn], !Divisible[ #,3]&]], Range[3,nn,3],3]]]] (* Harvey P. Dale, May 06 2012 *)
  • PARI
    a(n)=n*(n+1)/2+if(n%3==0,1,0) \\ Luc Rousseau, Jun 18 2017

Formula

G.f.: x(1+x+2x^2-2x^3+x^4)/((1-x)^3(1+x+x^2)). [R. J. Mathar, Sep 06 2008]
a(n) = n*(n+1)/2 + (3|n) = A000217(n) + A079978(n). - Luc Rousseau, Jun 18 2017

Extensions

a(18) corrected by Nathaniel Johnston, Apr 30 2011