This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A255832 #26 May 09 2024 02:50:14 %S A255832 51,40333,434,16,1234,78607,8310,817172,473,116,22650,736546059,22, %T A255832 1080982,252,7809,644,1786225573 %N A255832 Least m > 0 such that gcd(m^(2n+1)+2, (m+1)^(2n+1)+2) > 1. %C A255832 For n=0 one has gcd(m+2, m+3) = 1 for any m. %C A255832 See A255852 for the sequence including also even exponents, for which the GCD is > 1 already for m=1 (because gcd(1^2k+2, 2^2k+2) = gcd(3, 2^2k-1) = gcd(3, 4^k-1) = 3), and also for m=4 (because gcd(4^2k+2, 5^2k+2) = gcd(4^2k+2, (5^k-4^k)(5^k+4^k)) >= 3), etc. %C A255832 a(21) = 3585, a(22) = 5, a(25) = 16, a(28) = 22, a(29) = 4495, a(31) = 1291, a(32) = 108, a(33) = 220, a(34) = 218039, a(35) = 2112. - _Chai Wah Wu_, May 08 2024 %F A255832 a(n) = A255852(2n+1). %t A255832 A255832[n_] := Module[{m = 1}, While[GCD[m^(2 n + 1) + 2, (m + 1)^(2 n + 1) + 2] <= 1, m++]; m]; Table[A255832[n], {n, 1, 10}] (* _Robert Price_, Oct 15 2018 *) %o A255832 (PARI) a(n,c=2,L=10^6)={n=n*2+1;for(a=1,L,gcd(a^n+c,(a+1)^n+c)>1&&return(n))} %o A255832 (Python) %o A255832 from sympy import primefactors, resultant, nthroot_mod %o A255832 from sympy.abc import x %o A255832 def A255832(n): %o A255832 k, t = 0, (n<<1)+1 %o A255832 for p in primefactors(resultant(x**t+2,(x+1)**t+2)): %o A255832 for d in (a for a in nthroot_mod(-2,t,p,all_roots=True) if pow(a+1,t,p)==-2%p): %o A255832 k = min(d,k) if k else d %o A255832 return k # _Chai Wah Wu_, May 07 2024 %Y A255832 Cf. A118119, A255853, A255853, ... for other variants, corresponding to different constant offsets (+1, +3, ...) in the arguments of gcd. %K A255832 nonn,more,hard %O A255832 1,1 %A A255832 _M. F. Hasler_, Mar 08 2015 %E A255832 a(12)-a(18) from _Max Alekseyev_, Aug 06 2015