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 A255857 #23 May 09 2024 10:59:01 %S A255857 1,0,14,320,56,675113,224,13,5,283,33,192,26,242,5,2,10,140,5,50,142, %T A255857 29,18,605962,11,97,234881024,951,5,3332537854,14 %N A255857 Least k > 0 such that gcd(k^n+7,(k+1)^n+7) > 1, or 0 if there is no such k. %C A255857 See A118119, which is the main entry for this class of sequences. %H A255857 Hiroaki Yamanouchi, <a href="/A255857/b255857.txt">Table of n, a(n) for n = 0..36</a> %e A255857 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 A255857 For n=1, gcd(k^n+7, (k+1)^n+7) = gcd(k+7, k+8) = 1, therefore a(1)=0. %e A255857 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 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 A255857 (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))} %o A255857 (Python) %o A255857 from sympy import primefactors, resultant, nthroot_mod %o A255857 from sympy.abc import x %o A255857 def A255857(n): %o A255857 if n == 0: return 1 %o A255857 k = 0 %o A255857 for p in primefactors(resultant(x**n+7,(x+1)**n+7)): %o A255857 for d in (a for a in sorted(nthroot_mod(-7,n,p,all_roots=True)) if pow(a+1,n,p)==-7%p): %o A255857 k = min(d,k) if k else d %o A255857 break %o A255857 return int(k) # _Chai Wah Wu_, May 09 2024 %Y A255857 Cf. A118119, A255832, A255852-A255869 %K A255857 nonn %O A255857 0,3 %A A255857 _M. F. Hasler_, Mar 08 2015 %E A255857 a(26)-a(36) from _Hiroaki Yamanouchi_, Mar 12 2015