login
a(1) = 1 and then smallest n-digit triangular number starting with the least significant digit of the previous term and not a multiple of 10.
1

%I #22 Nov 18 2024 22:32:50

%S 1,15,528,8001,10011,100128,8006001,10001628,800060001,1000006281,

%T 10000020331,100000404505,5000002655781,10000002437316,

%U 600000012076636,6000000109431328,80000000600000001,100000000447232406

%N a(1) = 1 and then smallest n-digit triangular number starting with the least significant digit of the previous term and not a multiple of 10.

%e a(2) = 15 hence a(3) = 528 is the smallest 3-digit triangular number starting with 5, the least significant digit of 15.

%t a = {1}, Do[k = Ceiling[(Sqrt[8 # + 1] - 1)/2] &[Last@ IntegerDigits[ a[[i]]] * 10^i]; While[Mod[Set[m, k (k + 1)/2], 10] == 0, k++]; AppendTo[a, m], {i, 17}]; a (* _Michael De Vlieger_, Jun 11 2017 *)

%o (PARI)

%o {rT(m) = ceil((sqrt(8*m+1)-1)/2)}

%o {T(n) = (n*(n+1))/2}

%o my(m=1);for(n=1,30,my(k=rT((m%10)*10^(n-1)));while(T(k)%10==0,k++);m=T(k);print1(m, ", ")) \\ _Max Alekseyev_, Feb 15 2005

%Y Cf. A000217, A077207.

%K base,nonn,changed

%O 1,2

%A _Amarnath Murthy_, Nov 02 2002

%E Corrected and extended by _Max Alekseyev_, Feb 15 2005