login
Squares whose sum of nonsquare digits is a square.
1

%I #16 Jun 01 2022 20:58:44

%S 0,1,4,9,36,49,100,144,225,361,400,441,729,900,1225,1369,1444,1936,

%T 2025,2209,2704,3600,3969,4225,4900,5776,7225,7396,7921,8836,9409,

%U 10000,10404,11449,11881,14400,14884,17424,19044,19881,21025,22500,24025

%N Squares whose sum of nonsquare digits is a square.

%C If n is a member, then so is 100*n. - _Robert Israel_, Jul 06 2018

%H Robert Israel, <a href="/A085575/b085575.txt">Table of n, a(n) for n = 1..10000</a>

%e a(10)=361 because 361=19^2 and 3+6=9.

%p f:= proc(n) local L;

%p L:= convert(subs(1=NULL,4=NULL,9=NULL,convert(n^2,base,10)),`+`);

%p if issqr(L) then n^2 fi

%p end proc:

%p map(f, [$0..200]); # _Robert Israel_, Jul 06 2018

%t sndQ[n_]:=Module[{s=Total[Select[IntegerDigits[n],!IntegerQ[Sqrt[#]]&]]},IntegerQ[ Sqrt[s]]]; Select[Range[0,200]^2,sndQ] (* _Harvey P. Dale_, Jun 01 2022 *)

%K base,easy,nonn

%O 1,3

%A _Jason Earls_, Jul 07 2003

%E Offset changed by _Robert Israel_, Jul 06 2018