login
Palindromes not divisible by any of their digits.
1

%I #13 Mar 05 2018 12:09:30

%S 323,343,353,373,383,434,454,474,494,646,656,676,686,727,737,747,757,

%T 767,787,797,838,858,868,878,898,929,949,959,969,979,989,3223,3443,

%U 3553,3883,4334,4554,4994,6446,6556,6886,7227,7337,7447,7557,7667,7887,7997

%N Palindromes not divisible by any of their digits.

%C Intersection of A002113 and A038772. - _Michel Marcus_, Mar 07 2015

%D Suggested by _Amarnath Murthy_.

%e 969 is a member of the sequence since it is neither divisible by 9 nor 6 but 8778 is not since it is divisible by 7.

%t DeleteCases[Select[Range[9000],PalindromeQ],_?(AnyTrue[#/Union[ IntegerDigits[ #]],IntegerQ]&)]//Quiet (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Mar 05 2018 *)

%o (PARI) isok(n) = {d = digits(n); if (Vecrev(d) == d, for (i=1, #d, if (d[i] && !(n % d[i]), return (0));); return (1););} \\ _Michel Marcus_, Mar 07 2015

%Y Cf. A002113 (palindromes in base 10), A038772 (numbers not divisible by any of their digits).

%K easy,nonn,base

%O 1,1

%A Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 08 2003