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.

A105421 Numbers k such that prime(k + 1) == 7 (mod k).

This page as a plain text file.
%I A105421 #43 Sep 05 2025 01:00:13
%S A105421 1,2,3,4,8,30,31,33,68,72,180,1052,6471,40083,40087,40090,40113,40120,
%T A105421 100348,100360,100362,637334,4124588,10553439,10553442,10553455,
%U A105421 10553478,10553505,10553512,10553827,10553849,69709712,69709719,69709728,69709958,21338685404,1003652347332,1003652347349,1003652347360,1003652347365
%N A105421 Numbers k such that prime(k + 1) == 7 (mod k).
%H A105421 Manfred Scheucher, <a href="/A105421/a105421.sage.txt">Sage Script</a>.
%t A105421 Select[Range[650000],Mod[Prime[#+1]-7,#]==0&] (* _Harvey P. Dale_, Sep 23 2021 *)
%o A105421 (Python)
%o A105421 from sympy import nextprime
%o A105421 def A105421(max):
%o A105421     terms = []
%o A105421     p = 3
%o A105421     for n in range(1, max+1):
%o A105421         if (p - 7) % n == 0: terms.append(n)
%o A105421         p = nextprime(p)
%o A105421     return terms
%o A105421 # _Eric M. Schmidt_, Feb 05 2013
%o A105421 (PARI) isok(n) = Mod(prime(n + 1), n) == Mod(7, n); \\ _Michel Marcus_, Apr 05 2015
%o A105421 (PARI) n=0;forprime(p=3,,if(Mod(p,n++)==7,print1(n", "))) \\ _Charles R Greathouse IV_, Jul 23 2015
%Y A105421 Cf. A105286, A105287, A105288, A105290, A105329, A105451.
%K A105421 nonn,changed
%O A105421 1,2
%A A105421 _Zak Seidov_, May 02 2005
%E A105421 a(1)-a(4) inserted by _Eric M. Schmidt_, Feb 05 2013
%E A105421 a(19)-a(22) from _Harvey P. Dale_, Apr 05 2015
%E A105421 a(23)-a(35) from _Manfred Scheucher_, Jul 23 2015
%E A105421 a(36) from _Charles R Greathouse IV_, Jul 23 2015
%E A105421 a(37)-a(40) from _Max Alekseyev_, Aug 31 2024