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 A178915 #14 Jun 30 2023 15:39:36 %S A178915 4,2,3,1,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, %T A178915 27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49, %U A178915 50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72 %N A178915 Rearrangement of natural numbers so that every partial sum is composite. %C A178915 a(n) = n for n > 4. %C A178915 Except for the integers 1 & 4 which are interchanged, the sequence is in order. Proof: Except for the first three triangular numbers (A000217), {0, 1, 3}, they are all composite. - _Robert G. Wilson v_, Jun 27 2010 %H A178915 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2, -1). %F A178915 G.f.: 3 - 3*x^3 + 1/(x-1)^2. - _Sergei N. Gladkovskii_, Oct 16 2012 %e A178915 Partial sums are 4,6,9,10,15,21,... %t A178915 f[s_List] := Block[{k = 0, t = Plus @@ s}, While[MemberQ[s, k] || PrimeQ[t + k] || t + k < 2, k++ ]; Append[s, k]]; Rest@ Nest[f, {0}, 72] (* _Robert G. Wilson v_, Jun 27 2010 *) %K A178915 easy,nonn %O A178915 1,1 %A A178915 _Amarnath Murthy_, Jun 23 2010 %E A178915 a(40)-a(72) from _Robert G. Wilson v_, Jun 27 2010