OFFSET
0,3
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
FORMULA
a(n) >= n with equality iff all the digits of the decimal representation of n, except possibly the first one, are in the range 0...4. - Rémy Sigrist, Dec 18 2019
MAPLE
a:= n-> (s-> parse(cat(seq(parse(s[i])*2, i=1..length(s))))/2)(""||n):
seq(a(n), n=0..70); # Alois P. Heinz, Dec 18 2019
PROG
(PARI) a(n, base=10) = my (d=digits(n, base), v=0); for (i=1, #d, v = v*base^max(1, #digits(2*d[i], base)) + 2*d[i]); v/2 \\ Rémy Sigrist, Dec 18 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Dec 17 2019
STATUS
approved