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.

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

This page as a plain text file.
%I A260522 #5 Jul 28 2015 12:44:57
%S A260522 1,10,100,1000,10000,100000,1000000,10000000,100000000,1000000000,12,
%T A260522 120,210,2010,20010,200010,2000010,20000010,200000010,2000000010,102,
%U A260522 120,1200,2100,20100,200100,2000100,20000100,200000100,2000000100
%N A260522 Concatenate the positions of digits 9, 8,..., 0 in the decimal representation of n, using 1 for the leftmost digit etc., and 0 when the digit does not occur.
%e A260522 Consider n=1103, digits '9' through '4' do not occur, digit '3' at 4th position, digit '2' does not occur, digit '1' in 1st and 2nd place, and digit '0' is at 3rd position. Thus a(1103) = 00000040123 = 40123.
%o A260522 (PARI) a(n)={my(p=vector(10));for(i=1,#n=if(n,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))}
%Y A260522 Cf. A045918 (the classical "look and say" sequence).
%Y A260522 Cf. A260519 - A260521 for variants (counting from the right or starting with digit 0).
%K A260522 nonn,base
%O A260522 0,2
%A A260522 _M. F. Hasler_, Jul 28 2015