|
|
A023143
|
|
Numbers k such that prime(k) == 1 (mod k).
|
|
27
|
|
|
1, 2, 5, 6, 12, 14, 181, 6459, 6460, 6466, 100362, 251712, 251732, 637236, 10553504, 10553505, 10553547, 10553827, 10553851, 10553852, 69709709, 69709724, 69709728, 69709869, 69709961, 69709962, 179992920, 179992922, 179993170, 465769815, 465769819, 465769840, 3140421737, 3140421744, 3140421767, 3140421892, 3140421935
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
6 is in the sequence because the 6th prime, 13, is congruent to 1 (mod 6).
|
|
MATHEMATICA
|
Do[ If[ IntegerQ[ (Prime[ n ] - 1) / n ], Print[ n ] ], {n, 1, 10^8} ]
|
|
PROG
|
(Haskell)
import Data.List (elemIndices)
a023143 n = a023143_list !! (n-1)
a023143_list = 1 : map (+ 1) (elemIndices 1 a004648_list)
(Python)
primes=[2, 3]
a023143_list=[1]
num=3
while len(primes)<=end:
num+=1
prime=False
length=len(primes)
for y in range(0, length):
if num % primes[y]!=0:
prime=True
else:
prime=False
break
if (prime):
primes.append(num)
for x in range(2, len(primes)):
if (primes[x-1]%(x))==1:
a023143_list.append(x)
return a023143_list
(Python)
from sympy import primerange
def A023143(end): return [n+1 for n, p in enumerate(primerange(2, end)) if (p-1) % (n-1) == 0] # David Radcliffe, Jun 27 2016
(Magma) [n: n in [1..10000] | IsIntegral((NthPrime(n)-1)/n)]; // Marius A. Burtea, Dec 30 2018
|
|
CROSSREFS
|
Cf. A048891, A045924, A052013, A023144, A023145, A023146, A023147, A023148, A023149, A023150, A023151, A023152.
|
|
KEYWORD
|
nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Terms a(33)-a(37) sorted in correct order by Giovanni Resta, Feb 23 2020
|
|
STATUS
|
approved
|
|
|
|