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.

Previous Showing 11-12 of 12 results.

A350977 Numbers k such that x^3 - y^2 = k has no solution.

Original entry on oeis.org

3, 4, 6, 9, 10, 12, 14, 17, 21, 22, 27, 30, 33, 34, 37, 41, 42, 46, 50, 57, 58, 62, 65, 66, 69, 70, 73, 75, 77, 78, 82, 85, 86, 90, 93, 94, 97, 98, 171, 176, 275, 475, 539, 1315, 2288, 2743, 5491
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2022

Keywords

Comments

The 4 seems to be in error here, because x=2, y=2 or x=5, y=11 are a solution to x^3-y^2=4. [No entry here should be in A087285]. - R. J. Mathar, Mar 07 2022
Apparently y>0 is enforced; otherwise x=3, y=0 would solve x^3-y^2=27. - R. J. Mathar, Mar 07 2022

References

  • H. Brocard, Query 2312, L'Intermédiaire des Mathématiciens, 10 (1903), 283-284.

Crossrefs

Cf. A350976. Apparently an erroneous version of A081121.

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.
Previous Showing 11-12 of 12 results.