Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #8 Dec 21 2020 17:19:24
%S 1,1,248832,6436343,45435424,15575653771875,616132666368,
%T 778890712975487707,6648881538818884375,99900039992000799968,
%U 10610441011074322410255643277715061010710106439101,11311111984777108548801111731222111251108343
%N Smallest 5th power that contains exactly n occurrences of the string n.
%C a(11) assumes occurrences can overlap (cf. A109689). - _Michael S. Branicky_, Dec 21 2020
%e a(2)=248832 since this is the first 5th power that contains exactly two 2's.
%o (Python)
%o def count_overlaps(subs, s):
%o c = i = 0
%o while i != -1:
%o i = s.find(subs, i)
%o if i != -1: c += 1; i += 1
%o return c
%o def a(n, POW=5): # call with 4, 3 for A109690, A109689, resp.
%o strn = str(n)
%o k = int((10**(len(set(strn))*n-1))**(1/POW)) # len(strn) for no overlaps
%o while True:
%o # if str(pow(k, POW)).count(strn) == n: break # use this for no overlaps
%o if count_overlaps(strn, str(pow(k, POW))) == n: break
%o k += 1
%o return k**POW
%o print([a(n) for n in range(10)]) # _Michael S. Branicky_, Dec 21 2020
%Y Cf. A109689 (cubes), A109690 (4th powers).
%K base,more,nonn
%O 0,3
%A _Erich Friedman_, Aug 07 2005
%E a(10)-a(11) from _Michael S. Branicky_, Dec 21 2020