[go: up one dir, main page]

login
Numbers n with digits 3 and 5 only.
6

%I #13 Sep 08 2022 08:46:19

%S 3,5,33,35,53,55,333,335,353,355,533,535,553,555,3333,3335,3353,3355,

%T 3533,3535,3553,3555,5333,5335,5353,5355,5533,5535,5553,5555,33333,

%U 33335,33353,33355,33533,33535,33553,33555,35333,35335,35353,35355,35533,35535

%N Numbers n with digits 3 and 5 only.

%C Prime terms are in A020462.

%H Robert Israel, <a href="/A284379/b284379.txt">Table of n, a(n) for n = 1..10000</a>

%F From _Robert Israel_, Apr 13 2020: (Start)

%F a(n) = 2*A007931(n)+A002275(n).

%F a(2n+1) = 10*a(n)+3.

%F a(2n+2) = 10*a(n)+5.

%F G.f. g(x) satisfies g(x) = 10*(x^2+x)*g(x^2) + (3*x+5*x^2)/(1-x^2). (End)

%p A:= 3,5: B:= [3,5];

%p for i from 1 to 5 do

%p B:= map(t -> (10*t+3,10*t+5), B);

%p A:= A, op(B);

%p od:

%p A; # _Robert Israel_, Apr 13 2020

%t Select[Range[35600], Times @@ Boole@ Map[MemberQ[{3, 5}, #] &, IntegerDigits@ #] > 0 &] (* or *)

%t Table[FromDigits /@ Union@ Apply[Join, Map[Permutations@ # &, Tuples[{3, 5}, n]]], {n, 5}] // Flatten (* _Michael De Vlieger_, Mar 27 2017 *)

%o (Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {3, 5}]

%Y Numbers n with digits 5 and k only for k = 0 - 4 and 6 - 9: A169964 (k = 0), A276037 (k = 1), A072961 (k = 2), this sequence (k = 3), A256290 (k = 4), A256291 (k = 6), A284380 (k = 7), A284381 (k = 8), A284382 (k = 9).

%K nonn,base

%O 1,1

%A _Jaroslav Krizek_, Mar 26 2017