OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
James Grime and Brady Haran, 3 is everywhere, Numberphile video, 2012.
FORMULA
a(n) ~ n. - Charles R Greathouse IV, Aug 28 2012
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
MAPLE
M:= 3: # to get all terms of up to M digits
B:= {3}: A:= {3}:
for i from 2 to M do
B:= map(t -> seq(10*t+j, j=0..9), B) union
{seq(10*x+3, x=10^(i-2)..10^(i-1)-1)}:
A:= A union B;
od:
sort(convert(A, list)); # Robert Israel, Jan 11 2016
MATHEMATICA
Select[Range[600] - 1, DigitCount[#, 10, 3]>0 &] (* Vincenzo Librandi, Jan 11 2016 *)
PROG
(Haskell)
a011533 n = a011533_list !! (n-1)
a011533_list = filter ((elem '3') . show) [0..]
-- Reinhard Zumkeller, Apr 10 2015
(Magma) [n: n in [0..500] | 3 in Intseq(n)]; // Vincenzo Librandi, Jan 11 2016
(PARI) isok(n)=my(d=digits(n)); for (k=1, #d, if (d[k] == 3, return (1))); \\ Michel Marcus, Jan 11 2016
(GAP) Filtered([1..260], n->3 in ListOfDigits(n)); # Muniru A Asiru, Feb 23 2019
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved