OFFSET
0
COMMENTS
First differs from A342892 at n = 35.
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
Daniel Shanks and Larry P. Schmid, Variations on a theorem of Landau. Part I, Mathematics of Computation, Vol. 20, No. 96 (1966), pp. 551-569.
FORMULA
MATHEMATICA
f[p_, e_] := If[OddQ[e] && Mod[p, 8] > 4, 0, 1]; a[0] = a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100, 0]
PROG
(PARI) a(n) = if(n < 2, 1, my(f = factor(n)); for(i = 1, #f~, if(f[i, 2] % 2 && f[i, 1] % 8 > 4, return(0))); 1);
(Python)
from sympy import factorint
def A391183(n): return int(any(e&1 and p&7>=5 for p, e in factorint(n).items()))^1 # Chai Wah Wu, Dec 04 2025
CROSSREFS
KEYWORD
nonn,mult,easy
AUTHOR
Amiram Eldar, Dec 02 2025
STATUS
approved
