A182184 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).
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, 17, 46, 36, 5, 3, 17, 36, 24, 19, 56, 35, 19, 12, 53, 41, 84, 71, 63, 38, 85, 80, 73, 66, 46, 31, 84, 79, 63, 54, 32, 1, 60, 50, 111, 78, 68, 66, 48, 32, 99, 80, 54, 40
Offset: 1
Keywords
Links
- Michel Lagneau, Table of n, a(n) for n = 1..10000
Programs
-
Maple
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:
Comments