login
A082948
Palindromes neither divisible by any of their digits nor by the sum of their digits.
0
323, 343, 353, 373, 383, 434, 454, 474, 494, 646, 656, 676, 686, 727, 737, 747, 757, 767, 787, 797, 838, 858, 868, 878, 898, 929, 949, 959, 969, 979, 989, 3223, 3443, 3553, 3883, 4334, 4994, 6446, 6886, 7227, 7337, 7447, 7557, 7667, 7887, 7997, 8558, 8668
OFFSET
1,1
EXAMPLE
868 is a member of the sequence since it is not divisible by 8, 6 or 22. But 4554 is not a member of this sequence. it is not divisible by 4 and 5 but it is divisible by 18.
MAPLE
digrev:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
filter:= proc(n) local L, s;
L:= convert(n, base, 10);
s:= convert(L, `+`);
andmap(t -> n mod t <> 0, {s} union convert(L, set) minus {0})
end proc:
N:=5; # to get all terms of <= N digits
Res:= NULL:
for d from 3 to N do
if d::even then
m:= d/2;
Res:= Res, op(select(filter, [seq(n*10^m + digrev(n), n=3*10^(m-1)..10^m-1)]));
else
m:= (d-1)/2;
Res:= Res, op(select(filter, [seq(seq(n*10^(m+1)+y*10^m+digrev(n), y=[0, $2..9]), n=3*10^(m-1)..10^m-1)]));
fi
od:
Res; # Robert Israel, Jun 12 2019
MATHEMATICA
ok[n_] := Block[{d = IntegerDigits@ n}, d == Reverse[d] && (d = Select[d, # > 0 &]; Mod[n, Total@ d] > 0 && Min@ Mod[n, d] > 0)]; Select[ Range[ 10^4], ok] (* Giovanni Resta, Jun 12 2019 *)
CROSSREFS
Cf. A082947.
Sequence in context: A337781 A340099 A082947 * A182554 A340118 A339517
KEYWORD
nonn,base
AUTHOR
Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 08 2003
EXTENSIONS
Definition edited by Harvey P. Dale, Dec 04 2014
STATUS
approved