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.

A215147 For n odd, a(n) = 1^2+2^2+3^2+...+n^2; for n even, a(n) = (1^2+2^2+3^2+...+n^2)+1.

This page as a plain text file.
%I A215147 #25 Feb 22 2024 10:43:25
%S A215147 1,2,5,6,14,15,30,31,55,56,91,92,140,141,204,205,285,286,385,386,506,
%T A215147 507,650,651,819,820,1015,1016,1240,1241,1496,1497,1785,1786,2109,
%U A215147 2110,2470,2471,2870,2871,3311,3312,3795,3796,4324,4325,4900,4901,5525,5526
%N A215147 For n odd, a(n) = 1^2+2^2+3^2+...+n^2; for n even, a(n) = (1^2+2^2+3^2+...+n^2)+1.
%C A215147 Square pyramidal numbers when n is odd.
%C A215147 An interleaving of A000330 and A056520. - _Michel Marcus_, Aug 07 2013
%H A215147 Paolo Xausa, <a href="/A215147/b215147.txt">Table of n, a(n) for n = 1..10000</a>
%H A215147 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-3,-3,3,1,-1).
%F A215147 From _Colin Barker_, Nov 16 2012: (Start)
%F A215147 a(n) = (6*(5+3*(-1)^n)+(13-9*(-1)^n)*n-3*(-3+(-1)^n)*n^2+2*n^3)/48.
%F A215147 G.f.: -x*(x^6-x^5-2*x^4+2*x^3-x-1)/((x-1)^4*(x+1)^3). (End)
%p A215147 for i from 1 to 100 do a(2*i-1):=sum('k^2','k'=1..i);
%p A215147 a(2*i):=a(2*i-1)+1; end do;
%t A215147 LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {1, 2, 5, 6, 14, 15, 30}, 50] (* or *)
%t A215147 Riffle[#, #+1] & [Accumulate[Range[25]^2]] (* _Paolo Xausa_, Feb 22 2024 *)
%Y A215147 Cf. A000330, A056520.
%K A215147 nonn,easy
%O A215147 1,2
%A A215147 _Kritsana Sokhuma_, Aug 04 2012
%E A215147 More terms from _Paolo Xausa_, Feb 22 2024