OFFSET
1,1
COMMENTS
A prime trio is a set of three distinct prime numbers such that the third number is a 1-digit number which is the sum of the digits of the second number and the second number is the sum of the digits of the first number.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Luc Stevens, Prime ensembles
EXAMPLE
443 is in the sequence because it is the largest number of the prime trio (443, 11, 2).
599 is the first term with sum of digits different from 11 (cf. A106754), namely 23 (cf. A106762). This sequence contains also all primes with sum of digits equal to 41, 43, 61 etc., but not 29, 47, ... since the second digit sum must be a single-digit prime, i.e., 2, 3, 5 or 7. - M. F. Hasler, Mar 09 2022
MAPLE
filter:= proc(n) local x, y;
if not isprime(n) then return false fi;
x:= convert(convert(n, base, 10), `+`);
if x < 10 or not isprime(x) then return false fi;
y:= convert(convert(x, base, 10), `+`);
member(y, {2, 3, 5, 7})
end proc:
select(filter, [seq(i, i=11..10000, 2)]); # Robert Israel, May 21 2021
MATHEMATICA
ptQ[n_]:=Module[{c=NestList[Total[IntegerDigits[#]]&, n, 2]}, Length[ Union[c]] == 3&&And@@PrimeQ[c]]; Select[Prime[Range[500]], ptQ] (* Harvey P. Dale, Aug 15 2012 *)
PROG
(PARI) select( {is_A119891(n, s=sumdigits(n))=bittest(172, sumdigits(s)) && isprime(s) && s>9 && isprime(n)}, primes([1, 2345])) \\ M. F. Hasler, Mar 09 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), May 27 2006
STATUS
approved