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.

A359632 Sequence of gaps between deletions of multiples of 7 in step 4 of the sieve of Eratosthenes.

Original entry on oeis.org

12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3
Offset: 1

Views

Author

Alexandre Herrera, Jan 08 2023

Keywords

Comments

This sequence is a repeating cycle 12, 7, 4, 7, 4, 7, 12, 3 of length A005867(4) = 8 = (prime(1)-1)*(prime(2)-1)*(prime(3)-1).
The mean of the cycle is prime(4) = 7.
The cycle is constructed from the sieve of Eratosthenes as follows.
In the first 2 steps of the sieve, the gaps between the deleted numbers are constant: gaps of 2 in step 1 when we delete multiples of 2, and gaps of 3 in step 2 when we delete multiples of 3.
In step 3, when we delete all multiples of 5, the gaps are alternately 7 and 3 (i.e., cycle [7,3]).
For this sequence, we look at the interesting cycle from step 4 (multiples of 7).
Excluding the final 3, the cycle has reflective symmetry: 12, 7, 4, 7, 4, 7, 12. This is true for every subsequent step of the sieve too.
The central element is 7 (BUT not all steps have their active prime number as the central element).
a(1) is A054272(4).
a(8) = 3, the first appearance of the last element of the cycle, corresponds to deletion of 217 = A002110(4)+7.

Examples

			After sieve step 3, multiples of 2,3,5 have been eliminated leaving
  7,11,13,17,19,23,29,31,37,41,43,47,49,53, ...
  ^                                   ^
The first two multiples of 7 are 7 itself and 49 and they are distance 12 apart in the list so that a(1) = 12.
For n = 2, a(n) = 7, because the third multiple of 7 that is not a multiple of 2, 3 or 5 is 77 = 7 * 11, which is located 7 numbers after 49 = 7*7 in the list of numbers without the multiples of 2, 3 and 5.
		

Crossrefs

Equivalent sequences for steps 1..3: A007395, A010701, A010705 (without the initial 3).

Programs

  • Mathematica
    PadRight[{}, 100, {12, 7, 4, 7, 4, 7, 12, 3}] (* Paolo Xausa, Jul 01 2024 *)
  • Python
    numbers = []
    for i in range(2,880):
        numbers.append(i)
    gaps = []
    step = 4
    current_step = 1
    while current_step <= step:
        prime = numbers[0]
        new_numbers = []
        gaps = []
        gap = 0
        for i in range(1,len(numbers)):
            gap += 1
            if numbers[i] % prime != 0:
                new_numbers.append(numbers[i])
            else:
                gaps.append(gap)
                gap = 0
        current_step += 1
        numbers = new_numbers
    print(gaps)

Formula

a(n) = A236175(n)+1. - Peter Munn, Jan 21 2023