login
Number of squares that can be obtained by using some or all of the digits of n.
0

%I #7 Jun 24 2014 01:08:17

%S 1,1,0,0,1,0,0,0,0,1,2,1,1,1,2,1,2,1,2,2,1,1,0,0,1,1,0,0,0,1,1,1,0,0,

%T 1,0,1,0,0,1,2,2,1,1,1,1,2,1,1,3,1,1,1,0,1,0,0,0,0,1,1,2,0,1,2,0,0,0,

%U 0,1,1,1,0,0,1,0,0,0,0,1,1,2,0,0,1,0,0,0,0,1,2,2,1,1,3,1,1,1,1,1,3,2,2,2,3

%N Number of squares that can be obtained by using some or all of the digits of n.

%e a(169) = 6 the squares obtained by using the digits are 1,9,16, 169, 196, 961.

%t Table[Length[Select[Union[Drop[FromDigits/@Flatten[Permutations/@ Subsets[IntegerDigits[n]],1],1]],IntegerQ[Sqrt[#]] &]],{n,0,104}] (* _Jayanta Basu_, May 17 2013 *)

%K base,nonn,easy

%O 0,11

%A _Amarnath Murthy_, Jun 29 2001

%E Corrected and extended by Larry Reeves (larryr(AT)acm.org) and _Dean Hickerson_, Jul 02 2001