say gather { for (var k = 0; k < 25_000; k = k.next_palindrome(16)) { take(k) if [2, 4].all{|b| k.is_palindrome(b) } } }
[0, 1, 3, 5, 15, 17, 51, 85, 255, 257, 273, 771, 819, 1285, 1365, 3855, 4095, 4097, 4369, 12291, 13107, 20485, 21845]
Last updated 3 years ago