|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = [A354988(n) < 0], where [ ] is the Iverson bracket.
|
|
MATHEMATICA
|
a[n_] := Module[{m = 1}, While[! Divisible[m*(m + 1), n], m++]; If[GCD[n, m + 1] < GCD[n, m], 1, 0]]; Array[a, 100] (* Amiram Eldar, Jun 16 2022 *)
|
|
PROG
|
(PARI) A354989(n) = for(m=1, oo, if((m*(m+1))%n==0, return(gcd(n, 1+m)<gcd(n, m))));
(Python 3.8+)
from math import gcd, prod
from itertools import combinations
from sympy import factorint
from sympy.ntheory.modular import crt
if n == 1:
return 0
plist = tuple(p**q for p, q in factorint(n).items())
return 0 if len(plist) == 1 else int(gcd(n, s:=int(min(min(crt((m, n//m), (0, -1))[0], crt((n//m, m), (0, -1))[0]) for m in (prod(d) for l in range(1, len(plist)//2+1) for d in combinations(plist, l))))) > gcd(n, s+1)) # Chai Wah Wu, Jun 16 2022
|
|
CROSSREFS
|
Characteristic function of A345995.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|