OFFSET
1,2
COMMENTS
Essentially the same as A043089, b.t.w. the initial "0" could be as well included here. Also: numbers k such that A043277(k)=1. - M. F. Hasler, Jul 23 2013
There are 2^k terms having k digits in base 3, k > 0. - David A. Corneth, Sep 09 2025
LINKS
David A. Corneth, Table of n, a(n) for n = 1..16382
FORMULA
MATHEMATICA
Select[Range[200], FreeQ[Differences[IntegerDigits[#, 3]], 0]&] (* Harvey P. Dale, Mar 03 2024 *)
PROG
(PARI) for(i=1, 199, A043277(i)==1 & print1(i", ")) \\ M. F. Hasler, Jul 23 2013
(PARI) a(n) = {if(n==0, return(0)); n++; my(b=binary(n), ld=0); b[1] = 0; for(i=2, #b, b[i] = b[i]+=(b[i-1]<=b[i])); fromdigits(b, 3)} \\ David A. Corneth, Sep 09 2025
(PARI) uptoqternarydigits(n) = {maxqd = n; res = List(); process(0, 0); listpop(res, 1); Set(res)}
process(n, qd) = {listput(res, n); if(qd >= maxqd, return); my(r = n%3); for(i = 0, 2, if(r != i, process(3*n + i, qd + 1)))}
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
EXTENSIONS
Edited by Charles R Greathouse IV, Aug 02 2010
STATUS
approved
