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

A219222 Numbers that can be expressed as the sum of 2 positive squares but not as the sum of 3 positive squares.

Original entry on oeis.org

2, 5, 8, 10, 13, 20, 25, 32, 37, 40, 52, 58, 80, 85, 100, 128, 130, 148, 160, 208, 232, 320, 340, 400, 512, 520, 592, 640, 832, 928, 1280, 1360, 1600, 2048, 2080, 2368, 2560, 3328, 3712, 5120, 5440, 6400, 8192, 8320, 9472, 10240, 13312, 14848, 20480, 21760
Offset: 1

Views

Author

Michel Marcus, Nov 16 2012

Keywords

Comments

Among these numbers a(n), some of them are not divisible by 4: 2, 5, 10, 13, 25, 37, 58, 85, 130. All members of the sequence can be expressed as a(n) = 4^k*a0, with a0 taken in the set described above, that is A051952 except 1.
Subsequence of A000549. - Chai Wah Wu, Feb 05 2016

Crossrefs

Programs

  • Python
    limit = 21760
    squares_lst = [i*i for i in range(1, int(limit**0.5)+2) if i*i <= limit]
    squares_set = set(squares_lst)
    def sum2squares(n):
      for s in squares_lst:
        if n - s in squares_set: return True
        if n - s < 0: return False
    alst = []
    for m in range(2, limit+1):
      if sum2squares(m):
        sum3 = False
        for s in squares_lst:
          if sum2squares(m - s): sum3 = True; break
          if m - s < 0: break
        if not sum3: alst.append(m)
    print(alst) # Michael S. Branicky, Feb 05 2021

Formula

Empirical g.f.: -x*(2*x^16 +28*x^15 +20*x^14 +33*x^13 +40*x^12 +26*x^11 +32*x^10 +32*x^9 +37*x^8 +32*x^7 +25*x^6 +20*x^5 +13*x^4 +10*x^3 +8*x^2 +5*x +2) / (4*x^9 -1). - Colin Barker, Sep 23 2014

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]
Showing 1-2 of 2 results.