cp's OEIS Frontend

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.

A174539 Starting numbers n such that the number of halving and tripling steps to reach 1 under the Collatz 3x+1 map is a perfect square.

Original entry on oeis.org

1, 2, 7, 12, 13, 16, 44, 45, 46, 80, 84, 85, 98, 99, 100, 101, 102, 107, 129, 153, 156, 157, 158, 169, 272, 276, 277, 280, 282, 300, 301, 302, 350, 351, 512, 576, 592, 596, 597, 608, 616, 618, 625, 642, 643, 644, 645, 646, 648, 649, 650, 651, 652, 653, 654, 655, 662, 663
Offset: 1

Views

Author

Michel Lagneau, Mar 21 2010

Keywords

Comments

Numbers n such that A006577(n) is a perfect square.

Examples

			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.
		

Crossrefs

Programs

  • 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 *)

Formula

{n: A006577(n) in A000290}.

Extensions

Unspecific references removed - R. J. Mathar, Mar 31 2010
Corrected and extended by Harvey P. Dale, Jan 01 2023