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

A087285 Possible differences between a cube and the next smaller square.

Original entry on oeis.org

2, 4, 7, 11, 13, 15, 19, 20, 26, 28, 35, 39, 40, 45, 47, 48, 49, 53, 55, 56, 60, 63, 67, 74, 76, 79, 81, 83, 100, 104, 107, 109, 116, 127, 135, 139, 146, 147, 148, 150, 152, 155, 170, 174, 180, 184, 186, 191, 193, 200, 207, 212, 215, 216, 233, 235, 242, 244, 249
Offset: 1

Views

Author

Hugo Pfoertner, Sep 18 2003

Keywords

Comments

Sequence and program were provided by Ralf Stephan Aug 28 2003.
Comment from David W. Wilson, Jan 05 2009: I believe there is an algorithm for solving x^3 - y^2 = k, which should have a finite number of solutions for any k. That means that we should in principle be able to compute this sequence.
Up to the initial 0 in A165288, these two sequences appear to be the same, but according to its current definition, A165288 should be the same as the (different) sequence A229618 = the range of the sequence A181138 (= least k>0 such that n^2+k is a cube): If n^2+k=y^3 is the smallest cube above n^2, then n^2 is not necessarily the largest square below y^3. E.g., 18 is in A181138 and A229618, since 9+18=27 is the least cube above 9=3^2, but 25=5^2 is the largest square below 27. - M. F. Hasler, Oct 05 2013

Examples

			a(1)=2 because the next smaller square below 3^3=27 is 5^2=25.
		

References

Crossrefs

Programs

  • PARI
    v=vector(200):for(n=2,10^7,t=n^3:s=sqrtint(t)^2: if(s==t,s=sqrtint(t-1)^2):tt=t-s: if(tt>0&&tt<=200&&!v[tt],v[tt]=n)):for(k=1,200,if(v[k],print1(k",")))

A152412 Nonnegative numbers of the form s^2-m^5, m>=1.

Original entry on oeis.org

0, 3, 4, 8, 11, 13, 15, 17, 24, 26, 32, 35, 37, 46, 48, 49, 63, 65, 68, 80, 81, 89, 93, 99, 112, 118, 120, 124, 132, 137, 143, 145, 157, 164, 168, 169, 193, 195, 198, 201, 224, 239, 241, 255, 257, 272, 286, 288, 292, 323, 324, 329, 333, 340, 345, 354, 356, 360, 368, 382, 399, 409, 420, 433, 440, 452, 475, 483, 486, 487, 489, 497
Offset: 1

Views

Author

N. J. A. Sloane, Oct 24 2009, based on email from Joerg Arndt, Oct 10 2009

Keywords

Crossrefs

Programs

  • PARI
    for(k=0, 500, for(n=1, 10^5, t=n^5+k; if(issquare(t), print1(k, ", "); break()) ) );

Extensions

More terms from Zak Seidov, Oct 24 2009
Definition edited by R. J. Mathar, Mar 12 2010

A229618 Numbers that are the distance between a square and the next larger cube.

Original entry on oeis.org

1, 2, 4, 7, 11, 13, 15, 18, 19, 20, 25, 26, 28, 35, 39, 40, 44, 45, 47, 48, 49, 53, 54, 55, 56, 60, 61, 63, 67, 71, 72, 74, 76, 79, 81, 83, 87, 100, 104, 106, 107, 109, 112, 116, 118, 126, 127, 128, 135, 139, 143
Offset: 1

Views

Author

M. F. Hasler, Sep 26 2013

Keywords

Comments

This is the range of the sequence A181138 (= least k>0 such that n^2+k is a cube). Note that this is not the same as A087285 = range of A077116 = difference between a cube and the next smaller square: If n^2+k = y^3 is the smallest cube above n^2, then n^2 is not necessarily the largest square below y^3, e.g., 9+18 = 27 = 3^3 is the least cube above 9 = 3^2, but 25 = 5^2 is the largest square below 27. Therefore the number 18 is in this sequence, but not in A087285.
See A077116 and A181138 and A179386 for motivations.
Apart from the leading 1, this is a subsequence of A106265, which does not require the square to be the next smaller one: For example, 23 = 27 - 4 = 3^3 - 2^2 is in A106265 but not in this sequence. A165288 is a subsequence of this one, except for the initial term.

Examples

			a(1) = 1 = 1^3-0^2 (but this is the only solution to y^3-x^2 = 1).
a(2) = 2 = 27-25 (= 3^3-5^2), and this is the only solution to y^3-x^2 = 2.
The number 3 is not in the sequence since there are no x, y > 0 such that y^3-x^2 = 3.
a(3) = 4 = 8-4 (= 2^3-2^2) = 125-121 (= 5^3-11^2); these are the only two solutions to y^3-x^2 = 4, for all x>11, the minimal positive y^3-x^2 is 7.
		

Crossrefs

A088017 Numbers not expressible as sum or difference of a nonzero cube and a nonzero square.

