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 A320774 #39 Dec 24 2018 08:25:15 %S A320774 3,7,17,47,107,167,197,241,257,317,347,421,541,557,571,677,751,827, %T A320774 947,1097,1171,1217,1291,1307,1367,1427,1607,1621,1847,1861,1877,2011, %U A320774 2027,2207,2221,2251,2267,2297,2341,2417,2477,2521,2657,2671,2851,2927,2971,3257,3271,3361,3391,3541,3557,3571 %N A320774 Primes p for which there is a prime q < p such that 5*q == 1 (mod p). %C A320774 All terms > a(1) are primes p such that either (2*p+1)/5 or (4*p+1)/5 is prime. A necessary (but not sufficient) condition for prime p > 3 to be a term is that its final digit must be 7 or 1 (otherwise (2*p+1), (4*p+1) respectively cannot be divisible by 5). The Maple code below computes terms > a(1). %e A320774 3 is a term since with q = 2 (prime < 3) we have 5*2 = 10 == 1 (mod 3). %e A320774 7 is a term since with q = 3 (prime < 7) we have 5*q = 5*3 = 15 == 1 (mod 7). %e A320774 241 is a term since with q = 193 (prime < 241) we have 5*193 = 965 == 1 (mod 241). %p A320774 for n from 4 to 350 do %p A320774 Y := ithprime(n); %p A320774 Z := 1/5 mod Y; %p A320774 if isprime(Z) then print(Y); %p A320774 end if: %p A320774 end do: %t A320774 aQ[p_]:=Module[{ans=False, q=2}, While[q<p, If[Mod[5*q, p]==1, ans=True; Break[]]; q=NextPrime[q]]; ans]; Select[Prime[Range[350]], aQ] (* _Amiram Eldar_, Nov 12 2018 *) %Y A320774 Cf. A005383, A104164, A321510, A321582. %K A320774 nonn %O A320774 1,1 %A A320774 _David James Sycamore_, Nov 12 2018