[go: up one dir, main page]

login
A100083
Numbers n such that n divides Sum_{m=1..n} (m+1)!.
2
1, 2, 4, 8, 31, 62, 124, 248, 373, 746, 1492, 2984, 11563, 23126, 46252, 92504
OFFSET
1,2
COMMENTS
n | Sum_{m=1..n} (m+1)! => n | Sum_{m=2..n+1} m! => n | Sum_{m=2..n-1} m! for n>2 => Sum_{m=2..n-1+k} m! == 0 (mod n) for all k>=0. If n is present and even, then n/2 is present. - Robert G. Wilson v, Nov 11 2004
The terms occur in groups of 4, in a series of n, 2n, 4n, and 8n. Is there any way of calculating the next term in the reduced series: 1, 31, 373, 11563? - Harvey P. Dale, Jun 11 2013
If n is in the sequence and k|n, then k is also in the sequence. In the other direction, if s and t is in the sequence and gcd(s,t)=1, then n=s*t is also in the sequence. Therefore, we need to check only the prime powers, after which we can easily build the rest of the sequence. The prime powers in the sequence begin with 2, 4, 8, 31, 373, ... - Robert Gerbicz, Jun 11 2013
For any terms in this sequence, their LCM also belongs to this sequence. If a(17) exists, it is prime. - Max Alekseyev, Jun 11 2013
a(17) > 74*10^7. - Lars Blomberg, Jun 15 2013
Integers n such that n | (A003422(n) - 2). - David W. Wilson, Jul 20 2013
LINKS
R. Gerbicz (and others), Re: A100083, SeqFan list, Jun 11 2013
FORMULA
Numbers n such that n | (A007489(n+1)-1), also n | (A003422(n+2)-2), n | A054116(n+1).
EXAMPLE
The first few partial sums of (m+1)!, starting with m=1 are 2, 8, 32, 152, 872, 5912, 46232, 409112. Of these, 2 is divisible by 1; 8 is divisible by 2; 152 is divisible by 4; but 32 is not divisible by 3. Therefore the first few terms of this sequence are 1, 2, 4.
MATHEMATICA
s = -1; Do[s = s + n!; If[ Mod[s, n] == 0, Print[n]], {n, 50000}] (* Robert G. Wilson v, Nov 15 2004 *)
Take[Flatten[Select[MapIndexed[List, Accumulate[Range[2, 24000]!]], Divisible[#[[1]], #[[2, 1]]]&]], {2, -1, 2}] (* Harvey P. Dale, Jun 11 2013 *)
PROG
(PARI) s=0:for(n=1, 5000, s=s+(n+1)!: if(s%n==0, print(n)))
(PARI) is(n)=my(t=Mod(1, n)); sum(m=2, n+1, t*=m)==0 \\ Charles R Greathouse IV, Jun 11 2013
(Python)
from itertools import count, islice
def A100083_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
a, c = 0, 1
for m in range(2, n):
c = c*m%n
if c==0:
break
a = (a+c)%n
if not a:
yield n
A100083_list = list(islice(A100083_gen(), 20)) # Chai Wah Wu, Apr 16 2024
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Mark Hudson (mrmarkhudson(AT)hotmail.com), Nov 08 2004
EXTENSIONS
a(13)-a(14) from Robert G. Wilson v, Nov 15 2004
a(15) from Harvey P. Dale, Jun 11 2013
a(16) from Giovanni Resta, confirmed by Charles R Greathouse IV and Robert G. Wilson v, Jun 11 2013
Edited by Max Alekseyev, Mar 27 2015
STATUS
approved