login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A359632
Sequence of gaps between deletions of multiples of 7 in step 4 of the sieve of Eratosthenes.
1
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,1
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.
FORMULA
a(n) = A236175(n)+1. - Peter Munn, Jan 21 2023
EXAMPLE
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.
MATHEMATICA
PadRight[{}, 100, {12, 7, 4, 7, 4, 7, 12, 3}] (* Paolo Xausa, Jul 01 2024 *)
PROG
(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)
CROSSREFS
Equivalent sequences for steps 1..3: A007395, A010701, A010705 (without the initial 3).
Sequence in context: A093763 A002548 A363151 * A364135 A305939 A206423
KEYWORD
nonn,easy
AUTHOR
Alexandre Herrera, Jan 08 2023
STATUS
approved