%I #34 Dec 04 2019 21:01:38
%S 1,2,3,4,5,11,12,13,14,15,21,22,23,24,25,31,32,33,34,35,41,42,43,44,
%T 45,51,52,53,54,55,111,112,113,114,115,121,122,123,124,125,131,132,
%U 133,134,135,141,142,143,144,145,151,152,153,154,155,211,212,213,214,215,221,222
%N Alternate number system in base 5.
%H Hieronymus Fischer, <a href="/A084545/b084545.txt">Table of n, a(n) for n = 1..10000</a>
%H EMIS, <a href="http://www.emis.de/journals/SWJPAM/vol1-95.html">Mirror site for Southwest Journal of Pure and Applied Mathematics</a>
%H R. 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 R. R. Forslund, <a href="https://web.archive.org/web/20051023210656/http://my.tbaytel.net/~forslund/index.html">Positive Integer Pages</a> [Wayback Machine link]
%H 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 <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.
%F From _Hieronymus Fischer_, Jun 06 and Jun 08 2012: (Start)
%F The formulas are designed to calculate base-10 numbers only using the digits 1..5.
%F a(n) = Sum_{j=0..m-1} (1 + b(j) mod 5)*10^j, where m = floor(log_5(4*n+1)), b(j) = floor((4*n+1-5^m)/(4*5^j)).
%F a(k*(5^n-1)/4) = k*(10^n-1)/9, for k = 1,2,3,4,5.
%F a((9*5^n-5)/4) = (14*10^n-5)/9 = 10^n + 5*(10^n-1)/9.
%F a((5^n-1)/4 - 1) = 5*(10^(n-1)-1)/9, n>1.
%F a(n) <= (10^log_5(4*n+1)-1)/9, equality holds for n=(5^k-1)/4, k>0.
%F a(n) > (5/10)*(10^log_5(4*n+1)-1)/9, n>0.
%F lim inf a(n)/10^log_5(4*n) = 1/18, for n --> infinity.
%F lim sup a(n)/10^log_5(4*n) = 1/9, for n --> infinity.
%F G.f.: g(x) = (x^(1/4)*(1-x))^(-1) sum_{j>=0} 10^j*z(j)^(5/4)*(1 - 6z(j)^5 + 5z(j)^6)/((1-z(j))(1-z(j)^5)), where z(j) = x^5^j.
%F Also: g(x) = (1/(1-x)) sum_{j>=0} (1-6(x^5^j)^5+5(x^5^j)^6)*x^5^j*f_j(x)/(1-x^5^j), where f_j(x) = 10^j*x^((5^j-1)/4)/(1-(x^5^j)^5). The f_j obey the recurrence f_0(x) = 1/(1-x^5), f_(j+1)(x) = 10x*f_j(x^5).
%F Also: g(x) = 1/(1-x))*(h_(5,0)(x) + h_(5,1)(x) + h_(5,2)(x) + h_(4,1)(x) + h_(5,4)(x) - 5*h_(5,5)(x)), where h_(5,k)(x) = sum_{j>=0} 10^j*x^((5^(j+1)-1)/4) * (x^5^j)^k/(1-(x^5^j)^5).
%F (End)
%e From _Hieronymus Fischer_, Jun 06 2012: (Start)
%e a(100) = 345.
%e a(10^3) = 12445.
%e a(10^4) = 254445.
%e a(10^5) = 11144445.
%e a(10^6) = 223444445.
%e a(10^7) = 4524444445.
%e a(10^8) = 145544444445.
%e a(10^9) = 3521444444445. (End)
%o (PARI) a(n) = my (w=5); while (n>w, n -= w; w *= 5); my (d=digits(w+n-1, 5)); d[1] = 0; fromdigits(d) + (10^(#d-1)-1)/9 \\ _Rémy Sigrist_, Dec 04 2019
%Y Cf. A007931, A007932, A052382, A084544, A046034, A089581, A084984, A001742, A001743, A001744, A202267, A202268, A014261, A014263.
%K nonn,base,easy
%O 1,2
%A Robert R. Forslund (forslund(AT)tbaytel.net), Jun 27 2003
%E Offset set to 1 according to A007931, A007932 and more terms added by _Hieronymus Fischer_, Jun 06 2012