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.
%I A087958 #11 Apr 25 2025 01:21:46 %S A087958 1,5,2,17,18,67,104,287,532,1289,2598,5933,12438,27639,59020,129499, %T A087958 278920,608397,1315658,2861929,6200506,13470635,29210224,63421623, %U A087958 137581660,298636305,647959662,1406286917,3051529598,6622430687 %N A087958 a(n) is the square of the n-th partial sum minus the n-th partial sum of the squares, divided by a(n-1), for all n>=1, starting with a(0)=1, a(1)=5. %H A087958 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-1). %F A087958 a(n) = a(n-1) + 3*a(n-2) - a(n-3) for n>3. %F A087958 G.f.: (1+4*x-6*x^2+x^3)/(1-x-3*x^2+x^3). %e A087958 a(4) = 18 since ((1+5+2+17)^2 - (1^2+5^2+2^2+17^2))/17 = (25^2-319)/17 = 18. %t A087958 Join[{1},LinearRecurrence[{1,3,-1},{5,2,17},30]] (* _Harvey P. Dale_, Jul 07 2011 *) %o A087958 (PARI) a(0)=1; a(1)=5; for(n=2,50,a(n)=((sum(k=0,n,a(k))^2-sum(k=0,n,a(k)^2))/a(n-1)) %Y A087958 Cf. A087640, A087955, A087956, A087957. %K A087958 nonn,easy %O A087958 0,2 %A A087958 _Paul D. Hanna_, Sep 16 2003