login
A068618
a(1) = 1; a(n+1) = smallest triangular number > a(n) formed by adding at least one digit to a(n).
6
1, 10, 105, 1035, 103285, 10832185, 1083241785, 1087326541785, 108703236544918785, 108870232356544491187785
OFFSET
1,2
COMMENTS
The associated numbers of A000217(j) are j = 1, 4, 14, 45, 454, 4654, 46545, 1474670, ... for n=1,2,3,... - R. J. Mathar, Sep 20 2006
From a(3) onwards the sequence coincides with A068622.
MAPLE
buffedStr := proc(n, candid) local f ; if length(n) = 0 then RETURN(true) ; fi ; f := SearchText(substring(n, 1), candid) ; if f = 0 then RETURN(false) ; else if buffedStr(substring(n, 2..-1), substring(candid, f+1..-1)) = true then RETURN(true) ; else RETURN(false) ; fi ; fi ; end: A000217 := proc(n) RETURN(n*(n+1)/2) ; end: A068618 := proc(preva) local trilo, tri ; trilo := floor(evalf(-preva/2+sqrt(preva*preva/4+preva))) ; while evalf(A000217(trilo)) <= evalf(preva) do trilo := trilo+1 ; od: while true do tri := A000217(trilo) ; if buffedStr(convert(preva, string), convert(tri, string)) = true then RETURN(tri) ; fi ; trilo := trilo+1 ; od: end: an :=1 ; for n from 2 to 15 do an := A068618(an) ; end ; # R. J. Mathar, Sep 20 2006
PROG
(PARI) { anext(n) = s=eval(Vecrev(Str(n))); d=1; r=[]; while(!#r, forvec(v=vector(d, i, [1, #s+d]), forvec(u=vector(d, i, [0, 9]), k=1; t=sum(j=1, #s+d, 10^(j-1) * if(k<=d&&j==v[k], k++; u[k-1], s[j-k+1]) ); if(t!=n&&issquare(8*t+1), r=concat(r, [t])); ), 2); d++); vecmin(r) } \\ Max Alekseyev, Apr 21 2009
CROSSREFS
KEYWORD
base,hard,more,nonn
AUTHOR
Amarnath Murthy, Feb 25 2002
EXTENSIONS
a(6)-a(8) from R. J. Mathar, Sep 20 2006
a(9)-a(10) from Max Alekseyev, Apr 21 2009, Jan 01 2014
STATUS
approved