login
A097700
Numbers not of form x^2 + 2y^2.
12
5, 7, 10, 13, 14, 15, 20, 21, 23, 26, 28, 29, 30, 31, 35, 37, 39, 40, 42, 45, 46, 47, 52, 53, 55, 56, 58, 60, 61, 62, 63, 65, 69, 70, 71, 74, 77, 78, 79, 80, 84, 85, 87, 90, 91, 92, 93, 94, 95, 101, 103, 104, 105, 106, 109, 110, 111, 112, 115, 116, 117, 119, 120, 122
OFFSET
1,1
COMMENTS
Is lim_{n->oo} a(n)/n = 3/4?
Answer: Limit_{n->oo} a(n)/n = 1 since the asymptotic density of A002479 is 0 (see A391183 for an asymptotic formula). - Amiram Eldar, Dec 02 2025
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..6800 from Vincenzo Librandi)
MATHEMATICA
formQ[n_]:=Reduce[x>=0&&y>=0&&n==x^2 + 2 y^2, {x, y}, Integers]==False; Select[Range[0, 200], formQ] (* Vincenzo Librandi, Jan 15 2017 *)
f[p_, e_] := If[OddQ[e] && Mod[p, 8] > 4, 0, 1]; q[1] = False; q[n_] := Times @@ f @@@ FactorInteger[n] == 0; Select[Range[128], q] (* Amiram Eldar, Dec 02 2025 *)
PROG
(Magma) [n: n in [0..160] | NormEquation(2, n) eq false]; // Vincenzo Librandi, Jan 15 2017
(PARI) isok(k) = if(k < 2, 0, my(f = factor(k)); for(i = 1, #f~, if(f[i, 2] % 2 && f[i, 1] % 8 > 4, return(1))); 0); \\ Amiram Eldar, Dec 02 2025
(Python)
from itertools import count, islice
from sympy import factorint
def A097700_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:any(e&1 and p&7>=5 for p, e in factorint(n).items()), count(max(startvalue, 1)))
A097700_list = list(islice(A097700_gen(), 50)) # Chai Wah Wu, Dec 03 2025
CROSSREFS
Complement of A002479.
Cf. A391183.
Sequence in context: A066513 A218852 A028810 * A172321 A154689 A175766
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Aug 23 2004
STATUS
approved