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 A232397 #51 Dec 23 2024 14:53:43 %S A232397 0,4,5,0,20,3,45,8,80,15,125,24,180,35,245,48,320,63,405,80,500,99, %T A232397 605,120,720,143,845,168,980,195,1125,224,1280,255,1445,288,1620,323, %U A232397 1805,360,2000,399,2205,440,2420,483,2645,528,2880,575,3125,624,3380,675 %N A232397 a(n) = ceiling(sqrt(n^4 + n^3 + n^2 + n + 1))^2 - (n^4 + n^3 + n^2 + n + 1). %C A232397 a(n) = 0 if and only if n^4 + n^3 + n^2 + n + 1 is a perfect square. %C A232397 Using formula below, we immediately prove that a(n)=0 iff n=0 or n=3. This means that all nonnegative solutions of the Diophantine equation n^4 + n^3 + n^2 + n + 1 = m^2 are n=0, m=1 and n=3, m=11. %C A232397 For m >=0, if we also consider negative values of n, we obtain only one more solution: n=-1, m=1. %C A232397 Indeed, if one considers sequence b(n) = ceiling(sqrt(n^4 - n^3 + n^2 - n + 1))^2 - (n^4 - n^3 + n^2 - n +1 ), then, for even n, a(n) = b(n), while for odd n>=3, a(n) = b(n-2). %H A232397 Robert Israel, <a href="/A232397/b232397.txt">Table of n, a(n) for n = 0..10001</a> %H A232397 Max Alekseyev, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2013-November/011886.html">Re: oddness of iterations of sigma()</a>, SeqFan Mailing List. %F A232397 a(1) = 4, for other odd n, a(n) = ((n-1)/2)^2 - 1; for even n>=0, a(n) = 5/4 * n^2. %F A232397 a(n) = A068527(A053699(n)). [Straight from the description: Difference between smallest square >= (n^4 + n^3 + n^2 + n + 1) and (n^4 + n^3 + n^2 + n + 1)]. - _Antti Karttunen_, Nov 28 2013 %F A232397 a(n) = (6*n^2-2*n-3+(4*n^2+2*n+3)*(-1)^n+20*(1-(-1)^(2^abs(n-1))))/8. - _Luce ETIENNE_, Jan 30 2016 %F A232397 G.f.: 4*x+x^2*(x^5-3*x^3-5*x^2-5)/(x^2-1)^3. - _Robert Israel_, Feb 02 2016 %p A232397 0, 4, seq(op([5*k^2, k^2-1]),k=1..100); # _Robert Israel_, Feb 02 2016 %t A232397 Table[Ceiling[Sqrt[n^4 + n^3 + n^2 + n + 1]]^2 - (n^4 + n^3 + n^2 + n + 1), {n, 0, 60}] (* _Vincenzo Librandi_, Jan 31 2016 *) %o A232397 (Magma) [Ceiling(Sqrt(n^4+n^3+n^2+n+1))^2-(n^4+n^3+n^2+n+1): n in [0..60]]; // _Vincenzo Librandi_, Jan 31 2016 %o A232397 (Python) %o A232397 from math import isqrt %o A232397 def A232397(n): return (1+isqrt(m:=n*(n*(n*(n+1)+1)+1)))**2-m-1 # _Chai Wah Wu_, Jul 29 2022 %Y A232397 Cf. A053699, A068527, A232395, A232423. %K A232397 nonn,easy %O A232397 0,2 %A A232397 _Vladimir Shevelev_, Nov 23 2013 %E A232397 More terms from _Peter J. C. Moses_