A066024 Numbers k such that the product of the digits of k minus the sum of the digits of k is prime.
24, 25, 27, 29, 33, 34, 35, 37, 38, 42, 43, 45, 47, 49, 52, 53, 54, 56, 57, 59, 65, 67, 72, 73, 74, 75, 76, 78, 79, 83, 87, 92, 94, 95, 97, 125, 126, 128, 133, 144, 146, 148, 152, 162, 164, 166, 182, 184, 188, 215, 216, 218, 222, 223, 225, 227, 229, 232, 245, 247
Offset: 1
Examples
a(1)=24 because 2 + 4 = 6, 2*4 = 8, and 8 - 6 = 2, which is prime. [corrected by _Harry J. Smith_, Nov 07 2009]
Links
- Harry J. Smith, Table of n, a(n) for n = 1..1000
Programs
-
PARI
isok(k) = {my(d=digits(k)); isprime(vecprod(d)-vecsum(d))} \\ Harry J. Smith, Nov 07 2009