login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Primes p such that p^k == 1 modulo k, where p=prime(k).
3

%I #11 Oct 31 2016 13:48:45

%S 3,7,11,13,19,29,37,43,53,61,71,89,103,131,151,173,181,223,229,239,

%T 251,281,311,349,359,409,433,503,541,571,593,601,619,659,661,683,691,

%U 701,719,769,827,857,911,941,953,997,1069,1087,1091,1129,1163,1223,1291

%N Primes p such that p^k == 1 modulo k, where p=prime(k).

%C A077254(A049084(a(n))) = 1; a(n) = A000040(A077255(n)).

%H Robert Israel, <a href="/A077256/b077256.txt">Table of n, a(n) for n = 1..10000</a>

%p g:= proc(t) local p; p:= ithprime(t); if p&^ t mod t = 1 then p else NULL fi end proc:

%p map(g, [$1..1000]); # _Robert Israel_, Oct 31 2016

%t With[{no=250}, Transpose[Select[Partition[Riffle[Prime[Range[no]], Range[no]],2], PowerMod[First[#],Last[#],Last[#]]==1&]][[1]]] (* _Harvey P. Dale_, Jan 05 2011 *)

%t Prime[Select[Range[250]], PowerMod[Prime[#],#,#]==1&]]

%Y Cf. A000040, A049084, A077254, A077255.

%Y Contains A048891.

%K nonn

%O 1,1

%A _Reinhard Zumkeller_, Oct 31 2002