Safe for palindrome based on 41-bit message, but not all palindromes
It turns out that this problem is related to primes, in some way. I wrote the program to find out if any given length was 'safe' (using the graph-based algorithm in PalindromeEncodingSafeProof and the very exellent jgrapht). Here are the safe lengths between 1 and 200:
1,2,3,5,6,8,9,11,14,15,18,20,21,23,26,29,30,33,35,36,39,41,44,48,50,51,53,
54,56,63,65,68,69,74,75,78,81,83,86,89,90,95,96,98,99,105,111,113,114,
16,119,120,125,128,131,134,135,138,140,141,146,153,155,156,158,165,
168,173,174,176,179,183,186,189,191,194,198,200,204
I did a search for this sequence on the online integer sequence library and it came up as sequence A005097. I've confirmed via diff that these sequences match exactly up to 156 (which is the largest number on the sequence given).