OFFSET
0,3
COMMENTS
Occurrences are counted without overlap, so 1111 has two occurrences of 11, not 3. - Michael S. Branicky, Aug 12 2023
LINKS
Bert Dobbelaere, Table of n, a(n) for n = 0..15
EXAMPLE
a(2)=225=15^2 since this is the first square that contains two 2's.
MATHEMATICA
With[{sqs=Range[0, 3100000]^2}, Flatten[Table[Select[sqs, DigitCount[#, 10, n] == n&, 1], {n, 9}]]] (* Harvey P. Dale, May 04 2012 *)
PROG
(Python)
from math import isqrt
def a(n):
sn = str(n)
k = 1 if n == 0 else isqrt(int(sn*n))
while True:
if str(k*k).count(sn) == n:
return k*k
k += 1
print([a(n) for n in range(10)]) # Michael S. Branicky, Feb 02 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Erich Friedman, Aug 07 2005
EXTENSIONS
Corrected and extended by Giovanni Resta, Apr 05 2006
a(10) and beyond from Bert Dobbelaere, Sep 05 2023
STATUS
approved