login
Number of n-digit "early bird numbers" A116700.
0

%I #16 Feb 06 2023 15:40:49

%S 0,45,630,6896,73059,757755,7773854,79228098,803943262,8133323510

%N Number of n-digit "early bird numbers" A116700.

%e a(1) = 0 because there are no 1-digit terms in A116700;

%e 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.

%t 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}]

%o (Python)

%o from itertools import count, islice

%o def agen(): # generator of terms

%o s = ""

%o for digits in count(1):

%o c = 0

%o for k in range(10**(digits-1), 10**digits):

%o sk = str(k)

%o if sk in s: c += 1

%o s += sk

%o yield c

%o print(list(islice(agen(), 5))) # _Michael S. Branicky_, Mar 17 2022

%Y Cf. A116700 ("Early bird" numbers).

%K base,nonn,more

%O 1,2

%A _Zak Seidov_, May 04 2009

%E a(6)-a(7) from _Michael S. Branicky_, Mar 17 2022

%E a(8) from _Michael S. Branicky_, Dec 21 2022

%E a(9)-a(10) from _Michael S. Branicky_, Feb 06 2023