OFFSET
0,2
LINKS
Jennifer Buckley, Table of n, a(n) for n = 0..10000
PROG
(PARI) a(n) = { my (d=0); while (n, d = select(t -> t>d, divisors(n))[1]; my (k=n/d); if (k%2, n-=d, n+=d)); return (d+1) } \\ Rémy Sigrist, Sep 14 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Jennifer Buckley, Sep 13 2019
STATUS
approved