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.

A157130 Partial sums of A128201.

This page as a plain text file.
%I A157130 #16 Sep 08 2022 08:45:41
%S A157130 1,4,8,13,20,29,40,53,68,84,101,120,141,164,189,216,245,276,309,344,
%T A157130 380,417,456,497,540,585,632,681,732,785,840,897,956,1017,1080,1144,
%U A157130 1209,1276,1345,1416,1489,1564,1641,1720,1801,1884,1969,2056,2145,2236,2329
%N A157130 Partial sums of A128201.
%F A157130 a(n) = (n-r)^2+(4*r^3+6*r^2+2*r)/3 where r = floor((sqrt(1+8*n)-1)/4). - Simplified by _Gerald Hillier_, Apr 14 2015
%e A157130 First three terms of A128201 are 1, 3, 4, hence a(3) = 1+3+4 = 8.
%o A157130 (Magma) [(n-r)^2+(4*r^3+6*r^2+2*r)/3 where r is Floor((Sqrt(1+8*n)-1)/4): n in [1..51]];
%o A157130 (PARI) {for(n=1, 51, r=floor((sqrt(1+8*n)-1)/4); print1((n-r)^2+(4*r^3+6*r^2+2*r)/3, ","))}
%Y A157130 Cf. A128201 (union of A000290 and A005408), A000290 (squares), A005408 (odd numbers).
%K A157130 nonn
%O A157130 1,2
%A A157130 _Gerald Hillier_, Feb 23 2009
%E A157130 Edited and extended by _Klaus Brockhaus_, Feb 24 2009