OFFSET
1,1
COMMENTS
Prime terms are in A020462.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
From Robert Israel, Apr 13 2020: (Start)
a(2n+1) = 10*a(n)+3.
a(2n+2) = 10*a(n)+5.
G.f. g(x) satisfies g(x) = 10*(x^2+x)*g(x^2) + (3*x+5*x^2)/(1-x^2). (End)
MAPLE
A:= 3, 5: B:= [3, 5];
for i from 1 to 5 do
B:= map(t -> (10*t+3, 10*t+5), B);
A:= A, op(B);
od:
A; # Robert Israel, Apr 13 2020
MATHEMATICA
Select[Range[35600], Times @@ Boole@ Map[MemberQ[{3, 5}, #] &, IntegerDigits@ #] > 0 &] (* or *)
Table[FromDigits /@ Union@ Apply[Join, Map[Permutations@ # &, Tuples[{3, 5}, n]]], {n, 5}] // Flatten (* Michael De Vlieger, Mar 27 2017 *)
PROG
(Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {3, 5}]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Mar 26 2017
STATUS
approved