Skip to main content
1 of 7
Dr. belisarius
  • 116.2k
  • 13
  • 205
  • 456

Another way, using PowerRepresentations[]:

s = Tally[Join @@ (Select[PowersRepresentations[748, #, 2], 
                          Union@# == # && Max@# < 17 && Min@# > 0 &] & /@ Range@8), 
          Union[#1, #2] == Range@16 &][[All, 1]];
Length@s
(*
  114
*)
Dr. belisarius
  • 116.2k
  • 13
  • 205
  • 456