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 A255853 #33 May 09 2024 10:58:44 %S A255853 1,0,6,56,3,29,96,1159823,384,9,3,1994117680,13,247,6,15,3,1256,4, %T A255853 25211925041,15,5785,3,93602696971,24,11,6,182,3,4644,92,12506,9,13,3, %U A255853 484,2,420,6,130,3,16032496,12 %N A255853 Least k > 0 such that gcd(k^n+3, (k+1)^n+3) > 1, or 0 if there is no such k. %C A255853 See A118119, which is the main entry for this class of sequences. %C A255853 a(43) <= 291613846670877. - _Max Alekseyev_, Aug 07 2015 %F A255853 For k>=0, a(6k+4)=3 because gcd(3^(6k+4)+3, 4^(6k+4)+3) = gcd(9^(3k+2)+3, 16^(3k+2)+3) and 9 = 16 = 2 (mod 7) and 2^(3k+2)+3 = 2^2+3 = 0 (mod 7), so the GCD is a positive multiple of 7. %e A255853 For n=1, gcd(k^n+3, (k+1)^n+3) = gcd(k+3, k+4) = 1, therefore a(1)=0. %e A255853 For n=2, we have gcd(6^2+3, 7^2+3) = gcd(39, 52) = 13, and the pair (k,k+1)=(6,7) is the smallest which yields a GCD > 1, therefore a(2)=6. %t A255853 A255853[n_] := Module[{m = 1}, While[GCD[m^n + 3, (m + 1)^n + 3] <= 1, m++]; m]; Join[{1, 0}, Table[A255853[n], {n, 2, 10}]] (* _Robert Price_, Oct 15 2018 *) %o A255853 (PARI) a(n,c=3,L=10^7,S=1)={n!=1 && for(a=S,L,gcd(a^n+c,(a+1)^n+c)>1&&return(a))} %o A255853 (Python) %o A255853 from sympy import primefactors, resultant, nthroot_mod %o A255853 from sympy.abc import x %o A255853 def A255853(n): %o A255853 if n == 0: return 1 %o A255853 k = 0 %o A255853 for p in primefactors(resultant(x**n+3,(x+1)**n+3)): %o A255853 for d in (a for a in sorted(nthroot_mod(-3,n,p,all_roots=True)) if pow(a+1,n,p)==-3%p): %o A255853 k = min(d,k) if k else d %o A255853 break %o A255853 return int(k) # _Chai Wah Wu_, May 08 2024 %Y A255853 Cf. A118119, A255832. %Y A255853 Cf. A255852, A255854, A255855, A255856, A255857, A255858, A255869. %K A255853 nonn,hard %O A255853 0,3 %A A255853 _M. F. Hasler_, Mar 08 2015 %E A255853 a(11)-a(40) from _Hiroaki Yamanouchi_, Mar 12 2015 %E A255853 a(41)-a(42) from _Max Alekseyev_, Aug 06 2015