login
A215059
Numbers n such that (sum of factorial of decimal digits of n) + (product of factorial of decimal digits of n) is prime.
1
1, 10, 11, 12, 13, 15, 20, 21, 30, 31, 50, 51, 1000, 1001, 1002, 1010, 1011, 1012, 1020, 1021, 1100, 1101, 1102, 1110, 1111, 1112, 1120, 1121, 1200, 1201, 1210, 1211, 1339, 1344, 1345, 1354, 1356, 1359, 1365, 1366, 1368, 1386, 1393, 1395, 1434, 1435, 1443
OFFSET
1,2
LINKS
EXAMPLE
1345 is in the sequence because (1! + 3! + 4! + 5! ) + (1! * 3! * 4! * 5!) = 151 + 17280 = 17431 is prime.
MAPLE
A:= proc(n) add(d!, d=convert(n, base, 10)) ; end proc:
B:= proc(n) mul(d!, d=convert(n, base, 10)) ; end proc:
isA:= proc(n) isprime(A(n)+B(n)) ; end proc:
for n from 1 to 1500 do if isA(n) then printf("%a, ", n) ; end if; end do:
MATHEMATICA
fdpQ[n_]:=Module[{f=IntegerDigits[n]!}, PrimeQ[Total[f]+Times@@f]]; Select[ Range[1500], fdpQ] (* Harvey P. Dale, Nov 26 2013 *)
CROSSREFS
Cf. A185300.
Sequence in context: A339093 A072554 A138582 * A362264 A308105 A066309
KEYWORD
nonn,base,easy
AUTHOR
Michel Lagneau, Aug 01 2012
STATUS
approved