A332155 Numbers with palindromic Morse code A060109.
0, 5, 19, 28, 37, 46, 55, 64, 73, 82, 91, 109, 159, 208, 258, 307, 357, 406, 456, 505, 555, 604, 654, 703, 753, 802, 852, 901, 951, 1009, 1199, 1289, 1379, 1469, 1559, 1649, 1739, 1829, 1919, 2008, 2198, 2288, 2378, 2468, 2558, 2648, 2738, 2828, 2918, 3007
Offset: 1
Examples
The Morse code for digits is "-----" for 0, ".----" for 1, "..---" for 2, ..., "....." for 5, "-...." for 6, ..., "----." for 9. (In A060109 a dot is coded with a digit 1 and a dash with a digit 2.) We see that 0 and 5 are the only digits with palindromic Morse code, this yields a(1) and a(2). Two digit numbers must be of the form 10*a + (10-a), with a = 1, ..., 9, in order to have palindromic Morse code. This yields the 9 terms a(3), ..., a(11). Three-digit terms must have 0 or 5 as middle digit and yield a two-digit term when that middle digit is deleted: this yields the next 18 terms a(12 .. 29).
Crossrefs
Programs
-
Mathematica
With[{a = Association@ Array[# -> If[# < 6, PadRight[ConstantArray[1, #], 5, 2], PadRight[ConstantArray[2, # - 5], 5, 1]] &, 10, 0]}, Select[Range[0, 3007], PalindromeQ[Flatten@ Riffle[Map[Lookup[a, #] &, IntegerDigits[#]], 0]] &]] (* Michael De Vlieger, Nov 02 2020 *)
-
PARI
select( is(n)=(Vecrev(n=digits(n))+n)%10==0, [0..3333])
Comments