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.

This page as a plain text file.
%I A359632 #58 Jul 02 2024 02:16:38
%S A359632 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,
%T A359632 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,
%U A359632 4,7,12,3,12,7,4,7,4,7,12,3,12,7,4,7,4,7,12,3
%N A359632 Sequence of gaps between deletions of multiples of 7 in step 4 of the sieve of Eratosthenes.
%C A359632 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).
%C A359632 The mean of the cycle is prime(4) = 7.
%C A359632 The cycle is constructed from the sieve of Eratosthenes as follows.
%C A359632 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.
%C A359632 In step 3, when we delete all multiples of 5, the gaps are alternately 7 and 3 (i.e., cycle [7,3]).
%C A359632 For this sequence, we look at the interesting cycle from step 4 (multiples of 7).
%C A359632 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.
%C A359632 The central element is 7 (BUT not all steps have their active prime number as the central element).
%C A359632 a(1) is A054272(4).
%C A359632 a(8) = 3, the first appearance of the last element of the cycle, corresponds to deletion of 217 = A002110(4)+7.
%H A359632 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,1).
%F A359632 a(n) = A236175(n)+1. - _Peter Munn_, Jan 21 2023
%e A359632 After sieve step 3, multiples of 2,3,5 have been eliminated leaving
%e A359632   7,11,13,17,19,23,29,31,37,41,43,47,49,53, ...
%e A359632   ^                                   ^
%e A359632 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.
%e A359632 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.
%t A359632 PadRight[{}, 100, {12, 7, 4, 7, 4, 7, 12, 3}] (* _Paolo Xausa_, Jul 01 2024 *)
%o A359632 (Python)
%o A359632 numbers = []
%o A359632 for i in range(2,880):
%o A359632     numbers.append(i)
%o A359632 gaps = []
%o A359632 step = 4
%o A359632 current_step = 1
%o A359632 while current_step <= step:
%o A359632     prime = numbers[0]
%o A359632     new_numbers = []
%o A359632     gaps = []
%o A359632     gap = 0
%o A359632     for i in range(1,len(numbers)):
%o A359632         gap += 1
%o A359632         if numbers[i] % prime != 0:
%o A359632             new_numbers.append(numbers[i])
%o A359632         else:
%o A359632             gaps.append(gap)
%o A359632             gap = 0
%o A359632     current_step += 1
%o A359632     numbers = new_numbers
%o A359632 print(gaps)
%Y A359632 Cf. A002110, A005867, A054272, A236175.
%Y A359632 Equivalent sequences for steps 1..3: A007395, A010701, A010705 (without the initial 3).
%K A359632 nonn,easy
%O A359632 1,1
%A A359632 _Alexandre Herrera_, Jan 08 2023