login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A321537 Write n in base 10, shorten all the runs of successive identical digits by 1. 3
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,23

COMMENTS

More than the usual number of terms are shown in order to reach some interesting terms.

All primes vanish except those in A050758.

LINKS

Chai Wah Wu, Table of n, a(n) for n = 0..10000

EXAMPLE

22 -> 2, so a(22)=2 is the first term > 1.

10 in not reached until a(1100) = 10.

MAPLE

read("transforms"):

A321537 := proc(n)

    local dgsin, dgsout, pos ;

    dgsin := convert(n, base, 10) ;

    dgsout := [] ;

    for pos from 2 to nops(dgsin) do

        if op(pos, dgsin) = op(pos-1, dgsin) then

            dgsout := [op(pos, dgsin), op(dgsout)] ;

        end if;

    end do:

    digcatL(dgsout) ;

end proc: # R. J. Mathar, Nov 14 2018

MATHEMATICA

Array[FromDigits[Join @@ Map[Most, Split@ IntegerDigits@ #]] &, 123] (* Michael De Vlieger, Nov 13 2018 *)

PROG

(Python)

from re import split

def A321537(n):

    return int('0'+''.join(d[:-1] for d in split('(0+)|(1+)|(2+)|(3+)|(4+)|(5+)|(6+)|(7+)|(8+)|(9+)', str(n)) if d != '' and d != None)) # Chai Wah Wu, Nov 13 2018

(PARI) a(n)={my(v=digits(n)); my(L=List()); for(i=1, #v, my(t=v[i]); if(i>1 && t==v[i-1], listput(L, t))); fromdigits(Vec(L))} \\ Andrew Howroyd, Nov 13 2018

CROSSREFS

A base-10 analog of A318921.

Cf. A321536, A050758.

Sequence in context: A047751 A028706 A060175 * A218876 A028621 A226557

Adjacent sequences:  A321534 A321535 A321536 * A321538 A321539 A321540

KEYWORD

nonn,base

AUTHOR

N. J. A. Sloane, Nov 13 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 February 28 22:12 EST 2020. Contains 332335 sequences. (Running on oeis4.)