A182020 Numbers that are squares and have a majority of one digit.
Examples
165^2=27225 and more than half its digits are 2.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Select[Range[0,700]^2,Max[DigitCount[#]]>IntegerLength[#]/2&] (* Harvey P. Dale, Nov 02 2015 *)
-
PARI
is(n)=if(issquare(n),my(v=vecsort(eval(Vec(Str(n)))), m=v[(#v+1)\2]); sum(i=1,#v,v[i]==m)*2>#v,0) \\ Charles R Greathouse IV, Apr 07 2012
Comments