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)))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Aug 23 2004
STATUS
approved
