OFFSET
1,3
COMMENTS
Leading zeros in substring are allowed so 52^3 = 140608 is rejected because 14{060}8 contains a palindromic substring.
Probabilistic analysis strongly suggests that this sequence is not finite. - Franklin T. Adams-Watters, Nov 15 2006
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
19^3 = 6859 -> substrings 68, 85, 59, 685, 859 and 6859 are all non-palindromic.
MATHEMATICA
testQ@l_ :=
NoneTrue[Flatten[Table[Partition[l, n, 1], {n, 2, Length@l}], 1],
PalindromeQ];
f@nn_ := Select[Range@nn, testQ@IntegerDigits@(#^3) &]; f[300]
(* Hans Rudolf Widmer, May 13 2022 *)
PROG
(Python)
def nopal(s): return all(ss != ss[::-1] for ss in (s[i:j] for i in range(len(s)-1) for j in range(i+2, len(s)+1)))
def ok(n): return nopal(str(n**3))
print([k for k in range(160) if ok(k)]) # Michael S. Branicky, May 13 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jan 15 2000
STATUS
approved