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.

A301858 Positive integers which can be written as the sum of two squares but cannot be written as x^2 + y^2 + 2*z^2 with x and y integers and z a nonzero integer.

Original entry on oeis.org

1, 5, 29, 65
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 27 2018

Keywords

Comments

The sequence has no term in the interval [66, 10^6].
Conjecture 1: The sequence only has the four terms 1, 5, 29 and 65.
Conjecture 2: For any integer n > 1 which is neither 17 nor a power of 2, if n = u^2 + 2*v^2 for some integers u and v, then n = x^2 + 2*y^2 + 3*z^2 for some integers x,y,z with z nonzero.
Conjecture 3: For any positive integer n not of the form 4^k*m (k = 0,1,2,... and m = 1, 7, 13), if n = u^2 + 3*v^2 for some integers u and v, then n = x^2 + 2*y^2 + 3*z^2 for some integers x,y,z with y nonzero.

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n];
    g[n_]:=g[n]=Sum[Boole[Mod[Part[Part[f[n],i],1],4]==3&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0;
    QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]);
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[If[QQ[m]==False,Goto[aa]];Do[If[SQ[m-2x^2-y^2],Goto[aa]],{x,1,Sqrt[m/2]},{y,0,Sqrt[(m-2x^2)/2]}];tab=Append[tab,m];Label[aa],{m,1,1000}];Print[tab]