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.

Showing 1-2 of 2 results.

A232397 a(n) = ceiling(sqrt(n^4 + n^3 + n^2 + n + 1))^2 - (n^4 + n^3 + n^2 + n + 1).

Original entry on oeis.org

0, 4, 5, 0, 20, 3, 45, 8, 80, 15, 125, 24, 180, 35, 245, 48, 320, 63, 405, 80, 500, 99, 605, 120, 720, 143, 845, 168, 980, 195, 1125, 224, 1280, 255, 1445, 288, 1620, 323, 1805, 360, 2000, 399, 2205, 440, 2420, 483, 2645, 528, 2880, 575, 3125, 624, 3380, 675
Offset: 0

Views

Author

Vladimir Shevelev, Nov 23 2013

Keywords

Comments

a(n) = 0 if and only if n^4 + n^3 + n^2 + n + 1 is a perfect square.
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.
For m >=0, if we also consider negative values of n, we obtain only one more solution: n=-1, m=1.
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).

Crossrefs

Programs

  • 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
    
  • Maple
    0, 4, seq(op([5*k^2, k^2-1]),k=1..100); # Robert Israel, Feb 02 2016
  • Mathematica
    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 *)
  • Python
    from math import isqrt
    def A232397(n): return (1+isqrt(m:=n*(n*(n*(n+1)+1)+1)))**2-m-1 # Chai Wah Wu, Jul 29 2022

Formula

a(1) = 4, for other odd n, a(n) = ((n-1)/2)^2 - 1; for even n>=0, a(n) = 5/4 * n^2.
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
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
G.f.: 4*x+x^2*(x^5-3*x^3-5*x^2-5)/(x^2-1)^3. - Robert Israel, Feb 02 2016

Extensions

More terms from Peter J. C. Moses

A232423 a(n) = ceiling(sqrt(n^4 - n^3 - n^2 + n + 1))^2 - (n^4 - n^3 - n^2 + n + 1).

Original entry on oeis.org

0, 0, 2, 0, 15, 3, 38, 8, 71, 15, 114, 24, 167, 35, 230, 48, 303, 63, 386, 80, 479, 99, 582, 120, 695, 143, 818, 168, 951, 195, 1094, 224, 1247, 255, 1410, 288, 1583, 323, 1766, 360, 1959, 399, 2162, 440, 2375, 483, 2598, 528, 2831, 575, 3074, 624, 3327, 675
Offset: 0

Views

Author

Vladimir Shevelev, Nov 23 2013

Keywords

Comments

a(n)=0, iff n^4 - n^3 - n^2 + n + 1 is a perfect square.
One can prove that a(n)=0 iff n=0, 1 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 or 1, m=1 and n=3, m=7.
For m>=0, if we also consider negative values of n, we obtain only one more solution: n=-1, m=1.
Indeed, if we consider 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, b(n) = a(n) + 2*n, while for odd n, b(n) = a(n+2).

Crossrefs

Programs

  • Python
    from math import isqrt
    def A232423(n): return (1+isqrt(m:=n*(n*(n*(n-1)-1)+1)))**2-m-1 # Chai Wah Wu, Jul 29 2022

Formula

For odd n>=3, a(n) = A232397(n); for even n>=2, a(n) = 5/4 * n^2 - n - 1.

Extensions

More terms from Peter J. C. Moses
Showing 1-2 of 2 results.