login
Numbers whose square has initial digit '8'.
3

%I #24 Sep 29 2021 07:09:37

%S 9,29,90,91,92,93,94,283,284,285,286,287,288,289,290,291,292,293,294,

%T 295,296,297,298,299,895,896,897,898,899,900,901,902,903,904,905,906,

%U 907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923

%N Numbers whose square has initial digit '8'.

%H Seiichi Manyama, <a href="/A045862/b045862.txt">Table of n, a(n) for n = 1..10000</a>

%t Select[Range[1000],Take[IntegerDigits[#^2],1]=={8}&] (* _Harvey P. Dale_, Jul 30 2019 *)

%o (Python)

%o from math import isqrt

%o def auptorun(runs):

%o alst = []

%o for n in range(1, runs+1):

%o alst.extend(list(range(isqrt(8*10**n) + 1, isqrt(9*10**n - 1)+1)))

%o return alst

%o print(auptorun(5)) # _Michael S. Branicky_, Sep 29 2021

%o (PARI) isok(k) = digits(k^2)[1] == 8; \\ _Michel Marcus_, Sep 29 2021

%Y Cf. A045792, A035075.

%K nonn,base

%O 1,1

%A _Jeff Burch_