%I #19 Dec 23 2016 04:34:24
%S 1,4,3,9,27,133,315,841,747,4485,2799,14175,287061,530079,3061987
%N Least integer k such that A275663(k) = n.
%C Least integer k such that the number of perfect squares in {k, f(k), f(f(k)),...,1} is equal to n, where f is the Collatz function.
%C a(n) <= 4^(n-1). - _Robert G. Wilson v_, Nov 16 2016
%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%e a(5) = 27 because A275663(27) = 5. The Collatz trajectory of 27 contains the squares 484, 121, 16, 4 and 1. The other values m with the property A275663(m) = 5 are 31, 33, 36, 41, 43, 47, 54, 55, 57, 62, ...
%t f[n_]:=n/2/;Mod[n,2]==0;f[n_]:=3 n+1/;Mod[n,2]==1;g[n_]:=Module[{i,p},i=n;p=1;While[i>1,If[IntegerQ[Sqrt[i]],p=p+1];i=f[i]];p];Do[k=1;While[g[k]!=m,k++];Print[m," ",k],{m,1,13}]
%Y Cf. A006577, A275663.
%K nonn,more
%O 1,2
%A _Michel Lagneau_, Nov 13 2016
%E a(14)-a(15) from _Robert G. Wilson v_, Nov 16 2016
|