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.

A007932 Numbers that contain only 1's, 2's and 3's.

This page as a plain text file.
%I A007932 #65 Aug 29 2018 03:02:20
%S A007932 1,2,3,11,12,13,21,22,23,31,32,33,111,112,113,121,122,123,131,132,133,
%T A007932 211,212,213,221,222,223,231,232,233,311,312,313,321,322,323,331,332,
%U A007932 333,1111,1112,1113,1121,1122,1123,1131,1132,1133,1211,1212,1213,1221
%N A007932 Numbers that contain only 1's, 2's and 3's.
%C A007932 This sequence is the alternate number system in base 3. - Robert R. Forslund (forslund(AT)tbaytel.net), Jun 27 2003
%C A007932 a(n) is the "bijective base-k numeration" or "k-adic notation" for k=3. - Chris Gaconnet (gaconnet(AT)gmail.com), May 27 2009
%C A007932 a(n) = n written in base 3 where zeros are not allowed but threes are. The three distinct digits used are 1, 2 and 3 instead of 0, 1 and 2. To obtain this sequence from the "canonical" base 3 sequence with zeros allowed, just replace any 0 with a 3 and then subtract one from the group of digits situated on the left: (20-->13; 100-->23; 110-->33; 1000-->223; 1010-->233). This can be done in any integer positive base b, replacing zeros with positive b's and subtracting one from the group of digits situated on the left. And zero is the only digit that can be replaced, since there is always a more significant digit greater than 0, on the left, from which to subtract one. - _Robin Garcia_, Jan 07 2014
%D A007932 K. Atanassov, On the 97th, 98th and the 99th Smarandache Problems, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 5 (1999), No. 3, 89-93.
%D A007932 A. Salomaa, Formal Languages, Academic Press, 1973. pages 90-91. [From Chris Gaconnet (gaconnet(AT)gmail.com), May 27 2009]
%H A007932 Hieronymus Fischer, <a href="/A007932/b007932.txt">Table of n, a(n) for n = 1..10000</a>
%H A007932 K. Atanassov, <a href="http://www.gallup.unm.edu/~smarandache/Atanassov-SomeProblems.pdf">On Some of Smarandache's Problems</a>
%H A007932 EMIS, <a href="http://www.emis.de/journals/SWJPAM/vol1-95.html">Mirror site for Southwest Journal of Pure and Applied Mathematics</a>
%H A007932 Robert R. Forslund, <a href="http://www.emis.de/journals/SWJPAM/Vol1_1995/rrf01.ps">A Logical Alternative to the Existing Positional Number System</a>, Southwest Journal of Pure and Applied Mathematics. Vol. 1 1995 pp. 27-29.
%H A007932 James E. Foster, <a href="http://www.jstor.org/stable/3029479">A Number System without a Zero-Symbol</a>, Mathematics Magazine, Vol. 21, No. 1. (1947), pp. 39-41.
%H A007932 F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/OPNS.pdf">Only Problems, Not Solutions!</a>.
%H A007932 Wikipedia, <a href="http://en.wikipedia.org/wiki/Bijective_numeration">Bijective numeration</a>
%H A007932 <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.
%F A007932 From _Hieronymus Fischer_, May 30 2012 and Jun 08 2012: (Start)
%F A007932 The formulas are designed to calculate base-10 numbers only using the digits 1, 2, 3.
%F A007932 a(n) = Sum_{j=0..m-1} (1 + b(j) mod 3)*10^j,
%F A007932 where m = floor(log_3(2*n+1)), b(j) = floor((2*n+1-3^m)/(2*3^j)).
%F A007932 Special values:
%F A007932 a(k*(3^n-1)/2) = k*(10^n-1)/9, k=1,2,3.
%F A007932 a((5*3^n-3)/2) = (4*10^n-1)/3 = 10^n + (10^n-1)/3.
%F A007932 a((3^n-1)/2 - 1) = (10^(n-1)-1)/3, n>1.
%F A007932 Inequalities:
%F A007932 a(n) <= (10^log_3(2*n+1)-1)/9, equality holds for n=(3^k-1)/2, k>0.
%F A007932 a(n) > (3/10)*(10^log_3(2*n+1)-1)/9, n>0.
%F A007932 Lower and upper limits:
%F A007932 lim inf a(n)/10^log_3(2*n) = 1/30, for n --> infinity.
%F A007932 lim sup a(n)/10^log_3(2*n) = 1/9, for n --> infinity.
%F A007932 G.f.: g(x) = (x^(1/2)*(1-x))^(-1) Sum_{j=>0} 10^j*(x^3^j)^(3/2) * (1-x^3^j)*(1 + 2x^3^j + 3x^(2*3^j))/(1 - x^3^(j+1)).
%F A007932 Also: g(x) = (1/(1-x)) Sum_{j>=0} (1 - 4(x^3^j)^3 + 3(x^3^j)^4)*x^3^j*f_j(x)/(1-x^3^j), where f_j(x) = 10^j*x^((3^j-1)/2)/(1-(x^3^j)^3). The f_j obey the recurrence f_0(x) = 1/(1-x^3), f_(j+1)(x) = 10x*f_j(x^3).
%F A007932 Also: g(x) = (1/(1-x))*(h_(3,0)(x) + h_(3,1)(x) + h_(3,2)(x) - 3*h_(3,3)(x)), where h_(3,k)(x) = Sum_{j>=0} 10^j*x^((3^(j+1)-1)/2) * (x^3^j)^k/(1-(x^3^j)^3).
%F A007932 (End)
%e A007932 a(100)  = 3131.
%e A007932 a(10^3) = 323231.
%e A007932 a(10^4) = 111123331.
%e A007932 a(10^5) = 11231311131.
%e A007932 a(10^6) = 1212133131231.
%e A007932 a(10^7) = 123133223331331.
%e A007932 a(10^8) = 13221311111312131.
%e A007932 a(10^9) = 2113123122313232231.
%e A007932 - _Hieronymus Fischer_, Jun 06 2012
%t A007932 NextNbr[n_] := Block[{d = IntegerDigits[n + 1], l}, l = Length[d]; While[l != 1, If[ d[[l]] > 3, d[[l - 1]]++; d[[l]] = 1]; l-- ]; If[ d[[1]] > 3, d[[1]] = 11]; FromDigits[d]]; NestList[ NextNbr, 1, 51]
%t A007932 Table[FromDigits/@Tuples[{1,2,3},n],{n,4}]//Flatten (* _Harvey P. Dale_, Mar 29 2018 *)
%o A007932 (PARI) a(n) = my (w=3); while (n>w, n -= w; w *= 3); my (d=digits(w+n-1, 3)); d[1] = 0; fromdigits(d) + (10^(#d-1)-1)/9 \\ _Rémy Sigrist_, Aug 28 2018
%Y A007932 Cf. A007931, A052382, A084544, A084545, A046034, A089581, A084984, A001742, A001743, A001744, A202267, A202268, A014261, A014263.
%K A007932 nonn,base,easy
%O A007932 1,2
%A A007932 R. Muller
%E A007932 Edited and extended by _Robert G. Wilson v_, Dec 14 2002
%E A007932 Crossrefs added by _Hieronymus Fischer_, Jun 06 2012