Find palindromic numbers in both binary and ternary bases: Difference between revisions
Find palindromic numbers in both binary and ternary bases (view source)
Revision as of 19:00, 15 April 2024
, 1 month ago→{{header|EasyLang}}
Line 762:
while 1 = 1
for i = pow3p to pow3 - 1
# Assumption that the middle digit must be 1
n = (i * 3 + 1) * pow3 + reverse3 i
if ispalin2 n = 1
|