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
Felix Fröhlich, Table of n, a(n) for n = 1..10000
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
Felix Fröhlich, Apr 18 2015
STATUS
approved