login

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”).

A193865
a(n) = (A187108(n+1)-A187108(n))/2.
0
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, 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, 1, 3, 2, 1, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 2, 1, 3, 3
OFFSET
1,2
PROG
(AS3)
var a:Array=new Array();
var i:int;
var n:int=0;
var ni:int;
var b:Array = new Array();
for (i=0; i<=1000; i++){
while(a[n]!=undefined) n++;
b.push(String(2*n+1));
a[n]=1;
ni=2*n+1;
while(ni>=2*n+1&&ni>1){
ni=3*ni+1;
while(ni%2==0)ni/=2;
a[(ni-1)/2]=1;
}}
for(i=0; i<1000; i++)b[i]=(b[i+1]-b[i])/2; b.pop();
trace(b);
CROSSREFS
Sequence in context: A166948 A325532 A180075 * A026171 A026176 A026141
KEYWORD
nonn
AUTHOR
Jimin Park, Aug 07 2011
STATUS
approved