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.

Previous Showing 11-12 of 12 results.

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

A236186 Differences between terms of compacting Eratosthenes sieve for prime(5) = 11.

Original entry on oeis.org

2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 8, 6, 4, 6, 2, 4, 6, 2, 6, 6, 4, 2, 4, 6, 2, 6, 4, 2, 4, 2, 10, 2, 10, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 8, 6, 4, 6, 2, 4, 6, 2, 6, 6, 4, 2, 4
Offset: 1

Views

Author

Christopher J. Hanson, Jan 21 2014

Keywords

Comments

P(x) is a function which represents a prime number at a particular ordinal x. This pattern, dp(x), describes the difference between consecutive prime numbers as described by p(x) (see A236175) and therefore the length of dp(x) is len(p(x)) - 1 and each value in dp(x) times P(x) is the difference between values determined not primed when running one pass of a reductive sieve, starting at P(x)^2. See A236185.

Crossrefs

Essentially the same as A049296.

Programs

  • PARI
    {a(n) = my(A); if( n<1, 0, A = vector( n*50 + 148, k, k+1); for( i = 1, 4, A = select( k -> k%prime(i), A) ); polcoeff( (1 - x) * Ser( select( k -> k>11 && (k%11) == 0, A) / 11), n))}; /* Michael Somos, Mar 10 2014 */

Formula

a(n + 48) = a(n). - Michael Somos, Mar 10 2014

Extensions

Made sequence periodic. - Michael Somos, Mar 10 2014
Previous Showing 11-12 of 12 results.