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 A387078 #7 Aug 16 2025 01:19:13 %S A387078 1,3,2,4,2,3,3,5,3,4,2,8,5,3,4,4,2,11,4,2,2,22,16,5,3,1,2,12,6,31,14, %T A387078 4,3,8,3,28,2,37,14,10,12,9,2,41,7,61,24,24,2,134,71,51,97,3,2,127,69, %U A387078 39,15,64,55,56,26,100,37,32,40,33,2,440,107,196,391 %N A387078 Run lengths of A386482(n) mod 2 == n mod 2. %C A387078 Let S = A386482. %C A387078 Beginning with S(481) = 948, there are 100 consecutive even terms in S. Starting with S(730076) = 1026330, there are 100869 consecutive even terms in S. %H A387078 Michael De Vlieger, <a href="/A387078/b387078.txt">Table of n, a(n) for n = 1..183</a> (run lengths available given 2^20 terms of S). %e A387078 S begins as follows, grouping odd terms in brackets [], and even in parentheses (): %e A387078 [1], (2, 4, 6), [3, 9], (12, 10, 8, 14), [7, 21], (18, 16, 20), [15, 5, 25], ... %e A387078 This sequence takes run lengths in the order they appear, therefore a(1) = 1, a(2) = 3, a(3) = 2, a(4) = 4, a(5) = 2, etc. Hence a(n) for odd n pertains to run lengths of odd terms in S, while a(n) for even n pertains to run lengths of even terms in same. %t A387078 Block[{c, j, k, m, p, r, nn}, %t A387078 nn = 2^12; c[_] := False; m[_] := 1; j = 2; c[1] = c[2] = True; r = 1; %t A387078 {1}~Join~Monitor[Most@ Reap[Do[ %t A387078 If[PrimePowerQ[j], %t A387078 Set[{p, k, m}, {#1, #1^(#2 - 1), #1^(#2 - 1)}] & @@ %t A387078 FactorInteger[j][[1]]; While[And[c[k*p], k != 0], k--]; %t A387078 If[k == 0, k = m; While[c[k*p], k++]]; k *= p, %t A387078 k = j - 1; While[And[Or[c[k], CoprimeQ[j, k]], k != 1], k--]; %t A387078 If[k == 1, k += j; While[Or[c[k], CoprimeQ[j, k] ], k++] ] ]; %t A387078 If[Mod[j, 2] == Mod[k, 2], r++, Sow[r]; r = 1]; %t A387078 Set[{c[k], j}, {True, k}], {n, 3, nn}] ][[-1, 1]], n] ] %Y A387078 Cf. A386482. %K A387078 nonn %O A387078 1,2 %A A387078 _Michael De Vlieger_, Aug 15 2025