login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A321803 Keep only consecutive identical decimal digits of n; write 0 if all digits disappear. 2
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 111, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,12

COMMENTS

Consecutive identical digits of n are kept. Leading zeros are erased unless the result is 0. If all digits are erased, we write 0 for the result (A321804 is another version, which uses -1 for the empty string).

More than the usual number of terms are shown in order to reach some interesting examples. Agrees with A321797 for n < 121.

Differs from A321538 for the first time at n = 11011. - Chai Wah Wu, Nov 29 2018

LINKS

Table of n, a(n) for n=0..199.

EXAMPLE

123321 becomes 33, 1123 becomes 11, 112331 becomes 1133, and 100223 becomes 22 (as we don't accept leading zeros). Note that 12321 disappears immediately and we get 0.

MATHEMATICA

Array[FromDigits[Join @@ Select[Split@ IntegerDigits@ #, Length@ # >= 2 &] /. {} -> {0}] &, 200, 0] (* Michael De Vlieger, Nov 20 2018 *)

PROG

(Python)

from re import split

def A321803(n):

    return int('0'+''.join(d if len(d) != 1 else '' for d in split('(0+)|(1+)|(2+)|(3+)|(4+)|(5+)|(6+)|(7+)|(8+)|(9+)', str(n)) if d != '' and d != None))

CROSSREFS

Cf. A320486, A321800, A321797, A321538.

Sequence in context: A259391 A279540 A321538 * A321797 A113043 A110408

Adjacent sequences:  A321800 A321801 A321802 * A321804 A321805 A321806

KEYWORD

nonn,base

AUTHOR

Chai Wah Wu, Nov 19 2018

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 14 20:08 EDT 2019. Contains 328022 sequences. (Running on oeis4.)