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 A220295 #40 Sep 16 2017 00:35:30 %S A220295 11,11,5,0,2,0,281,0,3,3,0,0,11,0,761,3,15233,0,0,2003,0,0,89,5,0, %T A220295 11369,0,431,0,3,0,2,15401,0,2393,0,0,0,14741,11,2,0,2,0,7901,0,0,0, %U A220295 11831,0,3,2,0,2,7211,235043,10781,0,0,3,0,29,0,31151,0,77471,0 %N A220295 Least prime q satisfying q^p == 1 (mod 2p+1) and p^q == 1 (mod 2q+1), or 0 if otherwise, where p = prime(n). %C A220295 The numbers p and q that are the members of the solution (p,q) satisfying q^p == 1 (mod 2p+1) and p^q == 1 (mod 2q+1) where p and q are prime. %C A220295 q^p == 1 (mod 2p+1) and p^q == 1 (mod 2q+1) has no solution if p is a prime of the form 6m+1 (A002476) => a(n) = 0. %H A220295 T. D. Noe, <a href="/A220295/b220295.txt">Table of n, a(n) for n = 1..1000</a> %e A220295 a(2) = 11 because for (p,q) = (3,11), 11^3 == 1 (mod 7) and 3^11 == 1 mod 23. %p A220295 with(numtheory):T:=array(1..100):T[1]:=2:T[2]:=3: %p A220295 for n from 3 to 100 do : %p A220295 p:=ithprime(n):if irem(p,6)=5 then %p A220295 T[n]:=p:else T[n]:=0: %p A220295 fi: %p A220295 od: %p A220295 print(T): %p A220295 for a from 1 to 50 do: %p A220295 p:=T[a]: if p= 0 then %p A220295 printf(`%d, `,0): %p A220295 else : %p A220295 ii:=0: %p A220295 for b from 1 to 10^8 while(ii=0) do: %p A220295 q:=ithprime(b): if irem(p^q, 2*q+1) = 1 and irem(q^p, 2*p+1)=1 then %p A220295 ii:=1: printf(`%d, `,q): %p A220295 else : %p A220295 fi: %p A220295 od: %p A220295 fi: %p A220295 od: %t A220295 Table[p = Prime[n]; If[Mod[p, 6] == 1, 0, q = 2; While[! (PowerMod[p, q, 2 q + 1] == 1 && PowerMod[q, p, 2 p + 1] == 1), q = NextPrime[q]]; q], {n, 100}] (* _T. D. Noe_, Feb 22 2013 *) %Y A220295 Cf. A002476, A003627, A198033. %K A220295 nonn %O A220295 1,1 %A A220295 _Michel Lagneau_, Feb 19 2013