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.

A167390 Partial sums of A137442.

Original entry on oeis.org

1, 3, 7, 10, 19, 24, 40, 46, 71, 78, 114, 122, 171, 181, 245, 256, 337, 349, 449, 462, 583, 597, 741, 756, 925, 942, 1138, 1156, 1381, 1400, 1656, 1676, 1965, 1986, 2310, 2332, 2693, 2716, 3116, 3140, 3581, 3607, 4091, 4118, 4647, 4675, 5251, 5280, 5905, 5935
Offset: 1

Views

Author

Gerald Hillier, Nov 02 2009

Keywords

Examples

			a(14)=1+2+4+3+9+5+16+6+25+7+36+8+49+10=181
		

Programs

  • Mathematica
    Module[{nn=40,sq,int,len},sq=Range[nn]^2;int=Complement[Range[nn],sq];len=Min[ Length[ int],nn]; Riffle[Take[ sq,len],Take[ int,len]]]//Accumulate (* Harvey P. Dale, Jun 11 2024 *)

Formula

Set R(N)=N+ROUND(SQRT(N),0), S(N)=FLOOR(SQRT(R(N))), U(N)=R(N)*(R(N)+1)/2-S(N)*(S(N)+1)*(S(N)+.5)/3, T(N)=CEILING(N/2), then a(N)=T(N)*(1+T(N)*(3+2*T(N)))/6+U(FLOOR(N/2))

Extensions

Terms a(15) and above from Gerald Hillier, Jan 06 2022