OFFSET
1,2
COMMENTS
A032925 is the intersection of this sequence and A023717; cf. A179888. - Reinhard Zumkeller, Jul 31 2010
LINKS
FORMULA
G.f. g(x) satisfies g(x) = (x+2*x^2+3*x^3)/(1-x^3) + 4*(x+x^2+x^3)*g(x^3). - Robert Israel, Oct 04 2018
MAPLE
R:= [1, 2, 3]: A:= 1, 2, 3:
for i from 1 to 4 do
R:= map(t -> (4*t+1, 4*t+2, 4*t+3), R);
A:= A, op(R);
od:
A; # Robert Israel, Oct 04 2018
MATHEMATICA
Select[ Range[ 120 ], (Count[ IntegerDigits[ #, 4 ], 0 ]==0)& ]
Select[Range[200], DigitCount[#, 4, 0]==0&] (* Harvey P. Dale, Dec 23 2015 *)
PROG
(Haskell)
a023705 n = a023705_list !! (n-1)
a023705_list = iterate f 1 where
f x = 1 + if r < 3 then x else 4 * f x'
where (x', r) = divMod x 4
-- Reinhard Zumkeller, Mar 06 2015, Oct 19 2011
(PARI) isok(n) = vecmin(digits(n, 4)); \\ Michel Marcus, Jul 04 2015
(Magma) [n: n in [1..130] | not 0 in Intseq(n, 4)]; // Vincenzo Librandi, Oct 04 2018
(C) uint32_t a_next(uint32_t a_n) { return (a_n + 1) | ((a_n & (a_n + 0xaaaaaaab)) >> 1); } /* Falk Hüffner, Jan 22 2022 */
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved