login
A001742
Numbers whose digits contain no loops (version 2).
16
1, 2, 3, 5, 7, 11, 12, 13, 15, 17, 21, 22, 23, 25, 27, 31, 32, 33, 35, 37, 51, 52, 53, 55, 57, 71, 72, 73, 75, 77, 111, 112, 113, 115, 117, 121, 122, 123, 125, 127, 131, 132, 133, 135, 137, 151, 152, 153, 155, 157, 171, 172, 173, 175, 177, 211, 212, 213, 215
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
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.
a(n) = A084545(n) iff all digits of A084545(n) are <= 3, a(n) > A084545(n), otherwise.
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
Cf. A001729 (version 1), A190222 (noncomposite terms), A190223 (n with all divisors in this sequence).
Sequence in context: A163753 A131930 A230918 * A307714 A369254 A073085
KEYWORD
base,nonn,easy
STATUS
approved