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.

A023151 Numbers k such that prime(k) == 9 (mod k).

This page as a plain text file.
%I A023151 #25 Feb 11 2021 22:54:32
%S A023151 1,2,10,11,35,37,80,100364,251711,251717,251731,251735,251741,251770,
%T A023151 4124456,4124582,27067096,27067520,69709706,69709717,69709723,
%U A023151 69709868,69709931,69709933,465769825,465769826,465769831,1208198548,8179002130
%N A023151 Numbers k such that prime(k) == 9 (mod k).
%H A023151 Giovanni Resta, <a href="/A023151/b023151.txt">Table of n, a(n) for n = 1..46</a>
%t A023151 NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[ Mod[p = NextPrim[p], n] == 9, Print[n]], {n, 1, 10^9}] (* _Robert G. Wilson v_, Feb 18 2004 *)
%o A023151 (Sage)
%o A023151 def A023151(max) :
%o A023151     terms = []
%o A023151     p = 2
%o A023151     for n in range(1, max+1) :
%o A023151         if (p - 9) % n == 0 : terms.append(n)
%o A023151         p = next_prime(p)
%o A023151     return terms
%o A023151 # _Eric M. Schmidt_, Feb 05 2013
%Y A023151 Cf. A092051, A023143, A023144, A023145, A023146, A023147, A023148, A023149, A023150, A023152.
%K A023151 nonn
%O A023151 1,2
%A A023151 _David W. Wilson_
%E A023151 More terms from _Robert G. Wilson v_, Feb 18 2004
%E A023151 a(25)-a(29) from _Robert G. Wilson v_, Feb 22 2006
%E A023151 First two terms inserted by _Eric M. Schmidt_, Feb 05 2013