%I #10 Apr 21 2012 14:49:02
%S 0,2,5,3,8,3,10,8,5,12,1,6,19,10,2,0,17,12,31,24,14,1,24,19,14,29,26,
%T 17,46,36,5,3,17,36,24,19,56,35,19,12,53,41,84,71,63,38,85,80,73,66,
%U 46,31,84,79,63,54,32,1,60,50,111,78,68,66,48,32,99,80,54,40
%N a(1)= 0; for n > 1, a(n) = a(n-1) - sopf(n) if that number is positive, otherwise a(n)= a(n-1)+ sopf(n), where sopf(n) is the sum of the distinct primes dividing n (A008472).
%C a(n) = 0 for n = 16, 222, 4298, 16652, 37783, 256263, 414054, 530270, ...
%H Michel Lagneau, <a href="/A182184/b182184.txt">Table of n, a(n) for n = 1..10000</a>
%p with(numtheory):a0:=0:for n from 2 to 100 do: x:=factorset(n):n1:=nops(x): p:=sum(x[i],i=1..n1):a1:=a0-p:if a1< 0 then a1:=a0+p:else fi: printf(`%d, `, a1): a0:=a1: od:
%Y Cf. A008472, A185112.
%K nonn
%O 1,2
%A _Michel Lagneau_, Apr 17 2012
|