Find the super palindromes!
Jelly, 13 12 9 8 bytes
Æf×\D⁼U$
Try it online! or verify all test cases.
How it works
Æf×\D⁼U$ Main link. Argument: n
Æf Yield all prime factors of n, with multiplicities and in ascending order.
×\ Take the cumulative product.
D Decimal; convert each product into the array of its base 10 digits.
$ Combine the two links to the left into a monadic chain.
U Upend; reverse all arrays of decimal digits.
⁼ Test for equality.
Mathematica, 64 bytes
And@@PalindromeQ/@FixedPointList[#/FactorInteger[#][[-1,1]]&,#]&
Unnamed function, returning True
or False
. Forms a list by starting at the input, then iterating the function "me divided by my largest prime factor" until the output doesn't change. (Fortunately, Mathematica now thinks the largest prime factor of 1 is 1.) Then tests whether the list entries are palindromes (yay built-ins! boo function name length!) and And
s them all together.
Mathematica, 51 bytes
#<2||PalindromeQ@#&�[#/FactorInteger[#][[-1,1]]]&
Recursive anonymous function. Takes a number as input and returns True
or False
as output.