cp's OEIS Frontend

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.

A023145 Numbers k such that prime(k) == 3 (mod k).

This page as a plain text file.
%I A023145 #31 Feb 11 2021 22:53:47
%S A023145 1,2,4,7,8,31,32,34,74,76,1052,6455,15928,251707,251765,4124458,
%T A023145 27067012,27067120,69709718,69709871,69709877,69709934,69709943,
%U A023145 69709954,69709963,69709964,465769810,8179002124,145935689390,382465573486,885992692751818,885992692751822
%N A023145 Numbers k such that prime(k) == 3 (mod k).
%H A023145 Giovanni Resta, <a href="/A023145/b023145.txt">Table of n, a(n) for n = 1..46</a>
%e A023145 204475053103 = prime(8179002124) and 204475053103 = 25*8179002124 + 3.
%t A023145 NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[ Mod[p = NextPrim[p], n] == 3, Print[n]], {n, 1, 10^9}] (* _Robert G. Wilson v_, Feb 18 2004 *)
%t A023145 Select[Range[100000], Mod[Prime[#] - 3, #] == 0 &] (* _T. D. Noe_, Feb 05 2013 *)
%o A023145 (Sage)
%o A023145 def A023145(max) :
%o A023145     terms = []
%o A023145     p = 2
%o A023145     for n in range(1, max+1) :
%o A023145         if (p - 3) % n == 0 : terms.append(n)
%o A023145         p = next_prime(p)
%o A023145     return terms
%o A023145 # _Eric M. Schmidt_, Feb 05 2013
%Y A023145 Cf. A171430, A092045, A023143, A023144, A023146, A023147, A023148, A023149, A023150, A023151, A023152.
%K A023145 nonn
%O A023145 1,2
%A A023145 _David W. Wilson_
%E A023145 More terms from _Robert G. Wilson v_, Feb 18 2004
%E A023145 2 more terms from _Giovanni Resta_, Feb 22 2006
%E A023145 a(29) from _Robert G. Wilson v_, Feb 22 2006
%E A023145 First two terms inserted by _Eric M. Schmidt_, Feb 05 2013
%E A023145 Terms a(30) and beyond from _Giovanni Resta_, Feb 23 2020