The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A306968 Numbers prime to 7 that are not represented by x^2+y^2+7*z^2. 0

%I #17 Aug 27 2019 04:22:33

%S 3,6,19,22,31,51,55,66,94,139,142,159,166,214,235,283,439,534,559,670,

%T 874,946,1726,2131,2419,3559,4759

%N Numbers prime to 7 that are not represented by x^2+y^2+7*z^2.

%C If it exists, a(28) > 10^7. - _Andrew Howroyd_, Aug 17 2019

%H Irving Kaplansky, <a href="https://doi.org/10.1090/S0025-5718-1995-1265017-2">The first nontrivial genus of positive definite ternary forms</a>, Mathematics of Computation, Vol. 64 (1995): 341-345.

%t max = 10000;

%t Table[Table[Table[x^2 + y^2 + 7 z^2, {z, 0, Sqrt[max - x^2 - y^2]/Sqrt[7] // Ceiling}], {y, 0, Sqrt[max - x^2] // Ceiling}], {x, 0, Sqrt[max] // Ceiling}] // Flatten // Union // Select[#, # <= max&]& // Complement[ Select[ Range[max], CoprimeQ[#, 7]&], #]& // Quiet (* _Jean-François Alcover_, Aug 27 2019 *)

%o (PARI)

%o issumsquare(n)={my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]%2 && f[i, 1]%4==3, return(0))); 1}

%o ok(m)={if(m%7, for(i=0, sqrtint(m\7), if(issumsquare(m-7*i^2), return(0))); 1, 0)}

%o select(ok, [1..10000]) \\ _Andrew Howroyd_, Aug 17 2019

%Y Cf. A097633.

%K nonn,more

%O 1,1

%A _N. J. A. Sloane_, Mar 26 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 29 03:17 EDT 2024. Contains 372921 sequences. (Running on oeis4.)