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 A163491 #51 Jan 10 2022 14:55:45 %S A163491 1,1,1,2,1,2,3,1,2,4,3,1,5,2,4,6,3,1,7,5,2,8,4,6,9,3,1,10,7,5,11,2,8, %T A163491 12,4,6,13,9,3,14,1,10,15,7,5,16,11,2,17,8,12,18,4,6,19,13,9,20,3,14, %U A163491 21,1,10,22,15,7,23,5,16,24,11,2,25,17,8,26,12 %N A163491 A fractal sequence (if we delete the first occurrence of n we get the sequence itself). %C A163491 Write the positive integers with two spaces between each integer: 1,_,_,2,_,_,3,_,_,4,_,_,5,_,_,6,..., and fill undefined places with the sequence itself. A003602 is obtained by starting from 1,_,2,_,3,_,4,_,5,_,6,.... %C A163491 From _Peter Munn_, Aug 02 2020: (Start) %C A163491 a(n) - 1 is the row of A083044 in which n occurs. %C A163491 The m-th occurrence of m is at position A083045(m-1). %C A163491 (End) %H A163491 Alois P. Heinz, <a href="/A163491/b163491.txt">Table of n, a(n) for n = 1..10000</a> %F A163491 a(3n-2) = n. %F A163491 A083044(a(n) - 1, A087088(n) - 1) = n. - _Peter Munn_, Aug 02 2020 %F A163491 From _Rémy Sigrist_, Jan 15 2021: (Start) %F A163491 a(n+ceiling(n/2)) = a(n). %F A163491 a(n) = 1 iff n belongs to A061419. %F A163491 (End) %F A163491 a(n) = (n+2)/3 if n == 1 (mod 3), otherwise a(n) = a(floor(n*2/3)). - _Michael S. Branicky_ and _Kevin Ryde_, Jan 16 2021 %e A163491 1,_,_,2,_,_,3,_,_,4,... --> %e A163491 1,1,_,2,_,_,3,_,_,4,... --> %e A163491 1,1,1,2,_,_,3,_,_,4,... --> %e A163491 1,1,1,2,1,_,3,_,_,4,... --> %e A163491 1,1,1,2,1,2,3,_,_,4,... --> %e A163491 1,1,1,2,1,2,3,_,_,4,... --> %e A163491 1,1,1,2,1,2,3,1,_,4,... --> %e A163491 1,1,1,2,1,2,3,1,2,4,... --> %e A163491 ... %t A163491 a[n_] := a[n] = If[Mod[n, 3] == 1, (n+2)/3, a[Floor[2n/3]]]; %t A163491 Array[a, 100] (* _Jean-François Alcover_, Jan 10 2022 *) %o A163491 (Python) %o A163491 def a(n): return (n+2)//3 if n%3==1 else a(n*2//3) %o A163491 print([a(n) for n in range(1, 78)]) # _Michael S. Branicky_, Jan 16 2021 %o A163491 (PARI) a(n) = n+=2; my(q,r); while([q,r]=divrem(n,3); r, n-=q); q; \\ _Kevin Ryde_, Jan 16 2021 %Y A163491 Cf. A003602, A007494, A061419, A083044, A083045. %Y A163491 Ordinal transform of A087088. %K A163491 nonn %O A163491 1,4 %A A163491 _Benoit Cloitre_, Jul 29 2009 %E A163491 Terms after a(70) corrected by _Jon E. Schoenfield_, Nov 26 2015