[go: up one dir, main page]

login
Numbers starting with 3.
11

%I #30 Sep 11 2024 11:45:08

%S 3,30,31,32,33,34,35,36,37,38,39,300,301,302,303,304,305,306,307,308,

%T 309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,

%U 326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342

%N Numbers starting with 3.

%C The lower and upper asymptotic densities of this sequence are 1/27 and 5/18, respectively. - _Amiram Eldar_, Feb 27 2021

%H Jeremy Gardiner, <a href="/A217395/b217395.txt">Table of n, a(n) for n = 1..1111</a>

%H <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.

%F a(n) = n + (26*10^floor(log_10(9*n-8))-8)/9. - _Alan Michael Gómez Calderón_, May 16 2023

%t Select[Range[1000], IntegerDigits[#][[1]] == 3 &] (* _T. D. Noe_, Oct 02 2012 *)

%o (Python)

%o def agen():

%o yield 3

%o digits, adder = 1, 30

%o while True:

%o for i in range(10**digits): yield adder + i

%o digits, adder = digits+1, adder*10

%o g = agen()

%o print([next(g) for i in range(54)]) # _Michael S. Branicky_, Mar 30 2021

%o (Python)

%o def A217395(n): return n+26*10**(len(str(9*n-8))-1)//9 # _Chai Wah Wu_, Sep 11 2024

%o (PARI) a(n) = n + 26*10^logint(9*n,10)\9; \\ _Kevin Ryde_, Mar 30 2021

%Y Cf. A006092, A011533.

%Y Subsequences include: A045709, A077328, A077679, A106413, A106423.

%Y Cf. A131835, A217394, A217397, A217398, A217399, A217400, A217401, A217402.

%K nonn,base,easy

%O 1,1

%A _Jeremy Gardiner_, Oct 02 2012