cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A260521 Concatenate the positions of digits 9, 8,..., 0 in the decimal representation of n, using 1 for the rightmost digit etc., and 0 when the digit does not occur.

Original entry on oeis.org

1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 21, 120, 120, 1020, 10020, 100020, 1000020, 10000020, 100000020, 1000000020, 201, 210, 1200, 1200, 10200, 100200, 1000200, 10000200, 100000200, 1000000200
Offset: 0

Views

Author

M. F. Hasler, Jul 28 2015

Keywords

Examples

			Consider n=1103, digits '9' through '4' do not occur, digit '3' at 1st position (looking from the right), digit '2' does not occur, digit '1' in 3rd and 4th place, and digit '0' is at 2nd position. Thus a(1103) = 00000010342 = 10342.
		

Crossrefs

Cf. A045918 (the classical "look and say" sequence).
Cf. A260519 - A260522 for variants (counting from the right or starting with digit 0).

Programs

  • PARI
    A260521=a(n)={my(p=vector(10));for(i=1,#n=if(n,Vecrev(digits(n)),[0]),p[n[i]+1]=if(p[n[i]+1],concat(p[n[i]+1],i),i));p=concat(Vecrev(p));p[1]=Str(p[1]);eval(concat(p))}