login
A332902
a(1) = 1, then after the first differences of A332809.
3
1, 1, 1, 0, 1, 1, 1, -2, 2, 0, 1, 0, 1, 1, 1, -5, 1, 3, 1, -2, 4, -2, 1, -2, 0, 2, -1, 2, 1, 1, 1, -9, 11, -9, 10, -6, 1, 1, 1, -5, 1, 6, 1, -5, 5, -3, 1, -5, 7, -6, 2, 0, 1, -1, 2, -1, 2, 0, 1, 0, 1, 1, 0, -13, 15, 1, 1, -14, 16, -2, 1, -10, 1, 1, 4, -3, 12, -10, 1, -9, 3, -1, 1, 7, -6, 8, 1, -9, 1, 7, 4, -9, 8, -6, 7, -15, 1, 10
OFFSET
1,8
FORMULA
a(1) = 1, and for n > 1, a(n) = A332809(n) - A332809(n-1).
a(p) = 1 for all primes p.
PROG
(PARI)
up_to = 105;
A332809list(up_to) = { my(v=vector(up_to)); v[1] = Set([1]); for(n=2, up_to, my(f=factor(n)[, 1]~, s=Set([n])); for(i=1, #f, s = setunion(s, v[n-(n/f[i])])); v[n] = s); apply(length, v); }
v332809 = A332809list(up_to);
A332809(n) = v332809[n];
A332902(n) = if(1==n, n, (A332809(n)-A332809(n-1)));
CROSSREFS
Sequence in context: A292592 A292274 A317675 * A204423 A376926 A112170
KEYWORD
sign
AUTHOR
Antti Karttunen, Apr 04 2020
STATUS
approved