login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A046034 Numbers whose digits are primes. 101
2, 3, 5, 7, 22, 23, 25, 27, 32, 33, 35, 37, 52, 53, 55, 57, 72, 73, 75, 77, 222, 223, 225, 227, 232, 233, 235, 237, 252, 253, 255, 257, 272, 273, 275, 277, 322, 323, 325, 327, 332, 333, 335, 337, 352, 353, 355, 357, 372, 373, 375, 377, 522, 523, 525, 527, 532 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
If n is represented as a zerofree base-4 number (see A084544) 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)=2,3,5,7 for k=1..4. - Hieronymus Fischer, May 30 2012
According to A153025, it seems that 5, 235 and 72335 are the only terms whose square is also a term, i.e., which are also in the sequence A275971 of square roots of the terms which are squares, listed in A191486. - M. F. Hasler, Sep 16 2016
LINKS
Robert Baillie and Thomas Schmelzer, Summing Kempner's Curious (Slowly-Convergent) Series, Mathematica Notebook kempnerSums.nb, Wolfram Library Archive, 2008.
Eric Weisstein's World of Mathematics, Smarandache Sequences.
FORMULA
A055642(a(n)) = A193238(a(n)). - Reinhard Zumkeller, Jul 19 2011
From Hieronymus Fischer, Apr 20, May 30 and Jun 25 2012: (Start)
a(n) = Sum_{j=0..m-1} ((2*b(j)+1) mod 8 + floor(b(j)/4) - floor((b(j)-1)/4))*10^j, where m = floor(log_4(3*n+1)), b(j) = floor((3*n+1-4^m)/(3*4^j)).
a(n) = Sum_{j=0..m-1} (A010877(A005408(b(j)) + A002265(b(j)) - A002265(b(j)-1))*10^j.
Special values:
a(1*(4^n-1)/3) = 2*(10^n-1)/9.
a(2*(4^n-1)/3) = 1*(10^n-1)/3.
a(3*(4^n-1)/3) = 5*(10^n-1)/9.
a(4*(4^n-1)/3) = 7*(10^n-1)/9.
Inequalities:
a(n) <= 2*(10^log_4(3*n+1)-1)/9, equality holds for n = (4^k-1)/3, k>0.
a(n) <= 2*A084544(n), equality holds iff all digits of A084544(n) are 1.
a(n) > A084544(n).
Lower and upper limits:
lim inf a(n)/10^log_4(n) = (7/90)*10^log_4(3) = 0.48232167706987..., for n -> oo.
lim sup a(n)/10^log_4(n) = (2/9)*10^log_4(3) = 1.378061934485343..., for n -> oo.
where 10^log_4(n) = n^1.66096404744...
G.f.: g(x) = (x^(1/3)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(4/3)*(2 + z(j) + 2*z(j)^2 + 2*z(j)^3 - 7*z(j)^4)/(1-z(j)^4), where z(j) = x^4^j.
Also g(x) = (x^(1/3)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(4/3)*(1-z(j))*(2 + 3*z(j) + 5*z(j)^2 + 7*z(j)^3)/(1-z(j)^4), where z(j)=x^4^j.
Also: g(x) = (1/(1-x))*(2*h_(4,0)(x) + h_(4,1)(x) + 2*h_(4,2)(x) + 2*h_(4,3)(x) - 7*h_(4,4)(x)), where h_(4,k)(x) = Sum_{j>=0} 10^j*x^((4^(j+1)-1)/3)*x^(k*4^j)/(1-x^4^(j+1)). (End)
Sum_{n>=1} 1/a(n) = 1.857333779940977502574887651449435985318556794733869779170825138954093657197... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024
EXAMPLE
a(100) = 2277,
a(10^3) = 55327,
a(9881) = 3233232,
a(10^4) = 3235757,
a(10922) = 3333333,
a(10^5) = 227233257.
MATHEMATICA
Table[FromDigits /@ Tuples[{2, 3, 5, 7}, n], {n, 3}] // Flatten (* Michael De Vlieger, Sep 19 2016 *)
PROG
(PARI) is_A046034(n)=Set(isprime(digits(n)))==[1] \\ M. F. Hasler, Oct 12 2013
(Haskell)
a046034 n = a046034_list !! (n-1)
a046034_list = filter (all (`elem` "2357") . show ) [0..]
-- Reinhard Zumkeller, Jul 19 2011
(Magma) [n: n in [2..532] | Set(Intseq(n)) subset [2, 3, 5, 7]]; // Bruno Berselli, Jul 19 2011
(Python)
def A046034(n):
m = (3*n+1).bit_length()-1>>1
return int(''.join(('2357'[(3*n+1-(1<<(m<<1)))//(3<<((m-1-j)<<1))&3] for j in range(m)))) # Chai Wah Wu, Feb 08 2023
CROSSREFS
Sequence in context: A340112 A085557 A125665 * A062087 A162457 A084983
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Cino Hilliard, Aug 06 2006
Typo in second formula corrected by Hieronymus Fischer, May 12 2012
Two typos in example section corrected by Hieronymus Fischer, May 30 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)