A361501 A variant of A359143 in which all copies of a digit d are erased only when d is both the leading digit and the final digit of (a(n) concatenated with sum of digits of a(n)).
11, 112, 1124, 11248, 1124816, 112481623, 11248162328, 1124816232838, 112481623283849, 11248162328384962, 1124816232838496270, 112481623283849627077, 2486232838496270779, 248623283849627077997, 248623283849627077997113, 248623283849627077997113118, 248623283849627077997113118128
Offset: 0
Examples
a(11) = 112481623283849627077, which has digit-sum 91. So k = 11248162328384962707791 both begins and ends with 1. Erasing all the 1's from k gives a(12) = 2486232838496270779.
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
a[1] = {1, 1}; nn = 17; Do[If[And[#2 == Last[#3], n > 2], Set[k, DeleteCases[#1~Join~#3, #2]], Set[k, #1~Join~#3]] & @@ {#, First[#], IntegerDigits@ Total[#]} &[a[n - 1]]; Set[a[n], k], {n, 2, nn}]; Array[(1 - 2 Boole[First[#] == 0])*FromDigits[#] &@ a[#] &, nn] (* Michael De Vlieger, Mar 17 2023 *)
Comments