A347353 Lexicographically earliest sequence of distinct positive terms such that the rightmost digit of a(n) concatenated with the leftmost digit of a(n+1) form an integer that is the sum of the digits of a(n) and a(n+1).
1, 19, 1899999999, 29, 1799999999, 119, 1889999999, 128, 169999999, 1299, 178999999, 1389, 179899999, 1398, 15999999, 13999, 16899999, 14899, 16989999, 14989, 16998999, 14998, 1499999, 149999, 1589999, 158999, 1598999, 159899, 1599899, 159989, 1599989, 159998, 139999, 1599999, 148999
Offset: 1
Examples
a(1), a(2) = 1, 19 and 11 is 1 + (1+9); a(2), a(3) = 19, 1899999999 and 91 is (1+9) + (1+8+9+9+9+9+9+9+9+9); a(3), a(4) = 1899999999, 29 and 92 is (1+8+9+9+9+9+9+9+9+9) + (9+2); a(4), a(5) = 29, 1799999999 and 91 is (2+9) + (1+7+9+9+9+9+9+9+9+9); etc.
Programs
-
Mathematica
a[1]=1;a[n_]:=a[n]=(t=1;While[!IntegerQ[m=Min@Union@Flatten@Table[l=FromDigits[{Last[s=IntegerDigits@a[n-1]],k}]-Total@s;Complement[FromDigits/@Flatten[Permutations/@Select[Sort/@IntegerPartitions[l,t,Range@9],First@#==k&],1],Array[a,n-1]],{k,9}]],t++];m);Array[a,35] (* Giorgos Kalogeropoulos, May 05 2022 *)
Comments