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 A361101 #36 Mar 08 2023 03:05:08 %S A361101 1,2,1,3,2,1,4,1,5,1,6,2,4,4,4,4,5,3,6,4,5,3,6,4,5,3,6,5,3,7,1,8,2,6, %T A361101 5,3,8,2,9,1,10,2,9,1,11,4,6,5,3,8,2,9,1,12,1,13,1,14,1,15,1,16,1,17, %U A361101 1,18,1,19,3,8,2,10,2,11,4,6,6,6,8,2,20,3,8,3,8,3 %N A361101 a(n) is the smallest positive number not among the terms in a(1..n-1) with index a(n-1)*k for any integer k; a(1)=1. %C A361101 From _Samuel Harkness_, Mar 02 2023: (Start) %C A361101 This sequence is partly defined by the following cases for a(353) onwards. But what is the pattern to the 1s and 2s? %C A361101 For k >= 0: %C A361101 a(353+4k) = 1 or 2; %C A361101 a(354+2k) = (354+2k)/2 - 63; %C A361101 a(355+4k) = 1. %C A361101 Of the 14912 n equal to 1 (mod 4) between 352 and 60000, 4983 (33.416%) equal 1 and 9929 (66.584%) equal 2. From observation it appears that 1/3 of a(353+4k); k>=0 equal 1 and 2/3 equal 2 (see Figure). %C A361101 (End) %H A361101 Neal Gersh Tolunsky, <a href="/A361101/b361101.txt">Table of n, a(n) for n = 1..8000</a> %H A361101 Samuel Harkness, <a href="/A361101/a361101_1.jpg">Scatterplot for the first 600 terms</a> %H A361101 Samuel Harkness, <a href="/A361101/a361101_2.jpg">Percentage of 1 mod 3 between 353 and 60000 equal to 1</a> %e A361101 To find a(13), we look at the last term in the sequence thus far: (1, 2, 1, 3, 2, 1, 4, 1, 5, 1, 6, 2). Since it is a 2, the next term will be the smallest not among the even-indexed terms of the sequence thus far, which are (2, 3, 1, 1, 1, 2). 4 is the smallest missing number, so a(13)=4. %t A361101 K = {1}; While[Length@K <= 85, A = {}; For[q = Last@K, q <= Length@K, q += Last@K, AppendTo[A, K[[q]]]]; k = 1; While[MemberQ[A, k], k++]; AppendTo[K, k]]; Print[K] (* _Samuel Harkness_, Mar 06 2023 *) %o A361101 (PARI) { p = 1; for (n = 1, #a = vector(86), x = 2^0; forstep (k = p, n-1, p, x = bitor(x, 2^a[k]);); print1 (p = a[n] = valuation(1+x,2)", ");); } \\ _Rémy Sigrist_, Mar 02 2023 %Y A361101 Cf. A358921, A361172. %K A361101 nonn %O A361101 1,2 %A A361101 _Neal Gersh Tolunsky_, Mar 02 2023