login
Numbers containing no prime digits.
31

%I #62 Aug 24 2024 17:20:47

%S 0,1,4,6,8,9,10,11,14,16,18,19,40,41,44,46,48,49,60,61,64,66,68,69,80,

%T 81,84,86,88,89,90,91,94,96,98,99,100,101,104,106,108,109,110,111,114,

%U 116,118,119,140,141,144,146,148,149,160,161,164,166,168,169

%N Numbers containing no prime digits.

%C Complement of A118950. - _Reinhard Zumkeller_, Jul 19 2011

%C If n-1 is represented as a base-6 number (see A007092) according to n-1=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)=0,1,4,6,8,9 for k=0..5. - _Hieronymus Fischer_, May 30 2012

%H Reinhard Zumkeller, <a href="/A084984/b084984.txt">Table of n, a(n) for n = 1..10000</a>

%H Robert Baillie and Thomas Schmelzer, <a href="https://library.wolfram.com/infocenter/MathSource/7166/">Summing Kempner's Curious (Slowly-Convergent) Series</a>, Mathematica Notebook kempnerSums.nb, Wolfram Library Archive, 2008.

%H <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.

%F A193238(a(n)) = 0. - _Reinhard Zumkeller_, Jul 19 2011

%F a(n) >> n^1.285. - _Charles R Greathouse IV_, Feb 20 2012

%F From _Hieronymus Fischer_, May 30 and Jun 25 2012: (Start)

%F a(n) = ((2*b_m(n)+1) mod 10 + floor((b_m(n)+4)/5) - floor((b_m(n)+1)/5))*10^m + sum_{j=0..m-1} ((2*b_j(n))) mod 12 + floor(b_j(n)/6) - floor((b_j(n)+1)/6) + floor((b_j(n)+4)/6) - floor((b_j(n)+5)/6)))*10^j, where n>1, b_j(n)) = floor((n-1-6^m)/6^j), m = floor(log_6(n-1)).

%F Special values:

%F a(1*6^n+1) = 1*10^n.

%F a(2*6^n+1) = 4*10^n.

%F a(3*6^n+1) = 6*10^n.

%F a(4*6^n+1) = 8*10^n.

%F a(5*6^n+1) = 9*10^n.

%F a(2*6^n) = 2*10^n - 1.

%F a(n) = 10^log_6(n-1) for n=6^k+1, k>0.

%F Inequalities:

%F a(n) < 10^log_6(n-1) for 6^k+1<n<=2*6^k, k>0.

%F a(n) > 10^log_6(n-1) for 2*6^k<n<=6*6^k, k>=0.

%F a(n) <= 4*10^(log_6(n-1)-log_6(2)) = 1.641372618*10^(log_6(n-1)), equality holds for n=2*6^k+1, k>=0.

%F a(n) > 2*10^(log_6(n-1)-log_6(2)) = 0.820686309*10^(log_6(n-1)).

%F a(n) = A007092(n-1) iff the digits of A007092(n-1) are 0 or 1, a(n)>A007092(n-1), else.

%F a(n) >= A202267(n), equality holds if the representation of n-1 as a base-6 number has only digits 0 or 1.

%F Lower and upper limits:

%F lim inf a(n)/10^log_6(n) = 2/10^log_6(2) = 0.820686309, for n --> inf.

%F lim sup a(n)/10^log_6(n) = 4/10^log_6(2) = 1.641372618, for n --> inf.

%F where 10^log_6(n) = n^1.2850972089...

%F G.f.: g(x) = (x/(1-x))*sum_{j>=0} 10^j*x^6^j * (1-x^6^j)*((1+x^6^j)^4 + 4(1+2x^6^j) * x^(3*6^j))/(1-x^6^(j+1)).

%F Also: g(x) = (x/(1-x))*(h_(6,1)(x) + 3*h_(6,2)(x) + 2*h_(6,3)(x) + 2*h_(6,4)(x) + h_(6,5)(x) - 9*h_(6,6)(x)), where h_(6,k)(x) = sum_{j>=0} 10^j*x^(k*6^j)/(1-x^6^(j+1)). (End)

%F Sum_{n>=2} 1/a(n) = 3.614028405471074989720026361356036456697082276983705341077940360653303099111... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - _Amiram Eldar_, Feb 15 2024

%e 166 has digits 1 and 6 and they are nonprime digits.

%e a(1000) = 8686.

%e a(10^4) = 118186

%e a(10^5) = 4090986.

%e a(10^6) = 66466686.

%t npdQ[n_]:=And@@Table[FreeQ[IntegerDigits[n],i],{i,{2,3,5,7}}]; Select[ Range[ 0,200],npdQ] (* _Harvey P. Dale_, Jul 22 2013 *)

%o (Haskell)

%o a084984 n = a084984_list !! (n-1)

%o a084984_list = filter (not . any (`elem` "2357") . show ) [0..]

%o -- _Reinhard Zumkeller_, Jul 19 2011

%o (Magma) [n: n in [0..169] | forall{d: d in [2,3,5,7] | d notin Set(Intseq(n))}]; // _Bruno Berselli_, Jul 19 2011

%o (PARI) is(n)=isprime(eval(Vec(Str(n))))==0 \\ _Charles R Greathouse IV_, Feb 20 2012

%Y Cf. A046034, A034844 (primes), A118950, A193238.

%Y Cf. A007092, A029581, A017042, A001743, A001744, A014263, A202267, A202268.

%K base,nonn

%O 1,3

%A Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 27 2003

%E 0 added by _N. J. A. Sloane_, Feb 02 2009

%E 100 added by _Arkadiusz Wesolowski_, Mar 10 2011

%E Examples for n>=10^3 added by _Hieronymus Fischer_, May 30 2012