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