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 A060833 #31 Mar 22 2021 05:50:13 %S A060833 1,4,7,8,12,13,15,16,20,23,24,25,28,29,31,32,36,39,40,44,45,47,48,49, %T A060833 52,55,56,57,60,61,63,64,68,71,72,76,77,79,80,84,87,88,89,92,93,95,96, %U A060833 97,100,103,104,108,109,111,112,113,116,119,120,121,124,125,127,128 %N A060833 Separate the natural numbers into disjoint sets A, B with 1 in A, such that the sum of any 2 distinct elements of the same set never equals 2^k + 2. Sequence gives elements of set A. %C A060833 Can be constructed as follows: place of terms of (2^k+1,2^k+2,...,2^k) are the reflection from (2,3,4,...,2^k,1). [Comment not clear to me - _N. J. A. Sloane_] %C A060833 If n == 0 mod 4, then n is in the sequence. If n == 2 mod 4, then n is not in the sequence. The number 2n - 1 is in the sequence if and only if n is in the sequence. For n > 1, n is in the sequence if and only if A038189(n-1) = 1. - _N. Sato_, Feb 12 2013 %C A060833 The set B contains all numbers 2^(k-1)+1 = (2^k+2)/2 (half of the "forbidden sums"), (2, 3, 5, 9, 17, 33, 65,...) = 1/2 * (4, 6, 10, 18, 34, 66, 130, 258,...). - _M. F. Hasler_, Feb 12 2013 %H A060833 Alois P. Heinz, <a href="/A060833/b060833.txt">Table of n, a(n) for n = 1..1000</a> %H A060833 Kevin Ryde, <a href="http://user42.tuxfamily.org/dragon/index.html">Iterations of the Dragon Curve</a>, see index TurnRight, with a(n) = TurnRight(n-2) + 1 for n>=2. %F A060833 a(1) = 1; and for n > 1: a(n) = A091067(n-1)+1. - _Antti Karttunen_, Feb 20 2015, based on _N. Sato_'s Feb 12 2013 comment above. %p A060833 a:= proc(n) option remember; local k, t; %p A060833 if n=1 then 1 %p A060833 else for k from 1+a(n-1) do t:= k-1; %p A060833 while irem(t, 2, 'r')=0 do t:=r od; %p A060833 if irem(t, 4)=3 then return k fi %p A060833 od %p A060833 fi %p A060833 end: %p A060833 seq(a(n), n=1..100); # _Alois P. Heinz_, Feb 12 2013 %t A060833 a[n_] := a[n] = Module[{k, t, q, r}, If[n == 1, 1, For[k = 1+a[n-1], True, k++, t = k-1; While[{q, r} = QuotientRemainder[t, 2]; r == 0, t = q]; If[Mod[t, 4] == 3, Return[k]]]]]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Jan 30 2017, after _Alois P. Heinz_ *) %o A060833 (PARI) a(n) = if(n=2*n-2, my(t=1); forstep(i=logint(n,2),0,-1, if(bittest(n,i)==t, n++;t=!t))); n+1; \\ _Kevin Ryde_, Mar 21 2021 %Y A060833 Essentially one more than A091067. %Y A060833 First differences: A106836. %Y A060833 A082410(a(n)) = 0. %K A060833 easy,nonn %O A060833 1,2 %A A060833 _Sen-Peng Eu_, May 01 2001 %E A060833 More terms from Larry Reeves (larryr(AT)acm.org), May 10 2001