The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A023143 Numbers n such that prime(n) == 1 (mod n). 25
 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 A004648(a(n)) <= 1. - Reinhard Zumkeller, Jul 30 2012 LINKS Giovanni Resta, Table of n, a(n) for n = 1..94 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) -- Reinhard Zumkeller, Jul 30 2012, Jun 08 2011 (Python) def A023143(end):     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 # Conner L. Delahanty, Apr 19 2014 (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 (PARI) n=0; print1(1); forprime(p=2, 1e9, if(p%n++==1, print1(", "n))) \\ Charles R Greathouse IV, Apr 28 2015 (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. Sequence in context: A153485 A244048 A309043 * A085206 A238481 A058601 Adjacent sequences:  A023140 A023141 A023142 * A023144 A023145 A023146 KEYWORD nonn,nice AUTHOR David W. Wilson and G. L. Honaker, Jr., Jun 14 1998 EXTENSIONS More terms from Jud McCranie, Dec 11 1999 a(30)-a(37) from Zak Seidov, Apr 19 2014 Terms a(33)-a(37) sorted in correct order by Giovanni Resta, Feb 23 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 3 19:49 EDT 2020. Contains 336201 sequences. (Running on oeis4.)