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!)
A089359 Primes which can be partitioned into distinct factorials. 0! and 1! are not considered distinct. 5

%I #25 Oct 15 2022 14:09:10

%S 2,3,7,31,127,151,727,751,5167,5791,5881,40351,40471,41047,41161,

%T 45361,45481,362911,363751,368047,368647,368791,403327,403951,408241,

%U 408271,408361,409081,3628927,3629671,3633991,3634591,3669241,3669847,3669961

%N Primes which can be partitioned into distinct factorials. 0! and 1! are not considered distinct.

%H Alois P. Heinz, <a href="/A089359/b089359.txt">Table of n, a(n) for n = 1..16812</a> (first 1000 terms from Seiichi Manyama)

%e From _Seiichi Manyama_, Mar 24 2018: (Start)

%e n | a(n) |

%e --+------+------------------

%e 1 | 2 | 2!

%e 2 | 3 | 2! + 1!

%e 3 | 7 | 3! + 1!

%e 4 | 31 | 4! + 3! + 1!

%e 5 | 127 | 5! + 3! + 1!

%e 6 | 151 | 5! + 4! + 3! + 1! (End)

%o (Python)

%o from sympy import isprime

%o def facbase(k, f):

%o return sum(f[i] for i, bi in enumerate(bin(k)[2:][::-1]) if bi == "1")

%o def auptoN(N): # terms up to N factorial-base digits; 20 generates b-file

%o f = [factorial(i) for i in range(1, N+1)]

%o return list(filter(isprime, (facbase(k, f) for k in range(2**N))))

%o print(auptoN(10)) # _Michael S. Branicky_, Oct 15 2022

%Y Cf. A059590, A088332, A300947, A301593.

%K nonn

%O 1,1

%A _Amarnath Murthy_, Nov 07 2003

%E More terms from _Vladeta Jovovic_, Nov 08 2003

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 25 12:27 EDT 2024. Contains 371969 sequences. (Running on oeis4.)