OFFSET

1,1

COMMENTS

A prime quartet is a set of four different prime numbers such that the fourth number is a 1-digit number which is the sum of the digits of the third number, the third number is the sum of the digits of the second number and the second number is the sum of the digits of the first number.

Different from A106766.

Comment from Joshua Zucker, Apr 24 2007, on the difference between this sequence and A106766: The digit sum must be the largest member of a prime trio, so the first number where the sequences differ must be with digit sum 47 and thus have at least 6 digits - so until then you get all the primes with 4 or 5 digits that have digit sum 29.

a(2322)=389999 is the first value different from A106766, where A106766(2322)=390359. See also A106778 = primes with digit sum = 47: A106778(1)=389999. - Martin Fuller and Ray Chandler, Apr 24 2007

The sequence of prime quintet leaders is probably too large for the OEIS; its first term is the 334-digit prime 5*10^333-10^330-10^328-1 with sum of digits a(1) = 2999. - Charles R Greathouse IV, Mar 11 2022

LINKS

Harvey P. Dale, Table of n, a(n) for n = 1..2000

L. Stevens, Prime ensembles

EXAMPLE

2999 is in the sequence because it is the largest number of the prime quartet (2999,29,11,2).

MATHEMATICA

pqQ[n_]:=Module[{p1=NestList[Total[IntegerDigits[#]]&, n, 3]}, AllTrue[ Take[ p1, 3], #>9&]&&AllTrue[p1, PrimeQ]]; Select[Range[16000], pqQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 02 2020 *)

PROG

(PARI) DigitSum(n, b=10)=local(x); x=0; while(n, x+=n%b; n\=b); x

PrimeEnsemble(n, b=10)=local(x); x=1; while(ispseudoprime(n), if(n<b, return(x)); n=DigitSum(n, b); x++); 0

forprime(p=2, 16000, if(PrimeEnsemble(p)>=4, print1(p", "))); \\ Martin Fuller

CROSSREFS

KEYWORD

base,nonn

AUTHOR

Luc Stevens (lms022(AT)yahoo.com), May 27 2006

STATUS

approved