A255858 Least k > 0 such that gcd(k^n + 8, (k+1)^n + 8) > 1, or 0 if there is no such k.
1, 0, 1, 5, 1, 5238149, 1, 24747, 1, 5, 1, 1042068640211853141849723, 1, 28913777, 1, 5, 1, 9380, 1, 87940, 1, 5, 1, 677083547, 1, 1584, 1, 5, 1, 5355, 1, 257, 1, 5, 1, 118, 1, 3250, 1, 5, 1, 78609080, 1, 1807714890, 1, 5, 1
Offset: 0
Examples
For n=1, gcd(k^n + 8, (k+1)^n + 8) = gcd(k+8, k+9) = 1, therefore a(1)=0. For n=2*k, see formula. For n=3, we have gcd(5^3 + 8, 6^3 + 8) = gcd(133, 224) = 7, and the pair (k,k+1)=(5,6) is the smallest which yields a GCD > 1, therefore a(3)=5.
Programs
-
Mathematica
A255858[n_] := Module[{m = 1}, While[GCD[m^n + 8, (m + 1)^n + 8] <= 1, m++]; m]; Join[{1, 0}, Table[A255858[n], {n, 2, 10}]] (* Robert Price, Oct 15 2018 *)
-
PARI
a(n,c=8,L=10^7,S=1)={n!=1&&for(a=S,L,gcd(a^n+c,(a+1)^n+c)>1&&return(a))}
Formula
a(2k)=1 for k >= 0, because gcd(1^(2k) + 8, 2^(2k) + 8) = gcd(9, 4^k-1) >= 3.
Extensions
a(11)-a(40) from Hiroaki Yamanouchi, Mar 13 2015
a(41)-a(46) from Max Alekseyev, Aug 06 2015
Comments