Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #8 Apr 16 2023 08:38:13
%S 1,2,1,3,2,1,2,1,3,2,1,2,1,3,2,1,3,3,2,1,2,1,3,3,2,1,3,2,1,2,1,3,2,1,
%T 2,1,3,2,1,2,1,3,2,1,2,1,3,2,1,2,1,3,2,1,3,3,2,1,2,1,3,2,1,2,1,3,3,2,
%U 1,3,2,1,2,1,3,2,1,2,1,3,2,1,2,1,3,3
%N a(n) = (A187108(n+1)-A187108(n))/2.
%o (AS3)
%o var a:Array=new Array();
%o var i:int;
%o var n:int=0;
%o var ni:int;
%o var b:Array = new Array();
%o for (i=0; i<=1000; i++){
%o while(a[n]!=undefined) n++;
%o b.push(String(2*n+1));
%o a[n]=1;
%o ni=2*n+1;
%o while(ni>=2*n+1&&ni>1){
%o ni=3*ni+1;
%o while(ni%2==0)ni/=2;
%o a[(ni-1)/2]=1;
%o }}
%o for(i=0;i<1000;i++)b[i]=(b[i+1]-b[i])/2;b.pop();
%o trace(b);
%K nonn
%O 1,2
%A _Jimin Park_, Aug 07 2011