[seqfan] Re: A102421; Start with 2n+1, multiply by 3 and add 1 and divide out any power of 2;
Richard J. Mathar
mathar at mpia-hd.mpg.de
Sun Aug 23 17:33:16 CEST 2020
I suspect the comment refers to the variant
"Start with n, take 3*n+1 and divide out any power of 2; then multiply by 3, subtract 1 and divide any power of 2.'
a(n) = A075677(A067745(n+1)).
The current sequence takes on each second term.
In a case like this I propose to change the values and comments
(that is: insert the missing half of the terms...) to keep the comment correct:
A102421 := proc(n)
local a;
a := 3*n+1;
while modp(a,2) = 0 do
a := a/2 ;
end do:
a := 3*a-1 ;
while modp(a,2) = 0 do
a := a/2 ;
end do:
a ;
end proc:
1, 1, 5, 7, 19, 1, 7, 1, 37, 5, 23, 25, 55, 7, 1, 17, 73, 19, 41, 43, 91, 1, 25, 13, 109, 7, 59, 61, 127, 1, 17, 35
More information about the SeqFan
mailing list