A339861 Lengths of runs of ones in A214323.
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
Keywords
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), ...
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)
Comments