This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A225841 #56 Feb 23 2022 15:52:32 %S A225841 1,2,4,523,1046,2092 %N A225841 Numbers n such that the sum of first n primorial numbers is divisible by n. %C A225841 The k-th primorial number is defined as the product of the first k primes. %C A225841 The next term, if it exists, is greater than 14000000. - _Alex Ratushnyak_, Jun 13 2013 %C A225841 If a prime p | a(n) for some n, then p = 2, p = 523, or p > 10^8. Any such prime is itself a member of this sequence. From this (and a small amount of additional calculation) it follows that any other terms below 10^10 are of the form 2^k * p for p > 10^8. - _Charles R Greathouse IV_, Feb 09 2014 %e A225841 2 + 2*3 + 2*3*5 + 2*3*5*7 = 2 + 6 + 30 + 210 = 248, because 248 is divisible by 4, the latter is in the sequence. %t A225841 With[{nn=2100},Select[Thread[{Accumulate[FoldList[Times,Prime[ Range[ nn]]]],Range[nn]}],Divisible[ #[[1]],#[[2]]]&]][[All,2]] (* _Harvey P. Dale_, Jul 29 2021 *) %o A225841 (Python) %o A225841 primes = [] %o A225841 n = 1 %o A225841 sum = 2 %o A225841 primorial = 6 %o A225841 def addPrime(k): %o A225841 global n, sum, primorial %o A225841 for p in primes: %o A225841 if k%p==0: return %o A225841 if p*p > k: break %o A225841 primes.append(k) %o A225841 sum += primorial %o A225841 primorial *= k %o A225841 n += 1 %o A225841 if sum % n == 0: print(n, end=',') %o A225841 print(1, end=',') %o A225841 for p in range(5, 100000, 6): %o A225841 addPrime(p) %o A225841 addPrime(p+2) %o A225841 (PARI) list(maxx)={n=prime(1); cnt=1;summ=0;scnt=0; %o A225841 while(n<=maxx,summ=summ+prodeuler(x=1,prime(cnt),x); %o A225841 if(summ%cnt==0,scnt++;print(scnt," ",cnt) );cnt++;n=nextprime(n+1) ); } %o A225841 \\note MUST increase precision to 10000+ digits \\_Bill McEachen_, Feb 04 2014 %o A225841 (PARI) P=1;S=n=0;forprime(p=2,1e4,S+=P*=p;if(S%n++==0,print1(n", "))) \\ _Charles R Greathouse IV_, Feb 05 2014 %o A225841 (PARI) is(n)=my(q=prime(n),P=Mod(1,n),S);forprime(p=2,q,S+=P*=p);!S \\ _Charles R Greathouse IV_, Feb 05 2014 %o A225841 (Python) %o A225841 from itertools import accumulate, count, islice %o A225841 from operator import mul %o A225841 from sympy import prime %o A225841 def A225841_gen(): return (i+1 for i, m in enumerate(accumulate(accumulate((prime(n) for n in count(1)), mul))) if m % (i+1) == 0) %o A225841 A225841_list = list(islice(A225841_gen(),6)) # _Chai Wah Wu_, Feb 23 2022 %Y A225841 Cf. A060389, A002110, A045345, A143293, A225727. %K A225841 nonn,hard,more %O A225841 1,2 %A A225841 _Alex Ratushnyak_, May 21 2013