%I #9 May 14 2019 22:02:24
%S 1,2,3,4,5,6,7,8,9,10,11,13,14,19,23,33,37,39,40,41,44,46,47,49,55,59,
%T 69,74,82,89,90,91,94,95,98,99,100,101,104,106,109,110,111,114,119,
%U 131,140,141,142,143,144,145,146,149,151,155,158,167,171,174,177,184,188,190,191,193,194,197,199,217
%N Numbers k such that each of the decimal digits is a quadratic residue modulo k.
%e 673 is in the sequence because L(6/673) = L(7/673) = L(3/673) = 1 where L(a/b) is the Legendre symbol of a and b, which is defined to be 1 if a is a quadratic
%e residue (mod b) and -1 if a is a quadratic non-residue (mod b).
%p isA177054 := proc(n) local d; for d in convert(n,base,10) do if numtheory[quadres](d,n) <> 1 then return false; end if; end do; return true; end proc:
%p for n from 1 to 140 do if isA177054(n) then printf("%d,",n) ; end if ; end do: # _R. J. Mathar_, Dec 12 2010
%K nonn,base,less
%O 1,2
%A _Michel Lagneau_, Dec 09 2010