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.

A032858 Numbers whose base-3 representation Sum_{i=0..m} d(i)*3^i has d(m) > d(m-1) < d(m-2) > ...

This page as a plain text file.
%I A032858 #25 Oct 12 2018 21:18:17
%S A032858 0,1,2,3,6,7,10,11,19,20,23,30,33,34,57,60,61,69,70,91,92,100,101,104,
%T A032858 172,173,181,182,185,208,209,212,273,276,277,300,303,304,312,313,516,
%U A032858 519,520,543,546,547,555,556,624,627,628,636,637
%N A032858 Numbers whose base-3 representation Sum_{i=0..m} d(i)*3^i has d(m) > d(m-1) < d(m-2) > ...
%C A032858 Every other base-3 digit must be strictly less than its neighbors. - _M. F. Hasler_, Oct 05 2018
%C A032858 The terms can be generated in the following way: if A(n) are the terms with n digits in base 3, the terms with n+2 digits are obtained by prefixing them with '10' and with '20', and prefixing '21' to those starting with a digit '2'. It is easy to prove that #A(n) = A000045(n+2), since from the above we have #A(n+2) = 2*#A(n) + #A(n-1) = #A(n) + #A(n+1). (The #A(n-1) numbers starting with '2' are #A(n-2) numbers prefixed with '20' and #A(n-3) prefixed with '21'.) - _M. F. Hasler_, Oct 05 2018
%H A032858 M. F. Hasler, <a href="/A032858/b032858.txt">Table of n, a(n) for n = 1..5000</a>
%F A032858 a(A000071(n+3)) = floor(3^(n+1)/8) = A033113(n). - _M. F. Hasler_, Oct 05 2018
%e A032858 The base-3 representation of the initial terms is 0, 1, 2, 10, 20, 21, 101, 102, 201, 202, 212, 1010, 1020, 1021, 2010, 2020, 2021, 2120, 2121, 10101, 10102, ...
%t A032858 sdQ[n_]:=Module[{s=Sign[Differences[IntegerDigits[n, 3]]]}, s==PadRight[{}, Length[s], {-1, 1}]]; Select[Range[0, 700], sdQ] (* _Vincenzo Librandi_, Oct 06 2018 *)
%o A032858 (PARI) is(n,b=3)=!for(i=2,#n=digits(n,b),(n[i-1]-n[i])*(-1)^i>0||return) \\ _M. F. Hasler_, Oct 05 2018
%Y A032858 Cf. A032859 .. A032865 for base-4 .. 10 variants.
%Y A032858 Cf. A000975 (or A056830 in binary) for the base-2 analog.
%Y A032858 Cf. A306105 for these terms written in base 3.
%K A032858 nonn,base
%O A032858 1,3
%A A032858 _Clark Kimberling_
%E A032858 Definition edited, cross-references and a(1) = 0 inserted by _M. F. Hasler_, Oct 05 2018