cp's OEIS Frontend

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.

A225727 Numbers k such that sum of first k primorials (A143293) is divisible by k.

This page as a plain text file.
%I A225727 #24 Jul 04 2025 12:36:39
%S A225727 1,3,17,51,967,2901,16439,49317,147951,1331559
%N A225727 Numbers k such that sum of first k primorials (A143293) is divisible by k.
%C A225727 a(5) = 967 is a prime,
%C A225727 a(6) = a(5) * 3,
%C A225727 a(7) = a(5) * 17,
%C A225727 a(8) = a(5) * 51,
%C A225727 a(9) = a(5) * 51 * 3,
%C A225727 a(10) = a(5) * 51 * 27.
%C A225727 The next term, if it exists, is greater than 15600000. - _Alex Ratushnyak_, Jun 16 2013
%e A225727 Sum of first 3 primorials is 1+2+6=9, because 9 is divisible by 3, the latter is in the sequence.
%e A225727 Sum of first 17 primorials is A143293(17) = 1955977793053588026279. Because A143293(17) is divisible by 17, the latter is in the sequence.
%o A225727 (Python)
%o A225727 primes = [2,3]
%o A225727 def addPrime(k):
%o A225727   for p in primes:
%o A225727     if k%p==0:  return
%o A225727     if p*p > k:  break
%o A225727   primes.append(k)
%o A225727 for n in range(5,1000000,6):
%o A225727   addPrime(n)
%o A225727   addPrime(n+2)
%o A225727 sum_ = 0
%o A225727 primorial = n = 1
%o A225727 for p in primes:
%o A225727   sum_ += primorial
%o A225727   primorial *= p
%o A225727   if sum_ % n == 0:  print(n, end=', ')
%o A225727   n += 1
%o A225727 (Python)
%o A225727 from itertools import chain, accumulate, count, islice
%o A225727 from operator import mul
%o A225727 from sympy import prime
%o A225727 def A225727_gen(): return (i+1 for i, m in enumerate(accumulate(accumulate(chain((1,),(prime(n) for n in count(1))), mul))) if m % (i+1) == 0)
%o A225727 A225727_list = list(islice(A225727_gen(),6)) # _Chai Wah Wu_, Feb 23 2022
%Y A225727 Cf. A143293, A002110, A057245, A128981.
%K A225727 nonn,hard,more
%O A225727 1,2
%A A225727 _Alex Ratushnyak_, May 13 2013