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.

Showing 1-2 of 2 results.

A214323 a(n) = gcd( A214551(n-1), A214551(n-3) ) with a(0) = a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 3, 2, 3, 2, 1, 1, 1, 1, 7, 3, 2, 3, 4, 1, 1, 1, 1, 1, 1, 4, 1, 5, 1, 1, 1, 1, 8, 1, 2, 1, 6, 1, 4, 5, 4, 5, 1, 1, 1, 1, 11, 36, 1, 1, 1, 7, 5, 1, 8, 3, 4, 3, 2, 7, 2, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, Jul 23 2012

Keywords

Comments

A214551(n) = A214322(n)/A214323(n).
A214323(A214653(n)) = 1. - Reinhard Zumkeller, Jul 24 2012

Crossrefs

Cf. A214551, A214322; A214324, A214325 (record values and where they occur).

Programs

  • Haskell
    a214323 n = a214323_list !! n
    a214323_list = 1 : 1 : 1 : zipWith gcd a214551_list (drop 2 a214551_list)
    -- Reinhard Zumkeller, Jul 24 2012

A339861 Lengths of runs of ones in A214323.

Original entry on oeis.org

6, 0, 0, 0, 0, 4, 0, 0, 0, 0, 6, 1, 4, 1, 1, 1, 0, 0, 0, 4, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 3, 2, 3, 2, 6, 1, 6, 1, 3, 0, 1, 1, 1, 1, 6, 1, 6, 0, 0, 1, 1, 1, 1, 0, 0, 2, 2, 0, 1, 1, 1, 1, 6, 5, 0, 5, 0, 5, 0, 1, 1, 1, 0, 0, 5, 0, 1, 1, 2, 3, 1, 1, 1, 0, 1, 4, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 6, 1, 1, 1, 1, 2, 1, 6, 1, 5, 0, 0, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 6, 1, 4, 0, 1, 3, 1, 1, 1
Offset: 0

Views

Author

Alex Hall, Apr 24 2021

Keywords

Comments

0 means two consecutive terms greater than 1 in A214323, so that every 'run' is separated by exactly one number greater than one.
Equivalently, this gives the lengths of runs of consecutive numbers in A214653 (ignoring the zeros in this sequence), indicating consecutive coprime pairs (A214551(n-1), A214551(n-2)), which lead to A214551 increasing (although it can also increase after a non-coprime pair).
Empirically, the most common term is 1, then 0, then 6, but provably there is no term higher than 6. This can be understood by looking at A214330 and the state diagram. The state 010 (a pair of even numbers in A214551) is always separated by exactly 1 or 6 other states, i.e., even divisors in A214323 are always separated by exactly 1 or 6 odd divisors.
If instead you consider runs of ones in gcd( A000930(n-1), A000930(n-3) ) (i.e., don't divide by the gcd but still observe it) then the maximum run length of ones is still provably 6, but empirically longer runs appear consistently less often than shorter runs as you'd expect.
All of this applies regardless of the three starting terms used in A214551 or A000930, unless they all share a common divisor.

Examples

			The runs of ones in A214323 are:
(1, 1, 1, 1, 1, 1), 2,() 3,() 2,() 3,() 2, (1, 1, 1, 1), 7,() 3,() 2,() 3,() 4, (1, 1, 1, 1, 1, 1), 4, (1), 5, (1, 1, 1, 1), 8, (1), 2, (1), 6, (1), 4,() 5,() 4, ...
Giving the terms:
6, 0, 0, 0, 0, 4, 0, 0, 0, 0, 6, 1, 4, 1, 1, 1, 0, 0, ...
Similarly the runs of consecutive numbers in A214653 are:
(0, 1, 2, 3, 4, 5), (11, 12, 13, 14), (20, 21, 22, 23, 24, 25), (27), (29, 30, 31, 32), (34), (36), (38), ...
		

Crossrefs

Programs

  • Python
    import math
    a3 = a2 = a1 = 1
    last_position = 0
    run_lengths = []
    for position in range(4, 20000):
        gcd = math.gcd(a1, a3)
        if gcd > 1:
            run_length = position - last_position - 1
            run_lengths.append(run_length)
            last_position = position
        a3, a2, a1 = a2, a1, (a1 + a3) // gcd
    print(run_lengths)
Showing 1-2 of 2 results.