OFFSET
1,8
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
a(n) = n - A332809(n).
EXAMPLE
a(12): we have three alternative paths: {12, 8, 4, 2, 1}, {12, 6, 4, 2, 1} or {12, 6, 3, 2, 1}, with [5, 7, 9, 10, 11] being the only numbers in range 1..12 that do not occur in any of those paths, therefore a(12) = 5.
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);
A332810(n) = (n-v332809[n]);
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 04 2020
STATUS
approved