A255862 Least m > 0 such that gcd(m^n+12, (m+1)^n+12) > 1, or 0 if there is no such m.
1, 0, 3, 1926, 96, 6, 2, 26, 3, 320, 538, 27, 1, 145, 3, 6, 393216, 982, 3, 2557, 3, 2, 30, 18781248, 1, 6, 3, 188, 14, 145, 3, 2808, 3, 16, 24340653915, 6, 1
Offset: 0
Examples
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. For n=1, gcd(m^n+12, (m+1)^n+12) = gcd(m+12, m+13) = 1, therefore a(1)=0. For n=2, see formula with k=0.
Programs
-
Mathematica
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 *)
-
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))}
Formula
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.
Extensions
a(23)-a(33) from Hiroaki Yamanouchi, Mar 13 2015
a(34)-a(36) from Max Alekseyev, Aug 07 2015
Comments