login
A160234
Number of n-digit "early bird numbers" A116700.
0
0, 45, 630, 6896, 73059, 757755, 7773854, 79228098, 803943262, 8133323510
OFFSET
1,2
EXAMPLE
a(1) = 0 because there are no 1-digit terms in A116700;
a(1) = 45 because there are 45 2-digit terms in A116700: 12, 21, 23, 31, 32, 34, 41, 42, 43, 45, 51, 52, 53, 54, 56, 61, 62, 63, 64, 65, 67, 71, 72, 73, 74, 75, 76, 78, 81, 82, 83, 84, 85, 86, 87, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99.
MATHEMATICA
s="1"; ss={}; Do[tsn=ToString[n]; If[ !StringFreeQ[s, tsn], AppendTo[ss, n]]; s=s<>tsn, {n, 2, 99999}]; Table[Length[Select[ss, 10^(n-1)<=#<10^n&]], {n, 1, 5}]
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
s = ""
for digits in count(1):
c = 0
for k in range(10**(digits-1), 10**digits):
sk = str(k)
if sk in s: c += 1
s += sk
yield c
print(list(islice(agen(), 5))) # Michael S. Branicky, Mar 17 2022
CROSSREFS
Cf. A116700 ("Early bird" numbers).
Sequence in context: A090024 A282767 A372978 * A110691 A296540 A105251
KEYWORD
base,nonn,more
AUTHOR
Zak Seidov, May 04 2009
EXTENSIONS
a(6)-a(7) from Michael S. Branicky, Mar 17 2022
a(8) from Michael S. Branicky, Dec 21 2022
a(9)-a(10) from Michael S. Branicky, Feb 06 2023
STATUS
approved