|
|
A257210
|
|
Numbers n such that the decimal expansions of both n and n^2 have 1 as smallest digit and 7 as largest digit.
|
|
16
|
|
|
271, 371, 1171, 1474, 1475, 1776, 2171, 2271, 2671, 2715, 2761, 3671, 3711, 4174, 4761, 4771, 6761, 7165, 7174, 7261, 7331, 11275, 11474, 11475, 11711, 11715, 11716, 11724, 11725, 11731, 12376, 12715, 12734, 12756, 12776, 13171, 13174, 13275, 13276, 14674
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
There are 2 3-digit terms, 19 4-digit terms, 122 5-digit terms, 646 6-digit terms, 3147 7-digit terms, 13300 8-digit terms, 54689 9-digit terms, and 216858 10-digit terms. - Charles R Greathouse IV, Apr 20 2015
|
|
LINKS
|
|
|
MATHEMATICA
|
fQ[n_] := Block[{d = DigitCount@ n}, Plus @@ Take[d, {8, 10}] == 0 && d[[1]] > 0 && d[[7]] > 0]; Select[Range@ 15000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 20 2015 *)
|
|
PROG
|
(PARI) is(n) = vecmin(digits(n))==1 && vecmin(digits(n^2))==1 && vecmax(digits(n))==7 && vecmax(digits(n^2))==7
(PARI) has(n)=my(d=Set(digits(n))); #d && d[1]==1 && d[#d]==7
is(n)=has(n) && has(n^2)
for(d=3, 7, for(i=6, 7^d-1, v=digits(i, 7); if(#v<=d, v=concat(vector(d-#v), v)); if(vecmax(v)==6 && vecmin(v)==0 && has((n=fromdigits(apply(k->k+1, v)))^2), print1(n", ")))) \\ Charles R Greathouse IV, Apr 20 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|