|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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:
|
|
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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 08 2003
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|