OFFSET
1,2
COMMENTS
A subsequence of A244423.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..203
MATHEMATICA
lim = 1000000; palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; c = Complement[Range@ lim, Prime@ Range@ PrimePi@ lim]; t = Select[c, Total@ Take[RotateRight@ DigitCount@ #, -7] == 0 &]; Select[t, palQ[Times @@ Divisors@ #] &] (* Michael De Vlieger, Sep 02 2015 *)
Rest[Select[FromDigits/@Tuples[{0, 1, 2}, 11], !PrimeQ[#]&&AllTrue[{#, Times@@ Divisors[ #]}, PalindromeQ]&]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 02 2020 *)
PROG
(Python)
from __future__ import division
from sympy import divisor_count
from gmpy2 import isqrt, t_divmod, digits
def palgen(l, b=10): # generator of palindromes in base b of length <= 2*l
if l > 0:
yield 0
for x in range(1, l+1):
n = b**(x-1)
n2 = n*b
for y in range(n, n2):
k, m = y//b, 0
while k >= b:
k, r = t_divmod(k, b)
m = b*m + r
yield y*n + b*m + k
for y in range(n, n2):
k, m = y, 0
while k >= b:
k, r = t_divmod(k, b)
m = b*m + r
yield y*n2 + b*m + k
A261534_list = [1]
for m in palgen(17, 3):
n = int(digits(m, 3))
d = int(divisor_count(n))
if d > 2:
q, r = t_divmod(d, 2)
s = digits(n**q*(isqrt(n) if r else 1))
if s == s[::-1]:
A261534_list.append(n)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Aug 31 2015
STATUS
approved