%I #18 Oct 15 2018 22:08:49
%S 1,0,14,320,56,675113,224,13,5,283,33,192,26,242,5,2,10,140,5,50,142,
%T 29,18,605962,11,97,234881024,951,5,3332537854,14
%N Least k > 0 such that gcd(k^n+7,(k+1)^n+7) > 1, or 0 if there is no such k.
%C See A118119, which is the main entry for this class of sequences.
%H Hiroaki Yamanouchi, <a href="/A255857/b255857.txt">Table of n, a(n) for n = 0..36</a>
%e For n=0, gcd(k^0+7, (k+1)^0+7) = gcd(8, 8) = 8 for any k > 0, therefore a(0)=1 is the smallest possible positive value.
%e For n=1, gcd(k^n+7, (k+1)^n+7) = gcd(k+7, k+8) = 1, therefore a(1)=0.
%e For n=2, we have gcd(14^2+7, 15^2+7) = gcd(203, 232) = 29, and the pair (k,k+1)=(14,15) is the smallest which yields a gcd > 1, therefore a(2)=14.
%t A255857[n_] := Module[{m = 1}, While[GCD[m^n + 7, (m + 1)^n + 7] <= 1, m++]; m]; Join[{1, 0}, Table[A255857[n], {n, 2, 25}]] (* _Robert Price_, Oct 15 2018 *)
%o (PARI) a(n,c=7,L=10^7,S=1)={n!=1&&for(a=S,L,gcd(a^n+c,(a+1)^n+c)>1&&return(a))}
%Y Cf. A118119, A255832, A255852-A255869
%K nonn
%O 0,3
%A _M. F. Hasler_, Mar 08 2015
%E a(26)-a(36) from _Hiroaki Yamanouchi_, Mar 12 2015
|