This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A061596 #26 Dec 05 2024 18:00:07 %S A061596 4,6,22,114,123,129,132,141,156,165,189,192,198,213,219,231,237,273, %T A061596 291,312,321,327,345,354,372,411,435,453,459,468,486,495,516,534,543, %U A061596 549,561,594,615,648,651,684,723,732,819,846,864,891,912,918,921,945,954 %N A061596 Product of digits + 1 is prime, product of digits - 1 is prime, sum of digits + 1 is prime and sum of digits - 1 is prime. %H A061596 Harvey P. Dale, <a href="/A061596/b061596.txt">Table of n, a(n) for n = 0..10000</a> (Terms 2 through 1002 from Harry J. Smith) %e A061596 22 belongs to the sequence because (2*2)+1=5, (2*2)-1=3, (2+2)+1=5, (2+2)-1=3. %t A061596 pdQ[n_]:=Module[{idn=IntegerDigits[n]},AllTrue[Flatten[{Times@@ idn+ {1,-1}, Total[idn]+{1,-1}}],PrimeQ]]; Select[Range[1000],pdQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Feb 03 2016 *) %o A061596 (PARI) isok(k)={my(d=digits(k), s=vecsum(d), p=vecprod(d)); isprime(s+1) && isprime(s-1) && isprime(p+1) && isprime(p-1)} \\ _Harry J. Smith_, Jul 25 2009 %Y A061596 Cf. A061595. %K A061596 base,nonn %O A061596 0,1 %A A061596 _Felice Russo_, May 22 2001 %E A061596 First two terms prepended by _Harvey P. Dale_, Feb 04 2016