|
|
A052421
|
|
Numbers without 8 as a digit.
|
|
13
|
|
|
0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
a(n) = replace digits d > 7 by d + 1 in base-9 representation of n - 1. - Reinhard Zumkeller, Oct 07 2014
|
|
MAPLE
|
a:= proc(n) local l, m; l, m:= 0, n-1;
while m>0 do l:= (d->
`if`(d<8, d, d+1))(irem(m, 9, 'm')), l
od; parse(cat(l))/10
end:
|
|
MATHEMATICA
|
Select[Range[0, 100], DigitCount[#, 10, 8]==0&] (* Harvey P. Dale, Oct 11 2012 *)
|
|
PROG
|
(Magma) [ n: n in [0..89] | not 8 in Intseq(n) ]; // Bruno Berselli, May 28 2011
(sh) seq 0 1000 | grep -v 8; # Joerg Arndt, May 29 2011
(Haskell)
a052421 = f . subtract 1 where
f 0 = 0
f v = 10 * f w + if r > 7 then r + 1 else r where (w, r) = divMod v 9
(PARI) lista(nn)=for (n=0, nn, if (!vecsearch(vecsort(digits(n), , 8), 8), print1(n, ", ")); ); \\ Michel Marcus, Feb 22 2015
(PARI) /* See OEIS wiki page (cf. LINKS) for more programs. */
apply( {A052421(n)=fromdigits(apply(d->d+(d>7), digits(n-1, 9)))}, [1..99]) \\ a(n)
select( {is_A052421(n)=!setsearch(Set(digits(n)), 8)}, [0..99]) \\ used in A038616
next_A052421(n, d=digits(n+=1))={for(i=1, #d, d[i]==8&&return((1+n\d=10^(#d-i))*d)); n} \\ Least a(k) > n. Used in A038616. - M. F. Hasler, Jan 11 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|