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!)
A165451 Sum of factorial of digits is prime. 6
2, 10, 11, 12, 13, 20, 21, 30, 31, 100, 101, 110, 111, 122, 133, 134, 135, 136, 143, 153, 155, 163, 178, 187, 202, 212, 220, 221, 303, 304, 305, 306, 313, 314, 315, 316, 330, 331, 340, 341, 350, 351, 360, 361, 403, 413, 430, 431, 503, 505, 513, 515, 530, 531 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
1!+3!+5! = 127 and 127 is prime, so 135 appears in the sequence.
PROG
(PARI) digfac(n)=local(s=0); while(n, s=s+((n%10)!); n=n\10); return(s)
for(n=1, 1000, if(isprime(digfac(n)), print1(n, ", ")))
(Python)
from itertools import count, islice, combinations_with_replacement
from math import factorial
from sympy import isprime
from sympy.utilities.iterables import multiset_permutations
def A165451_gen(): # generator of terms
for l in count(0):
for i in range(1, 10):
fi = factorial(i)
yield from sorted(int(str(i)+''.join(map(str, k))) for j in combinations_with_replacement(range(10), l) for k in multiset_permutations(j) if isprime(fi+sum(map(factorial, j))))
A165451_list = list(islice(A165451_gen(), 50)) # Chai Wah Wu, Feb 23 2023
CROSSREFS
Cf. A061602.
Sequence in context: A171893 A278816 A043072 * A121717 A217072 A106518
KEYWORD
easy,nonn,base
AUTHOR
Rémy Sigrist, Sep 20 2009
STATUS
approved

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 March 18 22:56 EDT 2024. Contains 370952 sequences. (Running on oeis4.)