OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
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
KEYWORD
nonn,base,easy
AUTHOR
Michel Lagneau, Aug 01 2012
STATUS
approved