cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A257210 #14 Apr 23 2015 13:38:29
%S A257210 271,371,1171,1474,1475,1776,2171,2271,2671,2715,2761,3671,3711,4174,
%T A257210 4761,4771,6761,7165,7174,7261,7331,11275,11474,11475,11711,11715,
%U A257210 11716,11724,11725,11731,12376,12715,12734,12756,12776,13171,13174,13275,13276,14674
%N A257210 Numbers n such that the decimal expansions of both n and n^2 have 1 as smallest digit and 7 as largest digit.
%C A257210 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 A257210 Felix Fröhlich, <a href="/A257210/b257210.txt">Table of n, a(n) for n = 1..10000</a>
%t A257210 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 A257210 (PARI) is(n) = vecmin(digits(n))==1 && vecmin(digits(n^2))==1 && vecmax(digits(n))==7 && vecmax(digits(n^2))==7
%o A257210 (PARI) has(n)=my(d=Set(digits(n))); #d && d[1]==1 && d[#d]==7
%o A257210 is(n)=has(n) && has(n^2)
%o A257210 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 A257210 Cf. A256630, A256631, A256633, A256634, A256708, A256709, A256889, A257197, A257211.
%K A257210 nonn,base
%O A257210 1,1
%A A257210 _Felix Fröhlich_, Apr 18 2015