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.

A045924 Numbers n such that prime(n) == -1 (mod n).

This page as a plain text file.
%I A045924 #33 Feb 23 2020 08:40:55
%S A045924 1,2,3,4,10,70,72,182,440,1053,6458,6461,6471,40087,40089,251737,
%T A045924 251742,637320,637334,637336,1617173,4124466,10553445,10553455,
%U A045924 10553569,10553570,10553574,10553576,10553819,10553829,27067100,27067262,69709705,69709719,69709734,69709873
%N A045924 Numbers n such that prime(n) == -1 (mod n).
%C A045924 Same as n such that n divides A008864(n). - _David James Sycamore_, Jul 23 2018
%C A045924 Also numbers n such that prime(n) == n-1 (mod n). - _Muniru A Asiru_, Jul 24 2018
%H A045924 Giovanni Resta, <a href="/A045924/b045924.txt">Table of n, a(n) for n = 1..108</a>
%H A045924 E. Labos, <a href="/A004648/a004648.gif">Graph of prime(n) mod n</a>
%e A045924 10 is a member because the 10th prime, 29, is congruent to -1 mod 10.
%t A045924 NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[Mod[p = NextPrim[p], n] == n - 1, Print[n]], {n, 1, 10^9}] (* _Robert G. Wilson v_, Feb 18 2004 *)
%o A045924 (PARI) isok(n) = Mod(prime(n), n) == -1; \\ _Michel Marcus_, Jul 24 2018
%Y A045924 Cf. A004648 and esp. A023143.
%Y A045924 Cf. A052013, A048891, A092044, A092045, A092046, A092047, A092048, A092049, A092050, A092051, A092052, A008864.
%K A045924 nonn
%O A045924 1,2
%A A045924 _Len Smiley_
%E A045924 More terms from _Patrick De Geest_, Nov 15 1999
%E A045924 Terms a(33) and beyond from _Giovanni Resta_, Feb 23 2020