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-5 of 5 results.

A075847 Difference between n^2 and the largest cube <= n^2.

Original entry on oeis.org

0, 0, 3, 1, 8, 17, 9, 22, 0, 17, 36, 57, 19, 44, 71, 9, 40, 73, 108, 18, 57, 98, 141, 17, 64, 113, 164, 0, 55, 112, 171, 232, 24, 89, 156, 225, 296, 38, 113, 190, 269, 350, 36, 121, 208, 297, 388, 12, 107, 204, 303, 404, 507, 65, 172, 281, 392, 505, 620, 106, 225, 346
Offset: 0

Views

Author

Zak Seidov and Reinhard Zumkeller, Oct 15 2002

Keywords

Comments

a(n) = n^2 - A077106(n).
a(n) = 0 iff n = m^(6*k).
a(n) = 0 when n is a cube. See A070923.

Examples

			a(4)=8 because 4^2 - 2^3 = 8; a(9)=17 because 9^2 - 4^3 = 17.
A077106(20) = 343 = 7^3 is the largest cube <= 20^2 = 400, therefore a(20) = 400 - 343 = 57.
		

Crossrefs

Programs

Extensions

Edited by N. J. A. Sloane at the suggestion of Zak Seidov, Oct 30 2008

A070923 a(n) is the smallest value >= 0 of the form x^3 - n^2.

Original entry on oeis.org

0, 0, 4, 18, 11, 2, 28, 15, 0, 44, 25, 4, 72, 47, 20, 118, 87, 54, 19, 151, 112, 71, 28, 200, 153, 104, 53, 0, 216, 159, 100, 39, 307, 242, 175, 106, 35, 359, 284, 207, 128, 47, 433, 348, 261, 172, 81, 535, 440, 343, 244, 143, 40, 566, 459, 350, 239, 126, 11, 615, 496
Offset: 0

Views

Author

Benoit Cloitre, May 20 2002

Keywords

Comments

a(n) = 0 if n is a cube (i.e., n is in A000578(k)).
a(n) = A181138(n) if n is not a cube. - Zak Seidov, Mar 26 2013

Crossrefs

Formula

a(n) = ceiling(n^(2/3))^3 - n^2 = A077107(n)-n^2.

Extensions

a(0)=0 prepended by Alois P. Heinz, Mar 07 2022

A077119 a(n) = A077118(n) - n^3.

Original entry on oeis.org

0, 0, 1, -2, 0, -4, 9, 18, 17, 0, 24, -35, 36, 12, -40, -11, 0, -13, -56, 30, -79, -45, -39, -67, 100, 0, 113, -83, -48, -53, -104, 138, -7, 163, -100, -26, 0, -28, -116, 217, 9, 248, -104, 17, 80, 79, 8, -139, 297, 0, 316, -155, 17, 119, 145, 89, -55
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 29 2002

Keywords

Comments

a(n)=0 iff n = m^(6*k).
Values d=x^3-y^2 of extremal points of elliptic Mordell curves. Definition for extremal points see A200656. Each value x has only one value of distance d when coordinate x is extremal point, but for many fixed distances d, the elliptic curve has more than 1 extremal point. - Artur Jasinski, Nov 30 2011
Theorem (Artur Jasinski): If a(n)>0 then a(n)<(4n^(3/2)-1)/4 for every n. If a(n)<0 then a(n)>(-4n^(3/2)-1)/4 for every n. a(n)=0 then n is perfect square. - Artur Jasinski, Dec 08 2011

Examples

			A077118(10)=1024=32^2 is the nearest square to 10^3=1000, therefore a(10)=1024-1000=24.
		

Crossrefs

|a(n)| = A002938(n).

Programs

  • Magma
    [Round(Sqrt(n^3))^2-n^3: n in [0..60]]; // Vincenzo Librandi, Mar 24 2015
    
  • Maple
    A077119 := proc(n)
        (round( sqrt(n^3) ))^2-n^3 ;
    end proc: # R. J. Mathar, Jan 18 2021
  • Mathematica
    Table[Round[Sqrt[x^3]]^2 - x^3, {x, 0, 100}]  (* Artur Jasinski, Nov 30 2011 *)
  • Python
    from math import isqrt
    def A077119(n): return ((m:=isqrt(k:=n**3))+int((k-m*(m+1)<<2)>=1))**2-k # Chai Wah Wu, Jul 29 2022

Formula

a(n) = if A077116(n) < A070929(n) then -A077116(n) else A070929(n).

A077110 Nearest integer cube to n^2.

Original entry on oeis.org

0, 1, 1, 8, 8, 27, 27, 64, 64, 64, 125, 125, 125, 125, 216, 216, 216, 343, 343, 343, 343, 512, 512, 512, 512, 729, 729, 729, 729, 729, 1000, 1000, 1000, 1000, 1000, 1331, 1331, 1331, 1331, 1331, 1728, 1728, 1728, 1728, 1728, 2197, 2197, 2197
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 29 2002

Keywords

Examples

			a(10) = 125, as 125 = 5^3 is the nearest cube to 100 = 10^2.
		

Crossrefs

Cf. A002760 (Squares and cubes). - Zak Seidov, Oct 08 2015

Programs

  • Mathematica
    nic[n_]:=Module[{n2=n^2,s3,c1,c2},s3=Surd[n2,3];c1=Floor[s3]^3;c2= Ceiling[ s3]^3;If[n2-c1Harvey P. Dale, Jul 05 2015 *)
  • Python
    from sympy import integer_nthroot
    def A077110(n):
        n2 = n**2
        a = integer_nthroot(n2,3)[0]
        a2, a3 = a**3, (a+1)**3
        return a3 if a3+a2-2*n2 < 0 else a2 # Chai Wah Wu, Sep 24 2021

Formula

a(n) = if A075847(n) < A070923(n) then A077106(n) else A077107(n).

A073072 Minimum value of abs(n^2-x^3) x>0.

Original entry on oeis.org

0, 3, 1, 8, 2, 9, 15, 0, 17, 25, 4, 19, 44, 20, 9, 40, 54, 19, 18, 57, 71, 28, 17, 64, 104, 53, 0, 55, 112, 100, 39, 24, 89, 156, 106, 35, 38, 113, 190, 128, 47, 36, 121, 208, 172, 81, 12, 107, 204, 244, 143, 40, 65, 172, 281, 239, 126, 11, 106, 225, 346, 252, 127, 0, 129
Offset: 1

Views

Author

Benoit Cloitre, Aug 17 2002

Keywords

Crossrefs

Cf. A002938.

Programs

  • Mathematica
    Table[Min[n^2-Floor[(n^2)^(1/3)]^3,(Floor[(n^2)^(1/3)]+1)^3-n^2],{n,100}] (* Vladimir Joseph Stephan Orlovsky, Feb 01 2012 *)
  • PARI
    a(n)=vecmin(vector(ceil(n^(2/3)),i,abs(n^2-i^3)))

Formula

a(n^3) = 0.
a(n) = abs(A077111(n)). - R. J. Mathar, May 01 2008
Showing 1-5 of 5 results.