login

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”).

Product of digits + 1 is prime, sum of digits + 1 is prime and sum of digits - 1 is prime.
2

%I #16 Dec 05 2024 17:59:52

%S 4,6,22,66,112,114,121,123,129,132,141,147,156,165,174,189,192,198,

%T 211,213,219,231,237,273,279,291,297,312,321,327,345,354,369,372,396,

%U 411,417,435,453,459,468,471,477,486,495,516,534,543,549,561,567,576,594

%N Product of digits + 1 is prime, sum of digits + 1 is prime and sum of digits - 1 is prime.

%H Harry J. Smith, <a href="/A061595/b061595.txt">Table of n, a(n) for n = 1..1003</a>

%e For 147 we have (1*4*7) + 1 = 29, (1+4+7) + 1 = 13, (1+4+7) - 1 = 11.

%p a := proc (n) local nn: nn := convert(n, base, 10): if isprime(1+product(nn[j], j = 1 .. nops(nn))) = true and isprime(1+sum(nn[j], j = 1 .. nops(nn))) = true and isprime(-1+sum(nn[j], j = 1 .. nops(nn))) = true then n else end if end proc: seq(a(n), n = 1 .. 615); # _Emeric Deutsch_, Aug 02 2009

%o (PARI) isok(k)={my(d=digits(k), s=vecsum(d)); isprime(s+1) && isprime(s-1) && isprime(vecprod(d)+1)} \\ _Harry J. Smith_, Jul 25 2009

%Y Subsequence of A167711.

%K nonn,base

%O 1,1

%A _Felice Russo_, May 22 2001

%E a(1)=4 and a(2)=6 added by _Emeric Deutsch_, Aug 02 2009