A113589 A complementary variation of 'n described': if n is read as "a ones b twos" then a(n) = "one a's two b's", etc.
0, 1, 11, 111, 1111, 11111, 111111, 1111111, 11111111, 111111111, 1, 2, 111, 1111, 11111, 111111, 1111111, 11111111, 111111111, 1111111111, 11, 111, 22, 11111, 111111, 1111111, 11111111, 111111111, 1111111111, 11111111111, 111, 1111, 11111, 222
Offset: 0
Examples
A045918(10) = 1110 = 'one one one zero', hence a(10) = 'one one, zero ones' = 1. A045918(11) = 21 = 'two ones', hence a(11) = 'one twos' = 2. a(123) = 111111.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10000
Programs
-
PARI
a(n) = { my (d=[]); while (n, my (t=n%10, k=0); while (n%10==t, n\=10; k++;); for (i=1, t, d=concat(digits(k), d))); fromdigits(d) } \\ Rémy Sigrist, Feb 09 2022
Formula
a(A002275(n)) = n. - Rémy Sigrist, Feb 09 2022
Extensions
Extended and corrected by Nathaniel Johnston, Apr 29 2011
a(0) = 0 prepended by Rémy Sigrist, Feb 09 2022