A277730 Irregular triangle read by rows: T(n,k) = number of times a gap of 2k occurs between the first n successive odd primes.
1, 2, 2, 1, 3, 1, 3, 2, 4, 2, 4, 3, 4, 3, 1, 5, 3, 1, 5, 3, 2, 5, 4, 2, 6, 4, 2, 6, 5, 2, 6, 5, 3, 6, 5, 4, 7, 5, 4, 7, 5, 5, 7, 6, 5, 8, 6, 5, 8, 6, 6, 8, 7, 6, 8, 7, 7, 8, 7, 7, 1, 8, 8, 7, 1, 9, 8, 7, 1, 9, 9, 7, 1, 10, 9, 7, 1, 10, 10, 7, 1, 10, 10, 7, 1, 0, 0, 1, 10, 11, 7, 1, 0, 0, 1
Offset: 2
Examples
Triangle begins: 1, 2, 2, 1, 3, 1, <- gaps in 3,5,7,11,13 are 2 (3 times), 4 (once) 3, 2, 4, 2, 4, 3, 4, 3, 1, 5, 3, 1, 5, 3, 2, 5, 4, 2, 6, 4, 2, 6, 5, 2, 6, 5, 3, 6, 5, 4, 7, 5, 4, 7, 5, 5, 7, 6, 5, 8, 6, 5, ...
Links
- Lars Blomberg, Table of n, a(n) for n = 2..9997 (the first 703 rows)
Programs
-
Python
from sympy import nextprime; p = 3; L = [] for n in range(2, 32): np = nextprime(p); k = (np - p)//2 if len(L) < k: {L.append(0) for i in range(len(L), k-1)}; L.append(1) else: L[k-1] += 1 print(*L, sep =", ", end = ", "); p = np # Ya-Ping Lu, Dec 25 2024
Comments