A051022 Interpolate 0's between each pair of digits of n.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 500, 501, 502, 503, 504, 505
Offset: 0
Examples
a(23) = 203. a(99) = 909. a(100) = 10000. a(101) = 10001. a(111) = 10101.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- Eric Weisstein's World of Mathematics, Negadecimal
Crossrefs
Programs
-
Haskell
a051022 n = if n < 10 then n else a051022 n' * 100 + r where (n', r) = divMod n 10 -- Reinhard Zumkeller, Apr 20 2011 (HP 49G calculator) « "" + SREV 0 9 FOR i i "" + DUP 0 + SREPL DROP NEXT SREV OBJ-> ». Gerald Hillier, Apr 23 2015
-
Maple
M:= 3: # to get a(0) to a(10^M-1) A:= 0: for d from 1 to M do A:= seq(seq(a*100+b,b=0..9),a=A); od: A; # Robert Israel, Apr 23 2015
-
Mathematica
Table[FromDigits[Riffle[IntegerDigits[n],0]],{n,0,60}] (* Harvey P. Dale, Nov 17 2013 *) ToNegaBases[i_Integer, b_Integer] := FromDigits[ Rest[ Reverse[ Mod[ NestWhileList[(#1 - Mod[ #1, b])/-b &, i, #1 != 0 &], b]]]]; k = 0; lst = {}; While[k < 1001, If[k == ToNegaBases[k, 10], AppendTo[ lst, k]]; k++]; lst (* Robert G. Wilson v, Jun 11 2014 *)
-
PARI
a(n) = fromdigits(digits(n),100); \\ Kevin Ryde, Nov 07 2020
-
Python
def a(n): return int("0".join(str(n))) print([a(n) for n in range(56)]) # Michael S. Branicky, Aug 15 2022
Formula
Sums a_i*100^e_i with 0 <= a_i < 10.
a(n) = n if n < 10, otherwise a(floor(n/10))*100 + n mod 10. - Reinhard Zumkeller, Apr 20 2011 [Corrected by Kevin Ryde, Nov 07 2020]
Extensions
More terms and more precise definition from Jorge Coveiro, Apr 15 2004 and David Wasserman, Feb 26 2008
Edited by N. J. A. Sloane, Sep 14 2008 at the suggestion of R. J. Mathar
Offset fixed by Reinhard Zumkeller, Apr 20 2012
Comments