[go: up one dir, main page]

login
A249873
In decimal representation: replace each even positioned digit with the digit sum of its double.
3
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 30, 31, 32, 33, 34, 35, 36
OFFSET
0,3
PROG
(Haskell)
a249873 n = if n == 0 then 0 else 100*a249873 n' + 10*a007953 (2*t) + d
where (n', td) = divMod n 100; (t, d) = divMod td 10
(PARI) a(n) = my(d=Vecrev(digits(n))); forstep (i=2, #d, 2, d[i] = sumdigits(2*d[i])); fromdigits(Vecrev(d)); \\ Michel Marcus, Jan 23 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Nov 08 2014
STATUS
approved