A122990 Numbers m such that (1/99)*Sum_{k=1..m} k! = A007489(m)/99 is prime.
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
Links
- Hisanori Mishima, Factorizations of many number sequences.
- Eric Weisstein's World of Mathematics, Left Factorial.
Programs
-
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 *)
-
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
Extensions
a(21)-a(26) from Michael S. Branicky, Jan 17 2022
a(27) from Michael S. Branicky, Apr 05 2023
Comments