Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 May 24 2023 19:14:58
%S 11,13,17,211,233,277,367,431,457,523,541,547,587,727,743,761,853,857,
%T 1153,1223,1373,1447,1483,1531,1571,1627,1663,1733,1861,2141,2213,
%U 2251,2273,2293,2347,2383,2411,2437,2473,2521,2617,2657,2741,2833,2851,3221,3371
%N Primes p such that the sum of decimal digits of p divides the product of decimal digits of p+1 and that product is nonzero.
%H Nathaniel Johnston, <a href="/A178339/b178339.txt">Table of n, a(n) for n = 1..10000</a>
%e 2+3+3 = 8 divides 2*3*4 = 24, so 233 is a member.
%p A178339 := proc(n) option remember: local p,q: if(n=1)then return 11: fi: p:=procname(n-1): do p:=nextprime(p): q:=mul(d,d=convert(p+1,base,10)): if(q>0 and q mod add(d,d=convert(p,base,10)) = 0)then return p: fi: od: end: seq(A178339(n),n=1..47); # _Nathaniel Johnston_, May 27 2011
%t fQ[n_] := Block[{s = Plus @@ IntegerDigits@n, p = Times @@ IntegerDigits[n + 1]}, Mod[p, s] == 0 && p > 0]; Select[ Prime@ Range@ 250, fQ@# &]; Select[ Prime@ Range@ 500, fQ@# &]
%t Select[Prime[Range[500]],DigitCount[#+1,10,0]==0&&Divisible[Times@@IntegerDigits[ #+1],Total[ IntegerDigits[#]]]&] (* _Harvey P. Dale_, May 24 2023 *)
%K base,easy,nonn
%O 1,1
%A _Giovanni Teofilatto_, May 25 2010
%E Corrected and extended by _Robert G. Wilson v_, Jun 05 2010
%E Name corrected by _Nathaniel Johnston_, May 27 2011