Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #15 Feb 11 2018 01:04:30
%S 1,10,105,1035,103285,10832185,1083241785,1087326541785,
%T 108703236544918785,108870232356544491187785
%N a(1) = 1; a(n+1) = smallest triangular number > a(n) formed by adding at least one digit to a(n).
%C 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
%C From a(3) onwards the sequence coincides with A068622.
%p 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
%o (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
%Y Cf. A068618, A068619, A068622, A068621, A068623, A068624.
%K base,hard,more,nonn
%O 1,2
%A _Amarnath Murthy_, Feb 25 2002
%E a(6)-a(8) from _R. J. Mathar_, Sep 20 2006
%E a(9)-a(10) from _Max Alekseyev_, Apr 21 2009, Jan 01 2014