A359632 Sequence of gaps between deletions of multiples of 7 in step 4 of the sieve of Eratosthenes.
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
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.
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,1).
Crossrefs
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
Comments