OFFSET
1,1
COMMENTS
LINKS
EXAMPLE
21 is in the sequence because 21 has three proper divisors {1, 3, 7}, and therefore seventeen non-divisors {2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}, so the sum of proper divisors is 1 + 3 + 7 = 11 (which is prime) and the sum of non-divisors is 2 + 4 + 5 + 6 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 = 199 (which is also prime).
22 is not in the sequence because its three proper divisors {1, 2, 11} add up to 14, which is composite.
MAPLE
f:= proc(n) local t; t:= numtheory:-sigma(n) - n; isprime(t) and isprime(n*(n-1)/2 - t) end proc:
select(f, [$1..10^4]); # Robert Israel, Nov 10 2016
MATHEMATICA
Select[Range[7000], DivisorSigma[0, #1 ((#1 + 1)/2) - DivisorSigma[1, #1]] == 2 && DivisorSigma[0, DivisorSigma[1, #1] - #1] == 2 & ]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Oct 31 2016
STATUS
approved