OFFSET
1,2
COMMENTS
The n-th term is the sum of m = A003056(n) repunits A000042, with the last n - m(m+1)/2 terms having one digit more than their index in that sum: see formula. The initial terms can also be described as numbers made of all of the digits 1 through m (m = 1, ..., 9) in increasing order, and at most one of these digits occurring twice in a row. - M. F. Hasler, Aug 08 2020
LINKS
Fred Schneider, Table of n, a(n) for n = 1..5000
FORMULA
EXAMPLE
Using n ones and only the + sign we get the following sums:
a(1) = 1;
a(2) = 11;
a(3) = 12 = 1 + 11;
a(4) = 112 = 1 + 111;
a(5) = 122 = 11 + 111;
a(6) = 123 = 1 + 11 + 111;
a(7) = 1123 = 1 + 11 + 1111;
a(8) = 1223 = 1 + 111 + 1111;
a(9) = 1233 = 11 + 111 + 1111.
PROG
(Haskell)
a110380 = drop 1 fn
where fn = 0 : 1 : concat (fn' 2)
fn' n = (map (+ones) (drop nv $ take (n + nv) fn)) : (fn' (n+1))
where ones = div (10^n -1) 9
nv = div ((n-1)*(n-2)) 2
-- Fred Schneider, Sep 04 2016
(PARI) apply( {A110380(n, m=A003056(n))=sum(k=1, m, 10^((n+k>(m+3)*m\2)+k)\9)}, [1..40]) \\ with {A003056(n)=(sqrtint(n*8+1)-1)\2}. M. F. Hasler, Aug 08 2020
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Jul 25 2005
EXTENSIONS
More terms from Joshua Zucker, May 08 2006
STATUS
approved