Original entry on oeis.org

6, 14, 16, 21, 27, 29, 32, 34, 42, 46, 51, 58, 59, 62, 66, 69, 70, 75, 77, 78, 84, 85, 86, 88, 90, 93, 96, 102, 103, 110, 111, 114, 115, 123, 125, 130, 133, 137, 140, 144, 149, 157, 158, 160, 162, 165, 166, 173, 176, 178, 179, 181, 182, 183, 187, 194, 201, 202, 203
Offset: 1

Views

Author

Hugo Pfoertner, Sep 18 2003

Keywords

Comments

Numbers n such that neither variant of Mordell's equation y^2=x^3+n (A054504) or y^2=x^3-n (A081121) has an integral solution with nonzero x and y. - Jack Brennen, Aug 28 2003

Examples

			16 is in the sequence because the only integral solution to Mordell's equation y^2 = x^3 +- 16 is (y=4,x=0). 49 is not in the sequence because it can also be expressed as 65^3-524^2.
		

Crossrefs

A165289 Nonnegative integers of the form m^2 - floor(m^(2/3))^3 where m is a positive integer.

Original entry on oeis.org

0, 1, 3, 8, 9, 12, 15, 17, 18, 19, 22, 24, 30, 36, 37, 38, 40, 44, 55, 57, 64, 65, 68, 71, 73, 79, 80, 89, 97, 98, 100, 101, 106, 107, 108, 112, 113, 119, 121, 128, 129, 138, 141, 145, 148, 151, 154, 156, 161, 163, 164, 168, 169, 171, 172, 190, 196, 197, 198, 204, 208
Offset: 1

Views

Author

Keywords

Comments

The positive terms form a subsequence of A087286. Some terms of A087286 are missing here, the smallest such number being 3781 = (6^3)^2 - (6^2-1)^3. [From Max Alekseyev, Jun 19 2011]

Crossrefs

Programs

  • Mathematica
    lst={}; Do[a=(x=n^2)-(y=Floor[(n^2)^(1/3)]^3); If[a<=416,AppendTo[lst,a]], {n,8!}]; Take[Union@lst,100]

Extensions

Minor edits by N. J. A. Sloane, Oct 24 2009
Definition corrected by Max Alekseyev, Jun 19 2011

A228948 Numbers n such that n^3 + k^2 = m^3 for some k>0, m>0.

Original entry on oeis.org

6, 7, 11, 23, 24, 26, 28, 31, 38, 42, 44, 47, 54, 55, 61, 63, 84, 91, 92, 95, 96, 99, 104, 110, 111, 112, 118, 119, 124, 138
Offset: 1

Views

Author

M. F. Hasler, Oct 05 2013

Keywords

Comments

Cube root of perfect cubes in A087285 or in A229618 are in the present sequence, but this does not yield all terms, because these sequences require k^2 to be the largest square < m^3.
Numbers k such that Mordell's equation y^2 = x^3 - k^3 has more than 1 integral solution. (Note that it is necessary that x is positive.) In other words, numbers k such that Mordell's equation y^2 = x^3 - k^3 has solutions other than the trivial solution (k,0). - Jianing Song, Sep 24 2022

Examples

			6 is a term since the equation y^2 = x^3 - 6^3 has 5 solutions (6,0), (10,+-28), and (33,+-189). - _Jianing Song_, Sep 24 2022
		

Crossrefs

Cube root of A179419.
Cf. A356709, A356720. Complement of A356713.

Extensions

More terms added by Jianing Song, Sep 24 2022 based on A179419.

A125643 Squares and cubes (with repetition).

Original entry on oeis.org

0, 0, 1, 1, 4, 8, 9, 16, 25, 27, 36, 49, 64, 64, 81, 100, 121, 125, 144, 169, 196, 216, 225, 256, 289, 324, 343, 361, 400, 441, 484, 512, 529, 576, 625, 676, 729, 729, 784, 841, 900, 961, 1000, 1024, 1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 1600, 1681
Offset: 1

Views

Author

Zak Seidov, Oct 19 2006

Keywords

Comments

Repeating terms are sixth powers: 0,1,64,729,... (A001014).
For numbers not appearing as a difference between a square and an adjacent cube in this list, see A054504 and A081121.

Crossrefs

Cf. A002760 (squares and cubes (without repetitions)).

Programs

  • Mathematica
    m=1681;cm=Floor[m^(1/3)];sm=Floor[Sqrt[m]];s=Range[0,sm]^2;c=Range[0,cm]^3;Sort[Join[s,c]] (* James C. McMahon, Dec 20 2024 *)
  • Python
    from math import isqrt
    from sympy import integer_nthroot
    def A125643(n):
        if n <= 4: return n-1>>1
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n-2+x-integer_nthroot(x,3)[0]-isqrt(x)
        return bisection(f,n-2,n-2) # Chai Wah Wu, Oct 14 2024

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jul 14 2007

A152411 Nonnegative integers representable as m^2 - n^4 for positive integers m,n.

