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.
%I A321301 #16 Nov 04 2018 18:23:14 %S A321301 1,1,1,2,1,4,5,2,4,7,8,5,4,10,3,8,11,1,13,9,5,15,9,7,17,7,11,19,7,13, %T A321301 21,7,15,23,5,19,25,3,23,27,3,25,29,5,25,31,5,27,33,7,27,35,9,27,37,9, %U A321301 29,39,11,29,41,13,29,43,17,27,45,25,21,47,33,15,49 %N A321301 Lexicographically last sequence of positive integers whose terms can be grouped and summed to produce the natural numbers as well as the prime numbers. %C A321301 More formally: %C A321301 - let S be the set of sequences of positive integers with positive indices, %C A321301 - for any u and v in S, the terms of u can be grouped and summed to produce v iff there is an element w in S such that for any n > 0: %C A321301 v(n) = Sum_{i=1..w(n)} u(i + Sum_{j=1..n-1} w(j)), %C A321301 or: Sum_{i=1..Sum_{j=1..n} w(j)} u(i) = Sum_{k=1..n} v(k), %C A321301 (the sequence w gives the number of terms in each group) %C A321301 - the set S with the binary relation R "u can be grouped and summed to produce v" is a partially ordered set, %C A321301 - in particular, A028356 is R-related to A000027, %C A321301 - for any u in S, A000012 is R-related to u (A000012 is the least element of S with respect to R), %C A321301 - for any u and v, let L(u, v) denote the lexicographically last element of S that is R-related both to u and to v, %C A321301 - for any u, v and w in S, the function L satisfies: %C A321301 L(u, u) = u, %C A321301 L(u, v) = L(v, u), %C A321301 L(u, L(v, w)) = L(L(u, v), w), %C A321301 L(A000012, u) = A000012, %C A321301 - this sequence corresponds to L(A000027, A000040). %H A321301 Rémy Sigrist, <a href="/A321301/b321301.txt">Table of n, a(n) for n = 1..10000</a> %H A321301 Rémy Sigrist, <a href="/A321301/a321301.gp.txt">PARI program for A321301</a> %e A321301 The first terms of this sequence, alongside the groups summing to the first natural numbers and to the first prime numbers, are: %e A321301 +-+---+-----+-------+---------+-----------+-------------+ %e A321301 - Natural numbers |1| 2 | 3 | 4 | 5 | 6 | 7 | ... %e A321301 +-+-+-+---+-+-------+---------+---+-------+-------------+ %e A321301 - This sequence |1|1|1| 2 |1| 4 | 5 | 2 | 4 | 7 | ... %e A321301 +-+-+-+---+-+-------+---------+---+-------+-------------+ %e A321301 - Prime numbers | 2 | 3 | 5 | 7 | 11 | ... %e A321301 +---+-----+---------+-------------+---------------------+ %o A321301 (PARI) See Links section. %Y A321301 Cf. A000012, A000027, A000040, A028356. %K A321301 nonn,look %O A321301 1,4 %A A321301 _Rémy Sigrist_, Nov 03 2018