login
A255869
Least m > 0 such that gcd(m^n+19, (m+1)^n+19) > 1, or 0 if there is no such m.
20
1, 0, 3, 2408, 1, 3976, 608, 28, 1, 88, 23, 464658, 1, 319924724, 3, 7, 1, 1628, 138, 2219409, 1, 6, 5, 594, 1, 872, 3, 92, 1, 392, 65, 2278155, 1, 3755866, 4793, 13, 1, 7873, 3, 614294, 1, 448812437, 5
OFFSET
0,3
COMMENTS
See A118119, which is the main entry for this class of sequences.
a(43) <= 8153777984244162781089834. - Max Alekseyev, Aug 06 2015
FORMULA
a(4k) = 1 for k>=0, because gcd(1^(4k)+19, 2^(4k)+19) = gcd(20, 16^k-1) >= 5 since 16 = 1 (mod 5).
EXAMPLE
For n=0 and n=4, see formula with k=0 resp. k=1.
For n=1, gcd(m^n+19, (m+1)^n+19) = gcd(m+19, m+20) = 1, therefore a(1)=0.
For n=2, gcd(3^2+19, 4^2+19) = 7 and (m,m+1) = (3,4) is the smallest pair which yields a GCD > 1 here.
MATHEMATICA
A255869[n_] := Module[{m = 1}, While[GCD[m^n + 19, (m + 1)^n + 19] <= 1, m++]; m]; Join[{1, 0}, Table[A255869[n], {n, 2, 12}]] (* Robert Price, Oct 16 2018 *)
PROG
(PARI) a(n, c=19, L=10^7, S=1)={n!=1 && for(a=S, L, gcd(a^n+c, (a+1)^n+c)>1 && return(a))}
(Python)
from sympy import primefactors, resultant, nthroot_mod
from sympy.abc import x
def A255869(n):
if n == 0: return 1
k = 0
for p in primefactors(resultant(x**n+19, (x+1)**n+19)):
for d in (a for a in nthroot_mod(-19, n, p, all_roots=True) if pow(a+1, n, p)==-19%p):
k = min(d, k) if k else d
return k # Chai Wah Wu, May 07 2024
CROSSREFS
KEYWORD
nonn,hard
AUTHOR
M. F. Hasler, Mar 09 2015
EXTENSIONS
a(13)-a(40) from Hiroaki Yamanouchi, Mar 12 2015
a(41)-a(42) from Max Alekseyev, Aug 06 2015
STATUS
approved