OFFSET
1,3
COMMENTS
This sequence also represents the minimal number of straight lines of a covering tree to cover n X n points arranged in a symmetrical grid. - Marco RipĂ , Sep 20 2018
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
M. F. Hasler, Numbers avoiding certain digits, OEIS Wiki, Jan 12 2020.
FORMULA
a(n) >> n^k with k = log(10)/log(9) = 1.0479.... - Charles R Greathouse IV, Oct 16 2012
a(n) = replace digits d > 2 by d + 1 in base-9 representation of n - 1. - Reinhard Zumkeller, Oct 07 2014
Sum_{n>1} 1/a(n) = A082832 = 20.569877... (Kempner series). - Bernard Schott, Jan 12 2020, edited by M. F. Hasler, Jan 14 2020
EXAMPLE
22 has no 3s among its digits, hence it is in the sequence.
23 has one 3 among its digits, hence it is not in the sequence.
MAPLE
a:= proc(n) local l, m; l, m:= 0, n-1;
while m>0 do l:= (d->
`if`(d<3, d, d+1))(irem(m, 9, 'm')), l
od; parse(cat(l))/10
end:
seq(a(n), n=1..100); # Alois P. Heinz, Aug 01 2016
MATHEMATICA
Select[Range[0, 89], DigitCount[#, 10, 3] == 0 &] (* Alonso del Arte, Oct 16 2012 *)
PROG
(Magma) [ n: n in [0..89] | not 3 in Intseq(n) ]; // Bruno Berselli, May 28 2011
(sh) seq 0 1000 | grep -v 3; # Joerg Arndt, May 29 2011
(PARI)
is(n)=n=digits(n); for(i=1, #n, if(n[i]==3, return(0))); 1 \\ Charles R Greathouse IV, Oct 16 2012
apply( {A052405(n)=fromdigits(apply(d->d+(d>2), digits(n-1, 9)))}, [1..99]) \\ a(n)
next_A052405(n, d=digits(n+=1))={for(i=1, #d, d[i]==3&& return((1+n\d=10^(#d-i))*d)); n} \\ least a(k) > n. Used in A038611. \\ M. F. Hasler, Jan 11 2020
(Haskell)
a052405 = f . subtract 1 where
f 0 = 0
f v = 10 * f w + if r > 2 then r + 1 else r where (w, r) = divMod v 9
-- Reinhard Zumkeller, Oct 07 2014
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Henry Bottomley, Mar 13 2000
EXTENSIONS
Offset changed by Reinhard Zumkeller, Oct 07 2014
STATUS
approved