login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A215059 Numbers n such that (sum of factorial of decimal digits of n) + (product of factorial of decimal digits of n) is prime. 1

%I #8 Nov 26 2013 13:31:53

%S 1,10,11,12,13,15,20,21,30,31,50,51,1000,1001,1002,1010,1011,1012,

%T 1020,1021,1100,1101,1102,1110,1111,1112,1120,1121,1200,1201,1210,

%U 1211,1339,1344,1345,1354,1356,1359,1365,1366,1368,1386,1393,1395,1434,1435,1443

%N Numbers n such that (sum of factorial of decimal digits of n) + (product of factorial of decimal digits of n) is prime.

%H Harvey P. Dale, <a href="/A215059/b215059.txt">Table of n, a(n) for n = 1..1000</a>

%e 1345 is in the sequence because (1! + 3! + 4! + 5! ) + (1! * 3! * 4! * 5!) = 151 + 17280 = 17431 is prime.

%p A:= proc(n) add(d!, d=convert(n, base, 10)) ; end proc:

%p B:= proc(n) mul(d!, d=convert(n, base, 10)) ; end proc:

%p isA:= proc(n) isprime(A(n)+B(n)) ; end proc:

%p for n from 1 to 1500 do if isA(n) then printf("%a, ", n) ; end if; end do:

%t fdpQ[n_]:=Module[{f=IntegerDigits[n]!},PrimeQ[Total[f]+Times@@f]]; Select[ Range[1500],fdpQ] (* _Harvey P. Dale_, Nov 26 2013 *)

%Y Cf. A185300.

%K nonn,base,easy

%O 1,2

%A _Michel Lagneau_, Aug 01 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)