login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A122990
Numbers m such that (1/99)*Sum_{k=1..m} k! = A007489(m)/99 is prime.
1
8, 10, 11, 16, 22, 30, 34, 40, 42, 47, 49, 68, 74, 79, 168, 202, 245, 280, 463, 534, 803, 936, 958, 1299, 2455, 2546, 7391
OFFSET
1,1
COMMENTS
A007489(n) = Sum_{k=1..m} k! = (!(n+1) - 1) = A003422(n+1) - 1 = {0, 1, 3, 9, 33, 153, 873, 5913, 46233, 409113, 4037913, ...}. A007489(n) is divisible by 99 for n=8 and n>9. Corresponding primes of the form (!(n+1) - 1)/99 are {467, 40787, 443987, 225498914387, 11895484822660898387, 2771826449193354891007108898387, 3072603482270933019578343003268898387, ...}.
LINKS
Eric Weisstein's World of Mathematics, Left Factorial.
MATHEMATICA
f=0; Do[f=f+n!; If[PrimeQ[f/99], Print[{n, f/99}]], {n, 1, 534}]
Position[Accumulate[Range[1000]!]/99, _?PrimeQ]//Flatten (* The program generates the first 23 terms of the sequence. *) (* Harvey P. Dale, Sep 21 2023 *)
PROG
(Python)
from math import factorial
from sympy import isprime, prime
def afind(limit, startk=8):
if startk <= 8 <= limit: print(8, end=", ")
f, s, startk = 1, 0, max(startk, 10)
for i in range(1, startk):
f *= i
s += f
for k in range(startk, limit+1):
f *= k
s += f
if isprime(s//99):
print(k, end=", ")
afind(535) # Michael S. Branicky, Jan 17 2022
CROSSREFS
Cf. A007489, A003422 (Left factorial).
Sequence in context: A126803 A256385 A274560 * A288107 A062372 A374349
KEYWORD
hard,more,nonn
AUTHOR
Alexander Adamchuk, Oct 28 2006
EXTENSIONS
a(21)-a(26) from Michael S. Branicky, Jan 17 2022
a(27) from Michael S. Branicky, Apr 05 2023
STATUS
approved