OFFSET
1,3
PROG
(PARI) is(n, base=2) = { my (d=digits(n, base), t=[]); forstep (k=#d, 1, -1, if (d[k], t=Vecrev(t); ); t=concat(d[k], t)); n==fromdigits(t, base) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 05 2020
STATUS
approved