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!)
A108257 Numbers k such that concatenating k and the sum of factorials of the digits of k produces a prime. 1

%I #10 Feb 25 2024 11:01:14

%S 1,13,15,30,31,91,101,110,128,133,136,138,144,152,156,166,175,193,199,

%T 203,215,230,250,260,280,281,303,304,306,307,309,315,320,330,331,340,

%U 361,391,412,508,520,550,606,651,661,681,708,712,717,730,750,751,780

%N Numbers k such that concatenating k and the sum of factorials of the digits of k produces a prime.

%C The largest prime I have found pertaining to this sequence is A109016(Fibonacci(9837)) with 2064 digits (not proved prime, only Fermat and Lucas PRP).

%H Michael S. Branicky, <a href="/A108257/b108257.txt">Table of n, a(n) for n = 1..10000</a>

%e 193 is in the sequence because 1!+9!+3! = 362887 and 193362887 is prime.

%t Select[Range[780],PrimeQ[FromDigits[Join[IntegerDigits[#],IntegerDigits[Total[IntegerDigits[#]!]]]]]&] (* _James C. McMahon_, Feb 22 2024 *)

%o (Python)

%o from math import factorial

%o from sympy import isprime

%o def ok(n):

%o return isprime(int((s:=str(n))+str(sum(factorial(int(d)) for d in s))))

%o print([k for k in range(999) if ok(k)]) # _Michael S. Branicky_, Feb 22 2024

%Y Cf. A061602, A109016.

%K base,nonn

%O 1,2

%A _Jason Earls_, Jun 18 2005

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)