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.

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

This page as a plain text file.
%I A257486 #27 May 22 2025 10:21:42
%S A257486 6734,67434,577734,667334,745356,6674334,6734744,6756734,7373376,
%T A257486 7453574,7466434,7533576,66673334,67345644,67656734,74547734,74656376,
%U A257486 75733576,666743334,667335356,746556344,5775434474,6666733334,6666733576,6676476434,7447533576
%N A257486 Numbers n such that the decimal expansions of both n and n^2 have 3 as smallest digit and 7 as largest digit.
%H A257486 Chai Wah Wu, <a href="/A257486/b257486.txt">Table of n, a(n) for n = 1..1000</a> (n = 71..178 from Giovanni Resta)
%t A257486 fQ[n_] := Block[{d = DigitCount@ n}, Plus @@ Join[Take[d, {1, 2}], Take[d, {8, 10}]] == 0 && d[[3]] > 0 && d[[7]] > 0]; Select[Range@ 1000000, fQ@# && fQ[#^2] &] (* _Michael De Vlieger_, Apr 27 2015 *)
%o A257486 (PARI) is(n) = vecmin(digits(n))==3 && vecmin(digits(n^2))==3 && vecmax(digits(n))==7 && vecmax(digits(n^2))==7
%o A257486 (Python)
%o A257486 from itertools import product, repeat
%o A257486 A257486_list = []
%o A257486 for l in range(12):
%o A257486     for a in product('34567',repeat = l):
%o A257486         for b in ('4','5','6'):
%o A257486             s = ''.join(a)+b
%o A257486             if '3' in s and '7' in s:
%o A257486                 n = int(s)
%o A257486                 if {'3','7'} <= set(str(n**2)) <= {'3','4','5','6','7'}:
%o A257486                     A257486_list.append(n) # _Chai Wah Wu_, May 02 2015
%Y A257486 Cf. A137121, A256630, A256631, A256633, A256634, A256708, A256709, A256889, A257197, A257210, A257211, A256601, A257310, A249915, A257123, A257368, A257485.
%K A257486 nonn,base
%O A257486 1,1
%A A257486 _Felix Fröhlich_, Apr 26 2015
%E A257486 a(22)-a(26) from _Hiroaki Yamanouchi_, May 03 2015 (using _Chai Wah Wu_'s b-file)