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 A023146 #39 Feb 12 2021 05:22:31 %S A023146 1,75,77,637331,637333,637341,637343,27067053,179992917,8179002205, %T A023146 2636913002917,6201265271239157,6201265271239347,6201265271239413, %U A023146 6201265271239981,6201265271240331,6201265271240341,2159986889494445405,2159986889494445525,2159986889494445615 %N A023146 Numbers k such that prime(k) == 4 (mod k). %e A023146 The 75th prime is 379 and 379 == 4 (mod 75). Hence 75 is in the sequence. %e A023146 The 76th prime is 383, but 383 == 3, not 4, (mod 76). So 76 is not in the sequence. %t A023146 nextPrime[n_] := Block[{k = n + 1}, While[!PrimeQ[k], k++]; k]; p = 1; Do[If[Mod[p = nextPrime[p], n] == 4, Print[n]], {n, 1, 10^9}] (* _Robert G. Wilson v_, Feb 18 2004 *) %t A023146 Select[Range[1000], Mod[Prime[#], #] == 4 &] (* _Alonso del Arte_, Nov 16 2018 *) %o A023146 (Sage) %o A023146 def A023146(max) : %o A023146 terms = [] %o A023146 p = 2 %o A023146 for n in range(1, max+1) : %o A023146 if (p - 4) % n == 0 : terms.append(n) %o A023146 p = next_prime(p) %o A023146 return terms %o A023146 # _Eric M. Schmidt_, Feb 05 2013 %Y A023146 Cf. A171431, A092046. %Y A023146 Cf. A023143, A023144, A023145, A023147, A023148, A023149, A023150, A023151, A023152. %K A023146 nonn %O A023146 1,2 %A A023146 _David W. Wilson_ %E A023146 More terms from _Robert G. Wilson v_, Feb 18 2004 %E A023146 2 more terms from _Giovanni Resta_ and _Robert G. Wilson v_, Feb 22 2006 %E A023146 First term inserted by _Eric M. Schmidt_, Feb 05 2013 %E A023146 a(11)-a(20) from _Giovanni Resta_, Feb 23 2020