OFFSET
1,2
COMMENTS
Numbers n such that A006577(n) is a perfect square.
EXAMPLE
44, 45 and 46 are in the sequence because the number of steps as counted in A006577 for each of them is 16 = 4^2, a perfect square.
MAPLE
with(numtheory):for x from 1 to 200 do traj:=0: n1:=x: x1:=x: for p from 1 to 20 while(irem(x1, 2)=0)do p1:=2^p: xx1:=x1: x1:=floor(n1/p1): traj:=traj+1:od:
n:=x1: for q from 1 to 100 while(n<>1)do n1:=3*n+1: traj:=traj+1: x0:=irem(n1, 2): for p from 1 to 20 while(x0=0)do p1:=2^p: xx1:=x1: x1:=floor(n1/p1): x0:=n1-p1*x1: traj:=traj+1: od: traj:=traj-1: n:=xx1:od:
if(sqrt(traj))=floor(sqrt(traj)) then print(x):else fi:od:
MATHEMATICA
htsQ[n_]:=With[{len=Length[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #!=1&]]-1}, IntegerQ[Sqrt[len]]]; Select[Range[700], htsQ] (* Harvey P. Dale, Jan 01 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Mar 21 2010
EXTENSIONS
Unspecific references removed - R. J. Mathar, Mar 31 2010
Corrected and extended by Harvey P. Dale, Jan 01 2023
STATUS
approved