OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 29 is a term because 29 is prime and 2+9 = 11 shares no digits with 29.
MAPLE
filter:= proc(n) local L, s;
L:= convert(n, base, 10);
s:= convert(L, `+`);
convert(convert(s, base, 10), set) intersect convert(L, set) = {}
end proc:
select(filter, [seq(ithprime(i), i=1..1000)]);
MATHEMATICA
Select[Prime[Range[99]], !IntersectingQ[IntegerDigits[#], List[Total[IntegerDigits[#]]]]&] (* Stefano Spezia, Feb 28 2023 *)
PROG
(PARI) isok(p) = isprime(p) && !#setintersect(Set(digits(sumdigits(p))), Set(digits(p))); \\ Michel Marcus, Feb 27 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Feb 27 2023
STATUS
approved