login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I

%S 271,371,1171,1474,1475,1776,2171,2271,2671,2715,2761,3671,3711,4174,

%T 4761,4771,6761,7165,7174,7261,7331,11275,11474,11475,11711,11715,

%U 11716,11724,11725,11731,12376,12715,12734,12756,12776,13171,13174,13275,13276,14674

%N Numbers n such that the decimal expansions of both n and n^2 have 1 as smallest digit and 7 as largest digit.

%C 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

%H Felix Fröhlich, <a href="/A257210/b257210.txt">Table of n, a(n) for n = 1..10000</a>

%t 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 *)

%o (PARI) is(n) = vecmin(digits(n))==1 && vecmin(digits(n^2))==1 && vecmax(digits(n))==7 && vecmax(digits(n^2))==7

%o (PARI) has(n)=my(d=Set(digits(n))); #d && d[1]==1 && d[#d]==7

%o is(n)=has(n) && has(n^2)

%o 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

%Y Cf. A256630, A256631, A256633, A256634, A256708, A256709, A256889, A257197, A257211.

%K nonn,base

%O 1,1

%A _Felix Fröhlich_, Apr 18 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 2 21:30 EDT 2021. Contains 346429 sequences. (Running on oeis4.)