%I #15 Oct 11 2019 16:51:32
%S 3,6,9,10,13,42,73,184,511,690,3275,18918,20574,21340,44140,116669,
%T 543214,567016,637321,688792,878649,2582446,27067133,152149612,
%U 180031091,180397517,290516940,303713151,749973242,1138167152,1149871982,1340024880,1992196101
%N 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).
%F 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
%e 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.
%t Select[Range[10^8], Mod[Prime[ # ] - Plus @@ Divisors[ # ], # ] == 1 &] (* _Ray Chandler_, Nov 09 2005 *)
%t 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_ *)
%o (PARI) n=0; forprime(p=1, 1e9, n++; if((p - sigma(n)) % n == 1, print1(n,", "))) \\ _Amiram Eldar_, Jan 19 2019
%Y Cf. A000040, A000203.
%K nonn
%O 1,1
%A _Ray G. Opao_, Nov 07 2005
%E a(22) and a(23) from _Ray Chandler_ and _Robert G. Wilson v_, Nov 09 2005
%E a(24)-a(33) from _Amiram Eldar_, Jan 19 2019
|