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 A125577 #32 Feb 26 2024 01:57:12 %S A125577 1,0,4,5,11,14,22,27,37,44,56,65,79,90,106,119,137,152,172,189,211, %T A125577 230,254,275,301,324,352,377,407,434,466,495,529,560,596,629,667,702, %U A125577 742,779,821,860,904,945,991,1034,1082,1127,1177,1224,1276,1325,1379,1430 %N A125577 a(0) = 1; for n >= 1, a(n) = n^2 - a(n-1). %C A125577 A sequence given by a recurrence that is almost polynomial; it cannot be expressed as a polynomial, but is bounded by n^2. %C A125577 If we let a(0) = 0, the triangular numbers result; a typo led to the new sequence. %H A125577 Vincenzo Librandi, <a href="/A125577/b125577.txt">Table of n, a(n) for n = 0..1000</a> %F A125577 O.g.f.: (-1+2*x-4*x^2+x^3)/((-1+x)^3*(1+x)). a(n) = -n-1+(-1)^n+A000217(n+1). - _R. J. Mathar_, Dec 05 2007 %F A125577 a(n) = n*(n+1)/2 + (-1)^n = A000217(n) + (-1)^n. - _Franklin T. Adams-Watters_, Jul 13 2014 %F A125577 E.g.f.: exp(x)*(x+x^2/2) + exp(-x). - _Franklin T. Adams-Watters_, Jul 13 2014 %e A125577 a(0)=1, so a(1) = 1^2 - 1 = 0; a(2) = 2^2 - 0 = 4; a(3) = 9 - 4 = 5; etc. %t A125577 a[0] := 1 a[n_] := n^2 - a[n - 1] %t A125577 CoefficientList[Series[(-1 + 2 x - 4 x^2 + x^3)/((-1 + x)^3 (1 + x)), {x, 0, 50}], x] (* _Vincenzo Librandi_, May 19 2014 *) %o A125577 (Python) %o A125577 a = 1 %o A125577 for n in range(1,77): %o A125577 print(a, end=',') %o A125577 a = n*n - a %o A125577 (Magma) [1] cat [n le 1 select n-1 else n^2-Self(n-1): n in [1..50]]; // _Vincenzo Librandi_, May 19 2014 %Y A125577 Cf. A000217. %K A125577 nonn,easy %O A125577 0,3 %A A125577 John C. George (John.George(AT)ENMU.edu), Jan 03 2007 %E A125577 Name corrected by _Alex Ratushnyak_, Aug 03 2012