05-23-2007, 05:16 AM
I know it's a bit late but here is a solution for the HP17B(II) (hardware clone of the HP42s) :
P=sigma(I:999999:316228:-11:IF(IP(I×I÷1E6)=sigma(J:1:5:1:IP(MOD(I×I÷10^J:10))×10^(5-J)):I×I:0))
365 bytes (variables included) and 3m30 with EMU42 on 1,5Ghz Centrino