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!)
A100083 Numbers n such that n divides Sum_{m=1..n} (m+1)!. 2

%I #54 Apr 16 2024 16:47:38

%S 1,2,4,8,31,62,124,248,373,746,1492,2984,11563,23126,46252,92504

%N Numbers n such that n divides Sum_{m=1..n} (m+1)!.

%C 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

%C 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

%C 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

%C 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

%C a(17) > 74*10^7. - _Lars Blomberg_, Jun 15 2013

%C Integers n such that n | (A003422(n) - 2). - _David W. Wilson_, Jul 20 2013

%H R. Gerbicz (and others), <a href="http://list.seqfan.eu/oldermail/seqfan/2013-June/011295.html">Re: A100083</a>, SeqFan list, Jun 11 2013

%F Numbers n such that n | (A007489(n+1)-1), also n | (A003422(n+2)-2), n | A054116(n+1).

%e 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.

%t s = -1; Do[s = s + n!; If[ Mod[s, n] == 0, Print[n]], {n, 50000}] (* _Robert G. Wilson v_, Nov 15 2004 *)

%t Take[Flatten[Select[MapIndexed[List,Accumulate[Range[2,24000]!]], Divisible[#[[1]],#[[2,1]]]&]],{2,-1,2}] (* _Harvey P. Dale_, Jun 11 2013 *)

%o (PARI) s=0:for(n=1,5000,s=s+(n+1)!: if(s%n==0,print(n)))

%o (PARI) is(n)=my(t=Mod(1,n));sum(m=2,n+1,t*=m)==0 \\ _Charles R Greathouse IV_, Jun 11 2013

%o (Python)

%o from itertools import count, islice

%o def A100083_gen(startvalue=1): # generator of terms >= startvalue

%o for n in count(max(startvalue,1)):

%o a, c = 0, 1

%o for m in range(2,n):

%o c = c*m%n

%o if c==0:

%o break

%o a = (a+c)%n

%o if not a:

%o yield n

%o A100083_list = list(islice(A100083_gen(),20)) # _Chai Wah Wu_, Apr 16 2024

%Y Cf. A057245, A064384

%K nonn,more,changed

%O 1,2

%A Mark Hudson (mrmarkhudson(AT)hotmail.com), Nov 08 2004

%E a(13)-a(14) from _Robert G. Wilson v_, Nov 15 2004

%E a(15) from _Harvey P. Dale_, Jun 11 2013

%E a(16) from _Giovanni Resta_, confirmed by _Charles R Greathouse IV_ and _Robert G. Wilson v_, Jun 11 2013

%E Edited by _Max Alekseyev_, Mar 27 2015

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 19 03:30 EDT 2024. Contains 371782 sequences. (Running on oeis4.)