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.

A381169 List of twin prime averages (A014574) is partitioned by including as many elements as possible in the n-th partition, L_n, such that any gap in L_n is smaller than the gap between L_n and L_(n-1) but not bigger than the first gap in L_n. a(n) is the number of elements in L_n.

This page as a plain text file.
%I A381169 #11 Mar 02 2025 23:54:20
%S A381169 1,1,1,1,1,1,2,2,2,3,2,2,1,1,2,1,6,3,2,2,2,1,1,5,2,2,2,3,1,2,2,2,2,3,
%T A381169 2,2,1,2,4,2,2,2,2,5,2,2,1,1,1,3,2,2,1,3,3,2,1,4,2,3,2,2,1,2,2,3,3,1,
%U A381169 3,2,1,2,1,1,2,3,3,1,1,2,2,3,2,2,1,5,2
%N A381169 List of twin prime averages (A014574) is partitioned by including as many elements as possible in the n-th partition, L_n, such that any gap in L_n is smaller than the gap between L_n and L_(n-1) but not bigger than the first gap in L_n. a(n) is the number of elements in L_n.
%C A381169 The partition method used here is the same as that in A348168.
%C A381169 Conjecture 1: lim_{n->oo} N_i/n = k_i, where N_i is the number of partitions with i elements and k_i is a constant, with k_2 > k_1 > k_3 > k_4 > .... The values of k_i are the same as those in A348168.
%C A381169 Conjecture 2: lim_{n->oo} Sum_{1..n} a(n)/n = lim_{i->oo} Sum_{1..i} i*k_i = e, or the average partition length approaches 2.71828... as n tends to infinity.
%C A381169 Numbers of twin prime pairs (N) and partitions with 1 through 6 twin prime pairs for n up to 10000000 are given in the table below.
%C A381169 n         N         N_1      N_2      N_3      N_4     N_5     N_6
%C A381169 --------  --------  -------  -------  -------  ------  ------  ------
%C A381169 1         1         1        0        0        0       0       0
%C A381169 10        15        6        3        1        0       0       0
%C A381169 100       209       30       45       16       5       3       1
%C A381169 1000      2536      286      416      145      64      29      19
%C A381169 10000     26474     2851     4331     1271     544     311     190
%C A381169 100000    271338    28034    43375    12923    5731    3002    1870
%C A381169 1000000   2725126   281837   434234   128190   56563   30074   18171
%C A381169 10000000  27120107  2815831  4352926  1276953  563128  302256  181612
%e A381169 Twin prime pair averages in the first 10 partitions are: [4], [6], [12], [18], [30], [42], [60, 72], [102, 108], [138, 150], and [180, 192, 198]. Thus, a(1) = a(2) = a(3) = a(4) = a(5) = a(6) = 1, a(7) = a(8) = a(9) = 2, and a(10) = 3.
%o A381169 (Python)
%o A381169 from sympy import isprime, nextprime; L = [4]
%o A381169 def nexttwin(x):
%o A381169     p1 = nextprime(x); t1 = p1 + 2
%o A381169     while isprime(t1) == 0: p1 = nextprime(t1); t1 = p1 + 2
%o A381169     return p1+1
%o A381169 for _ in range(2, 89):
%o A381169     print(len(L), end = ', ')
%o A381169     t0 = L[-1]; t1 = nexttwin(t0); g0 = t1 - t0; M = [t1]; t = nexttwin(t1); g1 = t - t1
%o A381169     while g1 < g0 and t - t1 <= g1: M.append(t); t1 = t; t = nexttwin(t)
%o A381169     L = M
%Y A381169 Cf. A001097, A014574, A348168.
%K A381169 nonn
%O A381169 1,7
%A A381169 _Ya-Ping Lu_, Feb 15 2025