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.

Original entry on oeis.org

1, 3, 17, 51, 967, 2901, 16439, 49317, 147951, 1331559
Offset: 1

Views

Author

Alex Ratushnyak, May 13 2013

Keywords

Comments

a(5) = 967 is a prime,
a(6) = a(5) * 3,
a(7) = a(5) * 17,
a(8) = a(5) * 51,
a(9) = a(5) * 51 * 3,
a(10) = a(5) * 51 * 27.
The next term, if it exists, is greater than 15600000. - Alex Ratushnyak, Jun 16 2013

Examples

			Sum of first 3 primorials is 1+2+6=9, because 9 is divisible by 3, the latter is in the sequence.
Sum of first 17 primorials is A143293(17) = 1955977793053588026279. Because A143293(17) is divisible by 17, the latter is in the sequence.
		

Crossrefs

Programs

  • Python
    primes = [2,3]
    def addPrime(k):
      for p in primes:
        if k%p==0:  return
        if p*p > k:  break
      primes.append(k)
    for n in range(5,1000000,6):
      addPrime(n)
      addPrime(n+2)
    sum_ = 0
    primorial = n = 1
    for p in primes:
      sum_ += primorial
      primorial *= p
      if sum_ % n == 0:  print(n, end=', ')
      n += 1
    
  • Python
    from itertools import chain, accumulate, count, islice
    from operator import mul
    from sympy import prime
    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)
    A225727_list = list(islice(A225727_gen(),6)) # Chai Wah Wu, Feb 23 2022