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.

A266314 Least positive integer x such that n + x^7 = y^2 + z^2 for some positive integers y and z, or 0 if no such x exists.

Original entry on oeis.org

2, 1, 2, 13, 1, 3, 7, 1, 2, 1, 3, 15, 1, 6, 11, 11, 1, 1, 2, 1, 2, 2, 7, 3, 1, 1, 3, 5, 1, 2, 7, 1, 2, 1, 2, 5, 1, 4, 3, 1, 1, 2, 2, 7, 1, 2, 7, 3, 5, 1, 2, 1, 1, 2, 11, 21, 5, 1, 3, 5, 1, 3, 3, 3, 1, 2, 2, 1, 4, 2, 3
Offset: 0

Views

Author

Zhi-Wei Sun, Dec 27 2015

Keywords

Comments

The general conjecture in A266277 implies that for each odd prime p and any integer m there are positive integers x, y and z such that m + x^p = y^2 + z^2.
For k = 4,6,8,... and any integer m == 6 (mod 8), there are no integers x, y and z with m + x^k = y^2 + z^2 since m + x^k with x an integer is congruent to 6 or 7 modulo 8.
As 2j+1 = (j+1)^2 - j^2, if m - z^k is odd with |m - z^k| > 1 then m + x^2 = y^2 + z^k for some positive integers x and y.

Examples

			a(2) = 2 since 2 + 2^7 = 3^2 + 11^2.
a(3) = 13 since 3 + 13^7 = 554^2 + 7902^2.
a(5) = 3 since 5 + 3^7 = 16^2 + 44^2.
a(6) = 7 since 6 + 7^7 = 30^2 + 907^2.
a(462) = 71 since 462 + 71^7 = 456497^2 + 2981062^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[x=1;Label[bb];Do[If[SQ[n+x^7-y^2],Print[n," ",x];Goto[aa]],{y,1,Sqrt[(n+x^7)/2]}];x=x+1;Goto[bb];Label[aa];Continue,{n,1,70}]
    (* second program: *)
    xmax = 100; r[n_, x_] := Reduce[y>0 && z>0 && n+x^7 == y^2+z^2, {y, z}, Integers]; a[n_] := For[x=1, x <= xmax, x++, If[r[n, x] =!= False, Return[x]]] /. Null -> 0; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Dec 27 2015 *)