OFFSET
1,1
COMMENTS
The number of SP numbers below 10^n: 5, 31, 123, 532, 2728, 15402, 98294, ...
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Kenichi Shimizu, Arithmetic of Positive Integers Having Prime Sums of Complementary Divisors, Math. J. Okayama Univ., Vol. 60 (2018), pp. 155-164.
Kenichi Shimizu and Kazuo Goto, A Property of Integers Related to Quadratic Fields, J. Fac. Educ. Tottori Univ. (Nat. Sci.), Vol. 47 (1998) pp. 5-12.
EXAMPLE
9 is an SP number since 9 = 1 * 9 = 3 * 3 and (1 + 9)/2 = 5 and (3 + 3)/2 = 3 are both primes.
42 is an SP number since 42 = 1 * 42 = 2 * 21 = 3 * 14 = 6 * 7, and 1 + 42 = 43, 2 + 21 = 23, 3 + 14 = 17, and 6 + 7 = 13 are all primes.
MATHEMATICA
div[n_]:=Switch[Mod[n, 4], 0, 0, 1, 2, 2, 1, 3, 4]; pQ[n_, div_] := Module[{}, d=Divisors[n]; m=Length[d]; mm=If[OddQ[m], (m+1)/2, m/2]; dd=Take[d, mm]; ret=True; Do[p=(dd[[k]]+n/dd[[k]])/div; If[!PrimeQ[p], ret=False; Break[]], {k, 1, mm}]; ret]; spQ[n_]:=Module[{div1=div[n], ret}, If[div1==0, ret=False, ret=pQ[n, div1]]; ret]; s={}; Do[If[spQ[n], AppendTo[s, n]], {n, 1, 100}]; s
PROG
(PARI) isok(n) = {if (n % 4, my (d = divisors(n)); for (i=1, ceil(#d/2), if (! isprime((d[i]+n/d[i])/gcd(n+1, 4)), return(0)); ); return (1); ); } \\ Michel Marcus, Apr 26 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Apr 24 2018
STATUS
approved