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.

A296185 Numbers that are not the sum of 3 squares and an 8th power.

Original entry on oeis.org

112, 240, 368, 496, 624, 752, 880, 1008, 1136, 1264, 1392, 1520, 1648, 1776, 1904, 2032, 2160, 2288, 2416, 2544, 2672, 2800, 2928, 3056, 3184, 3312, 3440, 3568, 3696, 3824, 3952, 4080, 4208, 4336, 4464, 4592, 4720, 4848, 4976, 5104, 5232, 5360, 5488, 5616
Offset: 1

Views

Author

XU Pingya, Jan 13 2018

Keywords

Comments

When m is in this sequence, 9m and m^9 are also in this sequence.
For nonnegative integers a, b, k, n, x, y, z and w, n = x^2 + y^2 + z^2 + w^8 if and only if n is not of the form 4^(4k + 2) * (8b + 7).
1. If n is not of the form 4^a * (8b + 7), then it follows from Legendre's three-square theorem that the equation x^2 + y^2 + z^2 + w^8 = n has a solution with w = 0.
2. If n = 4^a * (8b + 7), then (c, d and j are nonnegative integers):
(1) If a = 4k, then n - (2^k)^8 = 4^(4k) * (8b + 6), and the equation has a solution with w = 2^k.
(2) If a = 4k + 1, then n - (2^k)^8 = 4^(4k) * (32b + 27) is of the form 4^c * (8d + 3), and the equation has a solution with w = 2^k.
(3) If a = 4k + 3, then n - (2^(k + 1))^8 = 4^a * (8b + 3), and the equation has a solution with w = 2^(k + 1).
(4) If a = 4k + 2 and w = 2j + 1, then n == 0 (mod 8), w^8 == 1 (mod 8), and n - w^8 is number of the form 8c + 7. I.e., the equation does not have a solution with w odd.
If a = 4k + 2 and w = 4j + 2, then n - w^8 = 16 * (4^(4k) * (8b + 7) - 16 * (2j + 1)^8) = 4^4 * (4^(4k - 4) * (8b + 7) - (2j + 1)^8). When k = 0, n - w^8 is a number of the form 16 * (8c + 7); when k > 0, n - w^8 is a number of the form 4^4 * (8d + 7). Therefore, the equation does not have a solution with w = 4j + 2. Similarly, it can be proved that there is no solution with w = 4j.

Crossrefs

Programs

  • Mathematica
    t1={};
    Do[Do[If[x^2+y^2+z^2+w^8==n, AppendTo[t1,n]&&Break[]], {x,0,n^(1/2)}, {y,x,(n-x^2)^(1/2)}, {z,y,(n-x^2-y^2)^(1/2)}, {w,0,(n-x^2-y^2-z^2)^(1/8)}], {n,0,5700}];
    t2={};
    Do[If[FreeQ[t1,k]==True, AppendTo[t2,k]], {k,0,5700}];
    t2
  • Python
    from itertools import count, islice
    def A296185_gen(): # generator of terms
        for k in count(0):
            r = 1<<((k<<1)+1<<2)
            yield from range(7*r,r*((r<<8)+7),r<<3)
    A296185_list = list(islice(A296185_gen(),44)) # Chai Wah Wu, May 21 2025