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.

A048377 Append d digits d after each digit d in decimal expansion of n.

Original entry on oeis.org

0, 11, 222, 3333, 44444, 555555, 6666666, 77777777, 888888888, 9999999999, 110, 1111, 11222, 113333, 1144444, 11555555, 116666666, 1177777777, 11888888888, 119999999999, 2220, 22211, 222222, 2223333, 22244444, 222555555, 2226666666
Offset: 0

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Comments

a(10^n) = 11 * 10^n; A007953(a(n)) = A003132(n) + A007953(n). [Reinhard Zumkeller, Jul 10 2011]

Examples

			12 becomes 1 1 2 22 = 11222.
		

Crossrefs

Cf. A048376.

Programs

  • Haskell
    import Data.Char (digitToInt)
    a048377 :: Integer -> Integer
    a048377 n =
       read $ concat $ zipWith replicate (map ((+ 1) . digitToInt) ns) ns
          where ns = show n
    -- Reinhard Zumkeller, Jul 10 2011
  • Mathematica
    den[n_]:=Module[{idn=IntegerDigits[n]},FromDigits[Flatten[Table[ Table[ idn[[i]],{idn[[i]]+1}],{i,Length[idn]}]]]]; Array[den,30,0] (* Harvey P. Dale, Sep 04 2013 *)