OFFSET
1,2
COMMENTS
Equivalent: Numbers such that the LCM of their palindromic divisors (A087999) is 1, or,
Numbers such that the number of palindromic divisors (A087990) is 1.
All terms are odd.
The 1st family consists of non-palindromic primes that form the subsequence A334321.
The 2nd family consists of {p^k, p prime, k >= 2} such that p^j for 1 <= j <= k is not a palindrome {169 = 13^2, 289 = 17^2, 361 = 19^2, ..., 2197 = 13^3, ...} (see examples).
The 3rd family consists of products p_1^q_1 * ... * p_k^q_k with k >= 2, all of whose divisors are nonpalindromic {221 = 13 * 27, 247 = 13 * 19, 299 = 13 * 23, 377 = 13 * 29, 391 = 17 * 23, 403 = 13 * 31, 481 = 13 * 37, ...}.
Also, equivalent: numbers all of whose divisors > 1 are nonpalindromic (A029742). - Bernard Schott, Jul 14 2022
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
EXAMPLE
49 = 7^2, the divisor 7 is a palindrome so 49 is not a term.
169 = 13^2, divisors of 169 are {1, 13, 169} and 169 is a term.
391 = 17*23, divisors of 391 are {1,17,23,391} and 391 is a term.
307^2 = 94249 that is palindrome, so 94249 is not a term.
MAPLE
notpali:= proc(n) local L;
L:= convert(n, base, 10);
L <> ListTools:-Reverse(L)
end proc:
filter:= proc(n) option remember; andmap(notpali, numtheory:-divisors(n) minus {1}) end proc:
select(filter, [seq(i, i=1..400, 2)]); # Robert Israel, Apr 28 2020
MATHEMATICA
Select[Range[300], !AnyTrue[Rest @ Divisors[#], PalindromeQ] &] (* Amiram Eldar, Apr 26 2020 *)
PROG
(PARI) ispal(n) = my(d=digits(n)); d == Vecrev(d);
isok(n) = fordiv(n, d, if (d>1 && ispal(d), return(0))); return(1); \\ Michel Marcus, Apr 26 2020
(Python)
from sympy.ntheory import divisors, is_palindromic
def ok(n): return not any(is_palindromic(d) for d in divisors(n)[1:])
print(list(filter(ok, range(1, 308, 2)))) # Michael S. Branicky, May 08 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Apr 26 2020
STATUS
approved