cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A023693 Numbers with exactly 2 1's in ternary expansion.

This page as a plain text file.
%I A023693 #22 Jun 19 2023 09:10:27
%S A023693 4,10,12,14,16,22,28,30,32,34,36,38,42,44,46,48,50,52,58,64,66,68,70,
%T A023693 76,82,84,86,88,90,92,96,98,100,102,104,106,108,110,114,116,126,128,
%U A023693 132,134,136,138,140,142,144,146,150,152,154,156,158,160,166,172,174
%N A023693 Numbers with exactly 2 1's in ternary expansion.
%C A023693 From _Bernard Schott_, Jun 19 2023: (Start)
%C A023693 A003946 \ {1} is a subsequence since for m = 4*3^(k-1) with k >= 1, ternary expansion of m is 110...0 with (k-1) trailing 0's.
%C A023693 A034472 \ {2} is a subsequence since for m = 3^k + 1 with k >= 1, ternary expansion of m is 10...01 with (k-1) 0's between first and last 1's. (End)
%H A023693 Amiram Eldar, <a href="/A023693/b023693.txt">Table of n, a(n) for n = 1..10000</a>
%e A023693 30 is a term since 30 = 1010_3 with exactly 2 1's.
%t A023693 Select[ Range[ 162 ], (Count[ IntegerDigits[ #, 3 ], 1 ]==2)& ]
%o A023693 (PARI) isok(k) = #select(x->(x==1), digits(k, 3)) == 2; \\ _Michel Marcus_, Jun 19 2023
%Y A023693 Cf. A003946, A007089, A034472.
%K A023693 nonn,base,easy
%O A023693 1,1
%A A023693 _Olivier Gérard_