OFFSET
1,4
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
PROG
(PARI) a(n) = { my (v=0, s=0); for (h=2, oo, if (n<=0, return (v), v+=s+=(-1)^h * ((n-1)%(h-1)==0); n-=h)) } \\ Rémy Sigrist, Feb 14 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Feb 14 2021
STATUS
approved