login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A011533 Numbers that contain a 3. 28

%I #40 Sep 08 2022 08:44:37

%S 3,13,23,30,31,32,33,34,35,36,37,38,39,43,53,63,73,83,93,103,113,123,

%T 130,131,132,133,134,135,136,137,138,139,143,153,163,173,183,193,203,

%U 213,223,230,231,232,233,234,235,236,237,238,239,243,253

%N Numbers that contain a 3.

%H Reinhard Zumkeller, <a href="/A011533/b011533.txt">Table of n, a(n) for n = 1..10000</a>

%H James Grime and Brady Haran, <a href="http://www.youtube.com/watch?v=UfEiJJGv4CE">3 is everywhere</a>, Numberphile video, 2012.

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

%F a(n) ~ n. - _Charles R Greathouse IV_, Aug 28 2012

%F For m >= 1, a(10^m - 9^m) = 10^m-7, a(10^m - 9^m + 1) = 10^m + 3. - _Robert Israel_, Jan 11 2016

%p M:= 3: # to get all terms of up to M digits

%p B:= {3}: A:= {3}:

%p for i from 2 to M do

%p B:= map(t -> seq(10*t+j,j=0..9),B) union

%p {seq(10*x+3,x=10^(i-2)..10^(i-1)-1)}:

%p A:= A union B;

%p od:

%p sort(convert(A,list));# _Robert Israel_, Jan 11 2016

%t Select[Range[600] - 1, DigitCount[#, 10, 3]>0 &] (* _Vincenzo Librandi_, Jan 11 2016 *)

%o (Haskell)

%o a011533 n = a011533_list !! (n-1)

%o a011533_list = filter ((elem '3') . show) [0..]

%o -- _Reinhard Zumkeller_, Apr 10 2015

%o (Magma) [n: n in [0..500] | 3 in Intseq(n)]; // _Vincenzo Librandi_, Jan 11 2016

%o (PARI) isok(n)=my(d=digits(n)); for (k=1, #d, if (d[k] == 3, return (1))); \\ _Michel Marcus_, Jan 11 2016

%o (GAP) Filtered([1..260],n->3 in ListOfDigits(n)); # _Muniru A Asiru_, Feb 23 2019

%Y Complement: A052405.

%Y Cf. A016189.

%Y Numbers that contain a digit k: A011531 (k=1), A011532 (k=2), A011534 (k=4), A011535 (k=5), A011536 (k=6), A011537 (k=7), A011538 (k=8), A011539 (k=9), A011540 (k=0).

%K nonn,base,easy

%O 1,1

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 23:40 EDT 2024. Contains 371798 sequences. (Running on oeis4.)