OFFSET
1,1
COMMENTS
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
K. Alladi and P. Erdős, On an additive arithmetic function, Pacific J. Math., Volume 71, Number 2 (1977), 275-294.
Eric Weisstein's World of Mathematics, Sum of Prime Factors
FORMULA
sopfr(n) = k||k+1 when n is not prime and k is a positive integer.
EXAMPLE
35 = 5*7, sopfr(35) = 5+7 = 12, 12 =k||k+1 when k = 1.
MATHEMATICA
Select[Range[10^3], And[CompositeQ@ #, Subtract @@ Map[FromDigits, TakeDrop[#, Floor[Length[#]/2]]] == -1 &@ IntegerDigits@ Total[Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger[#]]]] &] (* Michael De Vlieger, Jan 14 2018 *)
PROG
(PARI) is(n)=my(f = factor(n), sopfr = sum(i = 1, #f~, f[i, 1] * f[i, 2]); d = digits(sopfr), v); if((#d) % 2 == 0, v = vector(#d / 2); v[#v] = -1; return(vector(#d / 2, j, d[j]) - vector(#d / 2, #d / 2 + j, d[j]) == v), return(d == concat(digits(10^(#d \ 2) - 1), digits(10^(#d \ 2))))) \\ David A. Corneth, Jan 13 2018
(PARI) sopfr(n, f=factor(n))=sum(i=1, #f~, f[i, 1]*f[i, 2])
has(n)=my(d=digits(n), k=#d); digits(fromdigits(d[1..k\2])+1) == d[k\2+1..k]
list(lim)=my(v=List()); forfactored(n=35, lim\1, if(n[2][, 2]!=[1]~ && has(sopfr(0, n[2])), listput(v, n[1]))); Vec(v) \\ Charles R Greathouse IV, Jan 15 2018
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Daniel Blaine McBride, Jan 13 2018
STATUS
approved