OFFSET
1,2
COMMENTS
Numbers all of whose decimal digits are in {1,2,3,5,7}.
If n is represented as a zerofree base-5 number (see A084545) according to n = d(m)d(m-1)...d(3)d(2)d(1)d(0) then a(n) = Sum_{j=0..m} c(d(j))*10^j, where c(k)=1,2,3,5,7 for k=1..5. - Hieronymus Fischer, May 30 2012
LINKS
Hieronymus Fischer, Table of n, a(n) for n = 1..10000
Robert Baillie and Thomas Schmelzer, Summing Kempner's Curious (Slowly-Convergent) Series, Mathematica Notebook kempnerSums.nb, Wolfram Library Archive, 2008.
FORMULA
From Hieronymus Fischer, May 30 2012: (Start)
a(n) = Sum_{j=0..m-1} ((2*b_j(n)+1) mod 10 + 2*floor(b_j(n)/5) - floor((b_j(n)+3)/5) - floor((b_j(n)+4)/5))*10^j, where b_j(n) = floor((4*n+1-5^m)/(4*5^j)), m = floor(log_5(4*n+1)).
a(1*(5^n-1)/4) = 1*(10^n-1)/9.
a(2*(5^n-1)/4) = 2*(10^n-1)/9.
a(3*(5^n-1)/4) = 1*(10^n-1)/3.
a(4*(5^n-1)/4) = 5*(10^n-1)/9.
a(5*(5^n-1)/4) = 7*(10^n-1)/9.
a(n) = (10^log_5(4*n+1)-1)/9 for n=(5^k-1)/4, k > 0.
a(n) < (10^log_5(4*n+1)-1)/9 for (5^k-1)/4 < n < (5^(k+1)-1)/4, k > 0.
a(n) <= A202268(n), equality holds for n=(5^k-1)/4, k > 0.
G.f.: g(x) = (x^(1/4)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(5/4)*(1 + z(j) + z(j)^2 + 2*z(j)^3 + 2*z(j)^4 - 7*z(j)^5)/(1-z(j)^5), where z(j) = x^5^j.
Also g(x) = (x^(1/4)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(5/4)*(1-z(j))*(1 + 2z(j) + 3*z(j)^2 + 5*z(j)^3 + 7*z(j)^4)/(1-z(j)^5), where z(j) = x^5^j.
Also: g(x)=(1/(1-x))*(h_(5,0)(x) + h_(5,1)(x) + h_(5,2)(x) + 2*h_(5,3)(x) + 2*h_(5,4)(x) - 7*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). (End)
Sum_{n>=1} 1/a(n) = 3.961674246441345455010500439753914974057344229353697593567607096540565407371... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024
EXAMPLE
From Hieronymus Fischer, May 30 2012: (Start)
a(10^3) = 12557.
a(10^4) = 275557.
a(10^5) = 11155557.
a(10^6) = 223555557. (End)
MATHEMATICA
nlQ[n_]:=And@@(MemberQ[{1, 2, 3, 5, 7}, #]&/@IntegerDigits[n]); Select[Range[ 160], nlQ] (* Harvey P. Dale, Mar 23 2012 *)
Table[FromDigits/@Tuples[{1, 2, 3, 5, 7}, n], {n, 3}] // Flatten (* Vincenzo Librandi, Dec 17 2018 *)
PROG
(Perl) for (my $k = 1; $k < 1000; $k++) {print "$k, " if ($k =~ m/^[12357]+$/)} # Charles R Greathouse IV, Jun 10 2011
(Magma) [n: n in [1..500] | Set(Intseq(n)) subset [1, 2, 3, 5, 7]]; // Vincenzo Librandi, Dec 17 2018
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
STATUS
approved