Numbers in base 10 that are palindromic in bases 2 4 and 16
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) }
}
}
Output:
[0, 1, 3, 5, 15, 17, 51, 85, 255, 257, 273, 771, 819, 1285, 1365, 3855, 4095, 4097, 4369, 12291, 13107, 20485, 21845]
PreviousNumbers in base-16 representation that cannot be written with decimal digitsNextNumbers which are the cube roots of the product of their proper divisors
Last updated
Was this helpful?