%I #15 Oct 16 2018 17:26:59
%S 1,0,3,1926,96,6,2,26,3,320,538,27,1,145,3,6,393216,982,3,2557,3,2,30,
%T 18781248,1,6,3,188,14,145,3,2808,3,16,24340653915,6,1
%N Least m > 0 such that gcd(m^n+12, (m+1)^n+12) > 1, or 0 if there is no such m.
%C See A118119, which is the main entry for this class of sequences.
%F a(6k+2) = 3 for k>=0, because 3^(6k+2) = 9^(3k+1), 4^(6k+2) = 16^(3k+1), and 9 = 16 = 2 (mod 7), 2^3 = 1 (mod 7) and 12 = -2 (mod 7), therefore 3^(6k+2)+12 = 4^(6k+2)+12 = 0 (mod 7) and gcd(3^(6k+2)+12, 4^(6k+2)+12) >= 7.
%e For n=0, gcd(m^0+12, (m+1)^0+12) = gcd(13, 13) = 13, therefore a(1)=1, the smallest possible (positive) m-value.
%e For n=1, gcd(m^n+12, (m+1)^n+12) = gcd(m+12, m+13) = 1, therefore a(1)=0.
%e For n=2, see formula with k=0.
%t A255862[n_] := Module[{m = 1}, While[GCD[m^n + 12, (m + 1)^n + 12] <= 1, m++]; m]; Join[{1, 0}, Table[A255862[n], {n, 2, 22}]] (* _Robert Price_, Oct 16 2018 *)
%o (PARI) a(n,c=12,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,hard,more
%O 0,3
%A _M. F. Hasler_, Mar 09 2015
%E a(23)-a(33) from _Hiroaki Yamanouchi_, Mar 13 2015
%E a(34)-a(36) from _Max Alekseyev_, Aug 07 2015
|