login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Interpolate 0's between each pair of digits of n.
10

%I #68 Feb 21 2023 02:08:17

%S 0,1,2,3,4,5,6,7,8,9,100,101,102,103,104,105,106,107,108,109,200,201,

%T 202,203,204,205,206,207,208,209,300,301,302,303,304,305,306,307,308,

%U 309,400,401,402,403,404,405,406,407,408,409,500,501,502,503,504,505

%N Interpolate 0's between each pair of digits of n.

%C These numbers have the same decimal and negadecimal representations.

%C Or fixed points of decimal negadecimal conversion. - _Gerald Hillier_, Apr 23 2015

%H Reinhard Zumkeller, <a href="/A051022/b051022.txt">Table of n, a(n) for n = 0..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Negadecimal.html">Negadecimal</a>

%F Sums a_i*100^e_i with 0 <= a_i < 10.

%F 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]

%F a(n) = A338754(n)/11. - _Kritsada Moomuang_, Oct 20 2019 [Corrected by _Kevin Ryde_, Nov 07 2020]

%e a(23) = 203.

%e a(99) = 909.

%e a(100) = 10000.

%e a(101) = 10001.

%e a(111) = 10101.

%p M:= 3: # to get a(0) to a(10^M-1)

%p A:= 0:

%p for d from 1 to M do

%p A:= seq(seq(a*100+b,b=0..9),a=A);

%p od:

%p A; # _Robert Israel_, Apr 23 2015

%t Table[FromDigits[Riffle[IntegerDigits[n],0]],{n,0,60}] (* _Harvey P. Dale_, Nov 17 2013 *)

%t ToNegaBases[i_Integer, b_Integer] := FromDigits[ Rest[ Reverse[ Mod[ NestWhileList[(#1 - Mod[ #1, b])/-b &, i, #1 != 0 &], b]]]];

%t k = 0; lst = {}; While[k < 1001, If[k == ToNegaBases[k, 10], AppendTo[ lst, k]]; k++]; lst (* _Robert G. Wilson v_, Jun 11 2014 *)

%o (Haskell)

%o a051022 n = if n < 10 then n else a051022 n' * 100 + r

%o where (n', r) = divMod n 10

%o -- _Reinhard Zumkeller_, Apr 20 2011

%o (HP 49G calculator)

%o « "" + SREV 0 9

%o FOR i i "" + DUP 0 + SREPL DROP

%o NEXT SREV OBJ->

%o ». _Gerald Hillier_, Apr 23 2015

%o (PARI) a(n) = fromdigits(digits(n),100); \\ _Kevin Ryde_, Nov 07 2020

%o (Python)

%o def a(n): return int("0".join(str(n)))

%o print([a(n) for n in range(56)]) # _Michael S. Branicky_, Aug 15 2022

%Y Cf. A039723, A063010, A092908 (primes), A092909 (on primes), A338754 (*11).

%Y In other bases: A000695, A037314, A276089.

%K nonn,easy,base

%O 0,3

%A _Eric W. Weisstein_, Dec 11 1999

%E More terms and more precise definition from _Jorge Coveiro_, Apr 15 2004 and _David Wasserman_, Feb 26 2008

%E Edited by _N. J. A. Sloane_, Sep 14 2008 at the suggestion of _R. J. Mathar_

%E Offset fixed by _Reinhard Zumkeller_, Apr 20 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 05:15 EDT 2024. Contains 376097 sequences. (Running on oeis4.)