Original entry on oeis.org

0, 3, 8, 9, 15, 19, 20, 24, 33, 35, 40, 48, 51, 63, 65, 68, 73, 80, 84, 88, 99, 104, 105, 115, 120, 128, 129, 143, 144, 148, 153, 159, 163, 168, 175, 180, 185, 195, 200, 201, 208, 209, 216, 224, 225, 228, 240, 243, 255, 260, 273, 275, 280, 288, 289, 303, 304, 308, 319, 320
Offset: 1

Views

Author

N. J. A. Sloane, Oct 24 2009, based on email from Joerg Arndt, Oct 10 2009

Keywords

Comments

Nonnegative integers representable as the product u*v with (u-v)/2 being a positive square.

Crossrefs

Programs

  • Maple
    filter:= proc(x) local d,u;
      d:= select(t -> t^2 > x, numtheory:-divisors(x));
      for u in d do if issqr((u-x/u)/2) then return true fi od;
      false
    end proc:
    filter(0):= true:
    select(filter, [$0..1000]); # Robert Israel, Nov 06 2017
  • Mathematica
    filterQ[x_] := Catch[With[{d = Select[Divisors[x], #^2 > x&]}, Do[If[IntegerQ[Sqrt[(u-x/u)/2]], Throw[True]], {u, d}]; Throw[False]]];
    filterQ[0] = True;
    Select[Range[0, 1000], filterQ] (* Jean-François Alcover, Jul 24 2020, after Robert Israel *)
  • PARI
    for(k=1,1000, fordiv(k,d, if(d*d>=k,break); if( issquare((k\d - d)/2), print1(k,", "); break) ) )

Extensions

Edited and extended by Max Alekseyev, Feb 06 2010

A374754 a(n) is the difference between the sum of the squares and the sum of the cubes for the n first terms of A002760.

Original entry on oeis.org

0, 0, 4, -4, 5, 21, 46, 19, 55, 104, 104, 185, 285, 406, 281, 425, 594, 790, 574, 799, 1055, 1344, 1668, 1325, 1686, 2086, 2527, 3011, 2499, 3028, 3604, 4229, 4905, 4905, 5689, 6530, 7430, 8391, 7391, 8415, 9504, 10660, 11885, 13181, 11850, 13219, 14663, 16184
Offset: 1

Views

Author

Felix Huber, Jul 28 2024

Keywords

Comments

For A002760(n) <= k < A002760(n+1), the difference between the sum of the squares and the sum of the cubes in the first k nonnegative integers is a(n).

Examples

			a(7) = a(6) + A002760(7) = 21 + 1*25 = 46, since 25 is a square but not a cube.
a(8) = a(7) - A002760(8) = 46 + (-1)*27 = 19, since 27 is a cube but not a square.
a(11) = a(10) + A002760(11) - A002760(11) = 104 + 0*64 = 104, since 64 is a square and a cube.
The difference between the sum of the squares and the sum of the cubes in the first 24 nonnegative integers is a(6) = 21, because A002760(6) = 16 <= 24 < A002760(7) = 25.
		

Crossrefs

Cf. A000330 (sum of squares), A000537 (sum of cubes), A001014 (sixth powers), A002760 (squares and cubes), A061023, A087285, A087286.

Programs

  • Maple
    isA374754:=proc(k)
       option remember;
       if k=0 then 0
       elif issqr(k) and not type(root(k,3),integer) then procname(k-1)+k;
       elif type(root(k,3),integer) and not issqr(k) then procname(k-1)-k;
       else procname(k-1)
       fi;
    end proc;
    A374754:=k->
       if k=0 then 0
       elif isA374754(k)<>isA374754(k-1) or type(root(k,6),integer) then isA374754(k)
       fi;
    seq(A374754(k),k=0..1521);
  • PARI
    lista(nn) = my(v = select(x->issquare(x) || ispower(x, 3), [0..nn]), s=0, w = vector(#v)); for (i=1, #v, if (issquare(v[i]), s += v[i]); if (ispower(v[i], 3), s -= v[i]); w[i] = s;); w; \\ Michel Marcus, Aug 04 2024
    
  • Python
    from math import isqrt
    from sympy import integer_nthroot
    def A374754(n):
        def f(x): return n-1+x+integer_nthroot(x,6)[0]-(b:=integer_nthroot(x,3)[0])-(a:=isqrt(x)), a, b
        m = n-1
        k, a, b = f(n-1)
        while m != k:
            m = k
            k, a, b = f(k)
        return a*(a+1)*((a<<1)+1)//3-((b*(b+1))**2>>1)>>1 # Chai Wah Wu, Aug 09 2024

Formula

a(1) = 0. For n >= 2, a(n) = a(n-1) + f*A002760(n) where f = 1 if A002760(n) is a square but not a cube, f = -1 if A002760(n) is a cube but not a square and f = 0 if A002760(n) is a square and a cube.
Showing 1-9 of 9 results.