login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n)^2 is the smallest square containing exactly n 6's.
2

%I #26 Apr 26 2021 21:11:19

%S 4,26,216,1291,5164,68313,163284,785294,3559026,26393686,129099069,

%T 254296413,816435342,4081257976,80413106314,215329205326,

%U 2463064689907,5165911014784,24832773982716,81401883640163

%N a(n)^2 is the smallest square containing exactly n 6's.

%C a(21) > 10^14. - _Giovanni Resta_, Jul 27 2018

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SquareNumber.html">Square Number</a>

%F a(n) = sqrt(A036513(n)).

%t a[n_] := Module[{i = 1}, While[DigitCount[i^2][[6]] != n, i++;]; i]; (* Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 20 2006 *)

%o (Python)

%o def a(n):

%o k = 1

%o while not str(k**2).count('6') == n: k += 1

%o return k

%o print([a(n) for n in range(1, 11)]) # _Michael S. Branicky_, Apr 26 2021

%Y Cf. A036513, A034988.

%K nonn,base,more

%O 1,1

%A _Patrick De Geest_, Mar 15 1999

%E 816435342 from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 20 2006

%E a(14)-a(15) from _Jon E. Schoenfield_, Jan 14 2009

%E a(16) from _Jon E. Schoenfield_, Jan 24 2009

%E a(17)-a(20) from _Giovanni Resta_, Jul 27 2018