login
A111359
Positive integers n such that the difference between the n-th prime and the sum of the divisors of n is congruent to 1 (mod n).
0
3, 6, 9, 10, 13, 42, 73, 184, 511, 690, 3275, 18918, 20574, 21340, 44140, 116669, 543214, 567016, 637321, 688792, 878649, 2582446, 27067133, 152149612, 180031091, 180397517, 290516940, 303713151, 749973242, 1138167152, 1149871982, 1340024880, 1992196101
OFFSET
1,1
FORMULA
n's such that (prime_n - sigma(n))== 1 (mod n); A000040(n)-A000203(n)==1 (mod n). - Robert G. Wilson v, Nov 09 2005
EXAMPLE
The 42nd prime is 181. The divisors of 42 are 1, 2, 3, 6, 7, 14, 21, 42 and their sum is 96. 181-96 = 85. 85 = 1 mod 42. So 42 is a term.
MATHEMATICA
Select[Range[10^8], Mod[Prime[ # ] - Plus @@ Divisors[ # ], # ] == 1 &] (* Ray Chandler, Nov 09 2005 *)
fQ[n_] := Mod[Prime[n] - DivisorSigma[1, n], n] == 1; t = {}; Do[ If[ fQ[n], AppendTo[t, n]], {n, 50000000}]; t (* Robert G. Wilson v *)
PROG
(PARI) n=0; forprime(p=1, 1e9, n++; if((p - sigma(n)) % n == 1, print1(n, ", "))) \\ Amiram Eldar, Jan 19 2019
CROSSREFS
Sequence in context: A188299 A187577 A348237 * A359352 A274428 A344158
KEYWORD
nonn
AUTHOR
Ray G. Opao, Nov 07 2005
EXTENSIONS
a(22) and a(23) from Ray Chandler and Robert G. Wilson v, Nov 09 2005
a(24)-a(33) from Amiram Eldar, Jan 19 2019
STATUS
approved