OFFSET
1,1
COMMENTS
Prime numbers are not considered because they are a trivial solution being the sum of their single prime factor (case k = 0).
Composite n such that n = Sum_{i=-k..k} A001414(i+n) for some k.
Values of k are 0, 1, 2, 4, 3, 4, 7, 6, 6, 8, 8, 9, 12, 8, 17, 9, 11, 4, 18, 11, ...
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..40 (terms < 3*10^11)
EXAMPLE
Prime factors of 4 are 2, 2 and 2 + 2 = 4. In this case k = 0.
For 75, k is equal to 1. Let us consider the prime factors of 74, 75 and 76. They are: 2, 37; 3, 5, 5; 2, 2, 19. Their sum is 2 + 37 + 3 + 5 + 5 + 2 + 2 + 19 = 75.
For 186, k is equal to 2. Let us consider the prime factors of 184, 185, 186, 187, 188. They are: 2, 2, 2, 23; 5, 37; 2, 3, 31; 11, 17; 2, 2, 47. Their sum is 2 + 2 + 2 + 23 + 5 + 37 + 2 + 3 + 31 + 11 + 17 + 2 + 2 + 47 = 186.
MAPLE
with(numtheory); P:= proc(q) local a, c, d, j, k, n;
for n from 2 to q do if not isprime(n) then a:=ifactors(n)[2];
k:=0; a:=add(a[j][1]*a[j][2], j=1..nops(a));
while a<n do k:=k+1; c:=ifactors(n-k)[2]; d:=ifactors(n+k)[2];
c:=add(c[j][1]*c[j][2], j=1..nops(c));
d:=add(d[j][1]*d[j][2], j=1..nops(d));
a:=a+c+d; od; if a=n then print(n); fi; fi; od; end: P(10^9);
PROG
(PARI) sopfr(n) = my(f=factor(n)); sum(k=1, #f~, f[k, 1]*f[k, 2]);
isok(n) = {my(s = sopfr(n)); my(k = 1); while (s < n, s += sopfr(n-k) + sopfr(n+k); k++); s == n; }
lista(nn) = {forcomposite(n=2, nn, if (isok(n), print1(n, ", ")); ); } \\ Michel Marcus, May 27 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Apr 21 2015
EXTENSIONS
a(21)-a(28) from Giovanni Resta, May 27 2015
STATUS
approved