OFFSET
1,1
COMMENTS
Palindromes in the sequence A229970.
EXAMPLE
The product of the proper divisors of 4 is 2 (also a palindrome, different from 4). So, 4 is a member of this sequence.
The proper divisors of 1001 are 1, 7, 11, 13, 77, 91, and 143. 1*7*11*13*77*91*143 = 1001^3 = 1003003001 (also a palindrome, different from 1001). So, 1001 is a member of this sequence.
MATHEMATICA
palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; fQ[n_] := Block[{s = Times @@ Most@ Divisors@ n}, And[palQ@ s, s > 1, s != n]]; Select[Select[Range@ 1000000, palQ], fQ] (* Michael De Vlieger, Apr 06 2015 *)
ppdpQ[n_]:=Module[{pp=Times@@Most[Divisors[n]]}, AllTrue[{n, pp}, PalindromeQ]&&pp>1&&pp!=n]; Select[Range[115*10^4], ppdpQ] (* The program generates the first 8 terms of the sequence. *) (* Harvey P. Dale, Sep 18 2022 *)
PROG
(Python)
from sympy import divisors
def PD(n):
p = 1
for i in divisors(n):
if i != n:
p *= i
return p
def pal(n):
r = ''
for i in str(n):
r = i + r
return r == str(n)
{print(n, end=', ') for n in range(1, 10**6) if pal(n) and pal(PD(n)) and (PD(n)-1) and PD(n)-n}
# Simplified by Derek Orr, Apr 05 2015
# Syntax error fixed by Robert C. Lyons, Mar 17 2023
(PARI) pal(n)=d=digits(n); Vecrev(d)==d
for(n=1, 10^6, D=divisors(n); p=prod(i=1, #D-1, D[i]); if(pal(n)&&pal(p)&&p-1&&p-n, print1(n, ", "))) \\ Derek Orr, Apr 05 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Derek Orr, Oct 04 2013
EXTENSIONS
a(7)-a(22) from Giovanni Resta, Oct 06 2013
Name edited by Derek Orr, Apr 05 2015
STATUS
approved