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.

A290472 Number of ways to write 6*n+1 as x^2 + 3*y^2 + 7*z^2, where x is a positive integer, and y and z are nonnegative integers.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 3, 3, 1, 1, 4, 1, 3, 1, 9, 1, 1, 2, 4, 3, 3, 3, 5, 1, 4, 2, 6, 3, 6, 1, 4, 2, 3, 1, 7, 3, 3, 3, 6, 2, 3, 2, 15, 2, 5, 2, 4, 2, 2, 7, 6, 3, 6, 2, 11, 3, 7, 3, 6, 4, 5, 2, 11, 4, 3, 1, 7, 3, 2, 4, 17, 2, 3, 3, 8, 2, 5, 7, 9, 4, 4, 2, 13, 1, 13, 1, 5, 4, 3, 4, 6, 7, 7, 3, 10, 4, 6, 3, 20, 3
Offset: 0

Views

Author

Zhi-Wei Sun, Aug 03 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 1, 2, 4, 5, 9, 10, 12, 14, 16, 17, 24, 30, 34, 66, 84, 86, 116, 124, 152, 286.
We also conjecture that {6n+5: n = 0,1,2,...} is a subset of {2x^2+3y^2+5z^2: x,y,z are nonnegative integers with y > 0}.
See A286885 for more similar conjectures.
In support of the first conjecture, a(n) > 1 for 286 < n <= 10^7. - Charles R Greathouse IV, Aug 04 2017

Examples

			a(4) = 1 since 6*4+1 = 5^2 + 3*0^2 + 7*0^2.
a(5) = 1 since 6*5+1 = 2^2 + 3*3^2 + 7*0^2.
a(9) = 1 since 6*9+1 = 6^2 + 3*2^2 + 7*1^2.
a(116) = 1 since 6*116+1 = 9^2 + 3*14^2 + 7*2^2.
a(124) = 1 since 6*124+1 = 21^2 + 3*8^2 + 7*4^2.
a(152) = 1 since 6*152+1 = 19^2 + 3*10^2 + 7*6^2.
a(286) = 1 since 6*286+1 = 11^2 + 3*14^2 + 7*12^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=n>0&&IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[6n+1-3y^2-7z^2],r=r+1],{y,0,Sqrt[(6n+1)/3]},{z,0,Sqrt[(6n+1-3y^2)/7]}];Print[n," ",r],{n,0,100}]
  • PARI
    a(n)=my(s=6*n+1,t); sum(z=0,sqrtint((s-1)\7), t=s-7*z^2; sum(y=0,sqrtint((t-1)\3), issquare(t-3*y^2))) \\ Charles R Greathouse IV, Aug 03 2017
    
  • PARI
    first(n)=my(v=vector(n+1),mx=6*n+1,s,t,u); for(x=1,sqrtint(mx), s=x^2; for(y=0,sqrtint((mx-s)\3), t=s+3*y^2; for(z=0,sqrtint((mx-t)\7), u=t+7*z^2; if(u%6==1, v[u\6+1]++)))); v \\ Charles R Greathouse IV, Aug 03 2017