login
Numbers k that divide the sum of the first k numbers from Flavius Josephus's sieve (A099074).
0

%I #15 Aug 20 2021 04:22:50

%S 1,2,4,10,16,20,41,44,55,67,76,548,751,1962,3318,3760,5873,7729,8074,

%T 15502,33847,65888,89836,167786,512688,1401686,2520988,2897654,

%U 5552333,6352323,7981750

%N Numbers k that divide the sum of the first k numbers from Flavius Josephus's sieve (A099074).

%C a(32) > 10^7.

%H <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>

%e The sum of the first 20 terms of A000960 is 2240, which is divisible by 20, so 20 is a term.

%o (PARI) s=1; print1(1 ", "); for(n=2, 10^4, f=n^2; forstep(m=n-1, 2, -1, r=f%m; if(r==0, r=m); f=f-r); f--; s=s+f; if(s%n==0, print1(n ", ")))

%Y Cf. A000960.

%K nonn,more

%O 1,2

%A _Donovan Johnson_, Nov 04 2012