OFFSET
0,3
COMMENTS
Please see discussion in A337857.
Similar to A137564 from which first differs at a(101) = 101 here, there a(101) = 10.
Differs from A106612 starting at n=100. - R. J. Mathar, Oct 08 2020
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..10000
EXAMPLE
a(100) = 10. Note that the second zero from the index n = 100 has been removed.
a(101) = 101.
a(1211323171) = 121323171. Note that the third "1" from the index n has been removed).
PROG
(Perl) sub a {my($n)=@_; $n =~ s/(.)\1+/$1/g; $n} # Kevin Ryde, Oct 04 2020
(Python)
from itertools import groupby
def a(n): return int("".join(k for k, g in groupby(str(n))))
print([a(n) for n in range(75)]) # Michael S. Branicky, Jul 23 2022
(PARI) a(n) = if(n < 10, return(n)); if(n%10 == (n\10)%10, return(a(n\10)), return(a(n\10)*10+n%10)) \\ David A. Corneth, Jul 23 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Rodolfo Kurchan, Sep 27 2020
STATUS
approved