login
Primes p such that the sum of digits of p+2 is a composite number.
1

%I #11 Apr 28 2022 19:26:21

%S 2,7,11,13,17,29,31,37,43,53,61,67,71,73,79,89,97,101,103,107,127,139,

%T 151,157,163,167,179,181,193,211,223,229,233,241,251,257,269,271,277,

%U 283,293,307,313,331,337,347,349,359,367,373,379,383,397,409,421,431

%N Primes p such that the sum of digits of p+2 is a composite number.

%C Primes p such that p+2 is in A104211. [_R. J. Mathar_, Jan 15 2009]

%H Robert Israel, <a href="/A154679/b154679.txt">Table of n, a(n) for n = 1..10000</a>

%p filter:= proc(n) local s;

%p if not isprime(n) then return false fi;

%p s:= convert(convert(n+2,base,10),`+`);

%p s >= 4 and not isprime(s)

%p end proc:

%p select(filter, [$2..1000]); # _Robert Israel_, Mar 13 2019

%t Select[Prime[Range[100]],CompositeQ[Total[IntegerDigits[#+2]]]&] (* _Harvey P. Dale_, Apr 28 2022 *)

%Y Cf. A007953, A104211.

%K base,easy,nonn

%O 1,1

%A _Giovanni Teofilatto_, Jan 14 2009

%E Extended by _R. J. Mathar_, Jan 15 2009