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!)
A354989 a(n) = 1 if A345993(n) < A345992(n), otherwise 0. 5
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
def A354989(n):
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.
Sequence in context: A327932 A373979 A359546 * A277161 A353481 A353677
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 16 2022
STATUS
approved

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 July 25 11:18 EDT 2024. Contains 374588 sequences. (Running on oeis4.)