OFFSET
0,4
COMMENTS
See A118119, which is the main entry for this class of sequences.
FORMULA
a(2k)=1 for k>=0, because gcd(1^(2k)+5,2^(2k)+5) = gcd(6,4^k-1) = 3.
EXAMPLE
For n=1, gcd(k^n+5, (k+1)^n+5) = gcd(k+5, k+6) = 1, therefore a(1)=0.
For n=2k, see formula.
For n=3, we have gcd(5^3+5, 6^3+5) = 13, and the pair (k,k+1)=(5,6) is the smallest which yields a GCD > 1, therefore a(3)=5.
MATHEMATICA
PROG
(PARI) a(n, c=5, L=10^7, S=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 A255855(n):
if n == 0: return 1
k = 0
for p in primefactors(resultant(x**n+5, (x+1)**n+5)):
for d in (a for a in sorted(nthroot_mod(-5, n, p, all_roots=True)) if pow(a+1, n, p)==-5%p):
k = min(d, k) if k else d
break
return int(k) # Chai Wah Wu, May 08 2024
CROSSREFS
KEYWORD
nonn,hard
AUTHOR
M. F. Hasler, Mar 08 2015
EXTENSIONS
a(11)-a(46) from Hiroaki Yamanouchi, Mar 12 2015
STATUS
approved