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 A345877 #35 Aug 31 2023 16:16:52 %S A345877 1,1,2,1,4,2,1,7,2,1,10,5,8,4,2,1,16,8,4,2,1,21,2,1,24,12,6,3,26,13, %T A345877 18,9,24,12,6,3,34,17,22,11,30,15,28,14,7,39,8,4,2,1,50,25,28,14,7,49, %U A345877 8,4,2,1,60,30,15,49,16,8,4,2,1,69,2,1,72,36,18,9,68,34,17,63,18,9,74,37,48,24,12,6,3 %N A345877 a(1) = 1, a(n) = a(n-1)/2 if a(n-1) is even, otherwise a(n) = n - a(n-1). %C A345877 Let a_i(1) = 1 and a_i(n) = a_i(n-1)/(i+1) if a_i(n-1) is divisible by i+1, otherwise a_i(n) = n - a_i(n-1). This sequence is a_1(n) and A345886 is a_2(n). %C A345877 Conjecture: a_i(n) hits every positive integers infinitely many times for all i >= 1. %H A345877 Harvey P. Dale, <a href="/A345877/b345877.txt">Table of n, a(n) for n = 1..1000</a> %t A345877 a[1] = 1; a[n_] := a[n] = If[EvenQ[a[n - 1]], a[n - 1]/2, n - a[n - 1]]; Array[a, 100] (* _Amiram Eldar_, Jun 29 2021 *) %t A345877 nxt[{n_,a_}]:={n+1,If[EvenQ[a],a/2,n+1-a]}; NestList[nxt,{1,1},90][[;;,2]] (* _Harvey P. Dale_, Aug 31 2023 *) %o A345877 (PARI) q=vector(100); q[1]=1; for(n=2, #q, q[n] = if(q[n-1]%2, n-q[n-1], q[n-1]/2)); q %Y A345877 Cf. A090895, A135287, A345886. %K A345877 nonn,easy %O A345877 1,3 %A A345877 _Altug Alkan_, Jun 28 2021