cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-20 of 32 results. Next

A193238 Number of prime digits in decimal representation of n.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 0, 0, 1, 1, 0, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 19 2011

Keywords

Crossrefs

Programs

Formula

a(A084984(n))=0; a(A118950(n))>0; a(A092620(n))=1; a(A092624(n))=2; a(A092625(n))=3; a(A046034(n))=A055642(A046034(n));
a(A000040(n)) = A109066(n).
From Hieronymus Fischer, May 30 2012: (Start)
a(n) = sum_{j=1..m+1} (floor(n/10^j+0.3) + floor(n/10^j+0.5) + floor(n/10^j+0.8) - floor(n/10^j+0.2) - floor(n/10^j+0.4) - floor(n/10^j+0.6)), where m=floor(log_10(n)), n>0.
a(10n+k) = a(n) + a(k), 0<=k<10, n>=0.
a(n) = a(floor(n/10)) + a(n mod 10), n>=0.
a(n) = sum_{j=0..m} a(floor(n/10^j) mod 10), n>=0.
a(A046034(n)) = floor(log_4(3n+1)), n>0.
a(A211681(n)) = 1 + floor((n-1)/4), n>0.
G.f.: g(x) = (1/(1-x))*sum_{j>=0} (x^(2*10^j) + x^(3*10^j)+ x^(5*10^j) + x^(7*10^j))*(1-x^10^j)/(1-x^10^(j+1)).
Also: g(x) = (1/(1-x))*sum_{j>=0} (x^(2*10^j)- x^(4*10^j)+ x^(5*10^j)- x^(6*10^j)+ x^(7*10^j)- x^(8*10^j))/(1-x^10^(j+1)). (End)

A202267 Numbers in which all digits are noncomposites (1, 2, 3, 5, 7) or 0.

Original entry on oeis.org

0, 1, 2, 3, 5, 7, 10, 11, 12, 13, 15, 17, 20, 21, 22, 23, 25, 27, 30, 31, 32, 33, 35, 37, 50, 51, 52, 53, 55, 57, 70, 71, 72, 73, 75, 77, 100, 101, 102, 103, 105, 107, 110, 111, 112, 113, 115, 117, 120, 121, 122, 123, 125, 127, 130, 131, 132, 133, 135, 137, 150
Offset: 1

Views

Author

Jaroslav Krizek, Dec 25 2011

Keywords

Comments

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,2,3,5,7 for k=0..5. - Hieronymus Fischer, May 30 2012

Examples

			a(1000) = 5353.
a(10^4) = 115153
a(10^5) = 2070753.
a(10^6) = 33233353.
		

Crossrefs

Supersequence of A001742 and A046034.
Cf. A046034 (numbers in which all digits are primes), A001742 (numbers in which all digits are noncomposites excluding 0), A202268 (numbers in which all digits are nonprimes excluding 0), A084984 (numbers in which all digits are nonprimes), A029581 (numbers in which all digits are composites).

Programs

  • Mathematica
    Union[Flatten[FromDigits/@Tuples[{0,1,2,3,5,7},3]]] (* Harvey P. Dale, Mar 11 2015 *)

Formula

From Hieronymus Fischer, May 30 2012: (Start)
a(n) = (b_m(n)+1) mod 10 + floor((b_m(n)+2)/5) + floor((b_m(n)+1)/5) - 2*floor(b_m(n)/5))*10^m + sum_{j=0..m-1} (b_j(n) mod 6 + floor((b_j(n)+1)/6) + floor((b_j(n)+2)/6) - 2*floor(b_j(n)/6)))*10^j, where n>1, b_j(n)) = floor((n-1-6^m)/6^j), m = floor(log_6(n-1)).
a(1*6^n+1) = 1*10^n.
a(2*6^n+1) = 2*10^n.
a(3*6^n+1) = 3*10^n.
a(4*6^n+1) = 5*10^n.
a(5*6^n+1) = 7*10^n.
a(n) = 10^log_6(n-1) for n=6^k+1, k>0,
a(n) < 10^log_6(n-1) else.
a(n) = A007092(n-1) iff the digits of A007092(n-1) are <= 3, a(n)>A007092(n-1), else.
a(n) <= A084984(n), equality holds if the representation of n-1 as a base-6 number only has digits 0 or 1.
G.f.: g(x) = (x/(1-x))*sum_{j>=0} 10^j*x^6^j *(1-x^6^j)* (1 + 2x^6^j + 3(x^2)^6^j + 5(x^3)^6^j + 7(x^4)^6^j)/(1-x^6^(j+1)).
Also: g(x) = (x/(1-x))*(h_(6,1)(x) + h_(6,2)(x) + h_(6,3)(x) + 2*h_(6,4)(x) + 2*h_(6,5)(x) - 7*h_(6,6)(x)), where h_(6,k)(x) = sum_{j>=0} 10^j*x^(k*6^j)/(1-x^6^(j+1)). (End)
Sum_{n>=2} 1/a(n) = 4.945325883472729555972742252181522711968119529132581193614012706741310832798... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024

Extensions

Examples added by Hieronymus Fischer, May 30 2012

A007932 Numbers that contain only 1's, 2's and 3's.

Original entry on oeis.org

1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33, 111, 112, 113, 121, 122, 123, 131, 132, 133, 211, 212, 213, 221, 222, 223, 231, 232, 233, 311, 312, 313, 321, 322, 323, 331, 332, 333, 1111, 1112, 1113, 1121, 1122, 1123, 1131, 1132, 1133, 1211, 1212, 1213, 1221
Offset: 1

Views

Author

R. Muller

Keywords

Comments

This sequence is the alternate number system in base 3. - Robert R. Forslund (forslund(AT)tbaytel.net), Jun 27 2003
a(n) is the "bijective base-k numeration" or "k-adic notation" for k=3. - Chris Gaconnet (gaconnet(AT)gmail.com), May 27 2009
a(n) = n written in base 3 where zeros are not allowed but threes are. The three distinct digits used are 1, 2 and 3 instead of 0, 1 and 2. To obtain this sequence from the "canonical" base 3 sequence with zeros allowed, just replace any 0 with a 3 and then subtract one from the group of digits situated on the left: (20-->13; 100-->23; 110-->33; 1000-->223; 1010-->233). This can be done in any integer positive base b, replacing zeros with positive b's and subtracting one from the group of digits situated on the left. And zero is the only digit that can be replaced, since there is always a more significant digit greater than 0, on the left, from which to subtract one. - Robin Garcia, Jan 07 2014

Examples

			a(100)  = 3131.
a(10^3) = 323231.
a(10^4) = 111123331.
a(10^5) = 11231311131.
a(10^6) = 1212133131231.
a(10^7) = 123133223331331.
a(10^8) = 13221311111312131.
a(10^9) = 2113123122313232231.
- _Hieronymus Fischer_, Jun 06 2012
		

References

  • K. Atanassov, On the 97th, 98th and the 99th Smarandache Problems, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 5 (1999), No. 3, 89-93.
  • A. Salomaa, Formal Languages, Academic Press, 1973. pages 90-91. [From Chris Gaconnet (gaconnet(AT)gmail.com), May 27 2009]

Crossrefs

Programs

  • Mathematica
    NextNbr[n_] := Block[{d = IntegerDigits[n + 1], l}, l = Length[d]; While[l != 1, If[ d[[l]] > 3, d[[l - 1]]++; d[[l]] = 1]; l-- ]; If[ d[[1]] > 3, d[[1]] = 11]; FromDigits[d]]; NestList[ NextNbr, 1, 51]
    Table[FromDigits/@Tuples[{1,2,3},n],{n,4}]//Flatten (* Harvey P. Dale, Mar 29 2018 *)
  • PARI
    a(n) = my (w=3); while (n>w, n -= w; w *= 3); my (d=digits(w+n-1, 3)); d[1] = 0; fromdigits(d) + (10^(#d-1)-1)/9 \\ Rémy Sigrist, Aug 28 2018

Formula

From Hieronymus Fischer, May 30 2012 and Jun 08 2012: (Start)
The formulas are designed to calculate base-10 numbers only using the digits 1, 2, 3.
a(n) = Sum_{j=0..m-1} (1 + b(j) mod 3)*10^j,
where m = floor(log_3(2*n+1)), b(j) = floor((2*n+1-3^m)/(2*3^j)).
Special values:
a(k*(3^n-1)/2) = k*(10^n-1)/9, k=1,2,3.
a((5*3^n-3)/2) = (4*10^n-1)/3 = 10^n + (10^n-1)/3.
a((3^n-1)/2 - 1) = (10^(n-1)-1)/3, n>1.
Inequalities:
a(n) <= (10^log_3(2*n+1)-1)/9, equality holds for n=(3^k-1)/2, k>0.
a(n) > (3/10)*(10^log_3(2*n+1)-1)/9, n>0.
Lower and upper limits:
lim inf a(n)/10^log_3(2*n) = 1/30, for n --> infinity.
lim sup a(n)/10^log_3(2*n) = 1/9, for n --> infinity.
G.f.: g(x) = (x^(1/2)*(1-x))^(-1) Sum_{j=>0} 10^j*(x^3^j)^(3/2) * (1-x^3^j)*(1 + 2x^3^j + 3x^(2*3^j))/(1 - x^3^(j+1)).
Also: g(x) = (1/(1-x)) Sum_{j>=0} (1 - 4(x^3^j)^3 + 3(x^3^j)^4)*x^3^j*f_j(x)/(1-x^3^j), where f_j(x) = 10^j*x^((3^j-1)/2)/(1-(x^3^j)^3). The f_j obey the recurrence f_0(x) = 1/(1-x^3), f_(j+1)(x) = 10x*f_j(x^3).
Also: g(x) = (1/(1-x))*(h_(3,0)(x) + h_(3,1)(x) + h_(3,2)(x) - 3*h_(3,3)(x)), where h_(3,k)(x) = Sum_{j>=0} 10^j*x^((3^(j+1)-1)/2) * (x^3^j)^k/(1-(x^3^j)^3).
(End)

Extensions

Edited and extended by Robert G. Wilson v, Dec 14 2002
Crossrefs added by Hieronymus Fischer, Jun 06 2012

A084544 Alternate number system in base 4.

Original entry on oeis.org

1, 2, 3, 4, 11, 12, 13, 14, 21, 22, 23, 24, 31, 32, 33, 34, 41, 42, 43, 44, 111, 112, 113, 114, 121, 122, 123, 124, 131, 132, 133, 134, 141, 142, 143, 144, 211, 212, 213, 214, 221, 222, 223, 224, 231, 232, 233, 234, 241, 242, 243, 244, 311, 312, 313, 314, 321
Offset: 1

Views

Author

Robert R. Forslund (forslund(AT)tbaytel.net), Jun 27 2003

Keywords

Examples

			From _Hieronymus Fischer_, Jun 06 2012: (Start)
a(100)  = 1144.
a(10^3) = 33214.
a(10^4) = 2123434.
a(10^5) = 114122134.
a(10^6) = 3243414334.
a(10^7) = 211421121334.
a(10^8) = 11331131343334.
a(10^9) = 323212224213334. (End)
		

Crossrefs

Programs

  • Python
    def A084544(n):
        m = (3*n+1).bit_length()-1>>1
        return int(''.join((str(((3*n+1-(1<<(m<<1)))//(3<<((m-1-j)<<1))&3)+1) for j in range(m)))) # Chai Wah Wu, Feb 08 2023

Formula

From Hieronymus Fischer, Jun 06 and Jun 08 2012: (Start)
The formulas are designed to calculate base-10 numbers only using the digits 1..4.
a(n) = Sum_{j=0..m-1} (1 + b(j) mod 4)*10^j,
where m = floor(log_4(3*n+1)), b(j) = floor((3*n+1-4^m)/(3*4^j)).
Special values:
a(k*(4^n-1)/3) = k*(10^n-1)/9, k = 1,2,3,4.
a((7*4^n-4)/3) = (13*10^n-4)/9 = 10^n + 4*(10^n-1)/9.
a((4^n-1)/3 - 1) = 4*(10^(n-1)-1)/9, n > 1.
Inequalities:
a(n) <= (10^log_4(3*n+1)-1)/9, equality holds for n=(4^k-1)/3, k>0.
a(n) > (4/10)*(10^log_4(3*n+1)-1)/9, n > 0.
Lower and upper limits:
lim inf a(n)/10^log_4(3*n) = 2/45, for n --> infinity.
lim sup a(n)/10^log_4(3*n) = 1/9, for n --> infinity.
G.f.: g(x) = (x^(1/3)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(4/3)*(1 - 5z(j)^4 + 4z(j)^5)/((1-z(j))(1-z(j)^4)), where z(j) = x^4^j.
Also: g(x) = (1/(1-x)) Sum_{j>=0} (1-5(x^4^j)^4 + 4(x^4^j)^5)*x^4^j*f_j(x)/(1-x^4^j), where f_j(x) = 10^j*x^((4^j-1)/3)/(1-(x^4^j)^4). The f_j obey the recurrence f_0(x) = 1/(1-x^4), f_(j+1)(x) = 10x*f_j(x^4).
Also: g(x) = (1/(1-x))* (h_(4,0)(x) + h_(4,1)(x) + h_(4,2)(x) + h_(4,3)(x) - 4*h_(4,4)(x)), where h_(4,k)(x) = Sum_{j>=0} 10^j*x^((4^(j+1)-1)/3) * (x^4^j)^k/(1-(x^4^j)^4).
(End)
a(n) = A045926(n) / 2. - Reinhard Zumkeller, Jan 01 2013

Extensions

Offset set to 1 according to A007931, A007932 by Hieronymus Fischer, Jun 06 2012

A084545 Alternate number system in base 5.

Original entry on oeis.org

1, 2, 3, 4, 5, 11, 12, 13, 14, 15, 21, 22, 23, 24, 25, 31, 32, 33, 34, 35, 41, 42, 43, 44, 45, 51, 52, 53, 54, 55, 111, 112, 113, 114, 115, 121, 122, 123, 124, 125, 131, 132, 133, 134, 135, 141, 142, 143, 144, 145, 151, 152, 153, 154, 155, 211, 212, 213, 214, 215, 221, 222
Offset: 1

Views

Author

Robert R. Forslund (forslund(AT)tbaytel.net), Jun 27 2003

Keywords

Examples

			From _Hieronymus Fischer_, Jun 06 2012: (Start)
a(100)  = 345.
a(10^3) = 12445.
a(10^4) = 254445.
a(10^5) = 11144445.
a(10^6) = 223444445.
a(10^7) = 4524444445.
a(10^8) = 145544444445.
a(10^9) = 3521444444445. (End)
		

Crossrefs

Programs

  • 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

Formula

From Hieronymus Fischer, Jun 06 and Jun 08 2012: (Start)
The formulas are designed to calculate base-10 numbers only using the digits 1..5.
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)).
a(k*(5^n-1)/4) = k*(10^n-1)/9, for k = 1,2,3,4,5.
a((9*5^n-5)/4) = (14*10^n-5)/9 = 10^n + 5*(10^n-1)/9.
a((5^n-1)/4 - 1) = 5*(10^(n-1)-1)/9, n>1.
a(n) <= (10^log_5(4*n+1)-1)/9, equality holds for n=(5^k-1)/4, k>0.
a(n) > (5/10)*(10^log_5(4*n+1)-1)/9, n>0.
lim inf a(n)/10^log_5(4*n) = 1/18, for n --> infinity.
lim sup a(n)/10^log_5(4*n) = 1/9, for n --> infinity.
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.
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).
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).
(End)

Extensions

Offset set to 1 according to A007931, A007932 and more terms added by Hieronymus Fischer, Jun 06 2012

A118950 Numbers containing at least one prime digit.

Original entry on oeis.org

2, 3, 5, 7, 12, 13, 15, 17, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 45, 47, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 65, 67, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 82, 83, 85, 87, 92, 93, 95, 97, 102, 103, 105, 107, 112
Offset: 1

Views

Author

Rick L. Shepherd, May 06 2006

Keywords

Comments

A193238(a(n)) > 0; complement of A084984; A092620, A092624 and A092625 are subsequences. - Reinhard Zumkeller, Jul 19 2011

Crossrefs

Programs

  • Haskell
    a118950 n = a118950_list !! (n-1)
    a118950_list = filter (any (`elem` "2357") . show ) [0..]
    -- Reinhard Zumkeller, Jul 19 2011
    
  • Mathematica
    Select[Range[150],AnyTrue[IntegerDigits[#],PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 19 2018 *)
  • PARI
    is(n)=!!#select(isprime, digits(n)) \\ Charles R Greathouse IV, Sep 15 2015

Formula

a(n) = n + O(n^k) with k = log 6/log 10 = 0.77815.... - Charles R Greathouse IV, Sep 15 2015

A062115 Numbers with no prime substring in their decimal expansion.

Original entry on oeis.org

0, 1, 4, 6, 8, 9, 10, 14, 16, 18, 40, 44, 46, 48, 49, 60, 64, 66, 68, 69, 80, 81, 84, 86, 88, 90, 91, 94, 96, 98, 99, 100, 104, 106, 108, 140, 144, 146, 148, 160, 164, 166, 168, 169, 180, 184, 186, 188, 400, 404, 406, 408, 440, 444, 446, 448, 460, 464, 466
Offset: 1

Views

Author

Erich Friedman, Jun 28 2001

Keywords

Comments

This is a 10-automatic sequence, a consequence of the finitude of A071062. - Charles R Greathouse IV, Sep 27 2011
Subsequence of A202259 (right-truncatable nonprimes). Supersequence of A202262 (composite numbers in which all substrings are composite), A202265 (nonprime numbers in which all substrings and reversal substrings are nonprimes). - Jaroslav Krizek, Jan 28 2012

Examples

			25 is not included because 5 is prime.
		

Crossrefs

Subsequence of A084984. [Arkadiusz Wesolowski, Jul 05 2011]
Cf. A071062.
Cf. A163753 (complement).

Programs

  • Haskell
    a062115 n = a062115_list !! (n-1)
    a062115_list = filter ((== 0) . a039997) a084984_list
    -- Reinhard Zumkeller, Jan 31 2012
    
  • Python
    from sympy import isprime
    def ok(n):
        s = str(n)
        ss = (int(s[i:j]) for i in range(len(s)) for j in range(i+1, len(s)+1))
        return not any(isprime(k) for k in ss)
    print([k for k in range(500) if ok(k)]) # Michael S. Branicky, May 02 2023
    
  • Python
    # faster for initial segment of sequence; uses ok, import above
    from itertools import chain, count, islice, product
    def agen(): # generator of terms
        yield from chain((0,), (int(t) for t in (f+"".join(r) for d in count(1) for f in "14689" for r in product("014689", repeat=d-1)) if ok(t)))
    print(list(islice(agen(), 100))) # Michael S. Branicky, May 02 2023

Formula

A039997(a(n)) = 0. - Reinhard Zumkeller, Jul 16 2007
From Charles R Greathouse IV, Mar 23 2010: (Start)
a(n) = O(n^(log_4 10)) = O(n^1.661) because numbers containing only 0,4,6,8 are in this sequence.
a(n) = Omega(n^(log_13637 1000000)) = Omega(n^1.451) for similar reasons; this bound can be increased by considering longer sequences of digits. (End)

Extensions

Offset corrected by Arkadiusz Wesolowski, Jul 27 2011

A029581 Numbers in which all digits are composite.

Original entry on oeis.org

4, 6, 8, 9, 44, 46, 48, 49, 64, 66, 68, 69, 84, 86, 88, 89, 94, 96, 98, 99, 444, 446, 448, 449, 464, 466, 468, 469, 484, 486, 488, 489, 494, 496, 498, 499, 644, 646, 648, 649, 664, 666, 668, 669, 684, 686, 688, 689, 694, 696, 698, 699, 844, 846, 848
Offset: 1

Views

Author

Keywords

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)=4,6,8,9 for k=1..4. - Hieronymus Fischer, May 30 2012

Examples

			From _Hieronymus Fischer_, May 30 2012: (Start)
a(1000) = 88649.
a(10^4) = 6468989
a(10^5) = 449466489. (End)
		

Crossrefs

Programs

  • Magma
    [n: n in [1..1000] | Set(Intseq(n)) subset [4, 6, 8, 9]]; // Vincenzo Librandi, Dec 17 2018
  • Mathematica
    Table[FromDigits/@Tuples[{4, 6, 8, 9}, n], {n, 3}] // Flatten (* Vincenzo Librandi, Dec 17 2018 *)

Formula

From Hieronymus Fischer, May 30 and Jun 25 2012: (Start)
a(n) = Sum_{j=0..m-1} (2*b(j) mod 8 + 4 + 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)).
Also: a(n) = Sum_{j=0..m-1} (A010877(2*b(j)) + 4 + A002265(b(j)) - A002265(b(j)+1))*10^j.
Special values:
a(1*(4^n-1)/3) = 4*(10^n-1)/9.
a(2*(4^n-1)/3) = 2*(10^n-1)/3.
a(3*(4^n-1)/3) = 8*(10^n-1)/9.
a(4*(4^n-1)/3) = 10^n-1.
a(n) < 4*(10^log_4(3*n+1)-1)/9, equality holds for n=(4^k-1)/3, k > 0.
a(n) < 4*A084544(n), equality holds iff all digits of A084544(n) are 1.
a(n) > 2*A084544(n).
Lower and upper limits:
lim inf a(n)/10^log_4(n) = 1/10*10^log_4(3) = 0.62127870, for n --> inf.
lim sup a(n)/10^log_4(n) = 4/9*10^log_4(3) = 2.756123868970, for n --> inf.
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)*(1-z(j))*(4 + 6z(j) + 8*z(j)^2 + 9*z(j)^3)/(1-z(j)^4), where z(j) = x^4^j.
Also: g(x) = (1/(1-x))*(4*h_(4,0)(x) + 2*h_(4,1)(x) + 2*h_(4,2)(x) + h_(4,3)(x) - 9*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.039691381254753739202528087006945643166147087095114911673083135126969046250... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024

Extensions

Offset corrected by Arkadiusz Wesolowski, Oct 03 2011

A092620 Numbers with exactly one prime digit.

Original entry on oeis.org

2, 3, 5, 7, 12, 13, 15, 17, 20, 21, 24, 26, 28, 29, 30, 31, 34, 36, 38, 39, 42, 43, 45, 47, 50, 51, 54, 56, 58, 59, 62, 63, 65, 67, 70, 71, 74, 76, 78, 79, 82, 83, 85, 87, 92, 93, 95, 97, 102, 103, 105, 107, 112, 113, 115, 117, 120, 121, 124, 126, 128, 129, 130, 131, 134
Offset: 1

Views

Author

Jani Melik, Apr 11 2004

Keywords

Comments

A193238(a(n))=1; subsequence of A118950. - Reinhard Zumkeller, Jul 19 2011

Examples

			12 has one prime digit, 2;
102 has one prime digit, 2.
		

Crossrefs

Subsequence of A118950.

Programs

  • Haskell
    import Data.List (elemIndices)
    a092620 n = a092620_list !! (n-1)
    a092620_list = elemIndices 1 a193238_list
    -- Reinhard Zumkeller, Jul 19 2011
  • Maple
    stev_sez:=proc(n) local i, tren, st, ans, anstren; ans:=[ ]: anstren:=[ ]: tren:=n: for i while (tren>0) do st:=round( 10*frac(tren/10) ): ans:=[ op(ans), st ]: tren:=trunc(tren/10): end do; for i from nops(ans) to 1 by -1 do anstren:=[ op(anstren), op(i,ans) ]; od; RETURN(anstren); end: ts_stpf:=proc(n) local i, stpf, ans; ans:=stev_sez(n): stpf:=0: for i from 1 to nops(ans) do if (isprime(op(i,ans))='true') then stpf:=stpf+1; # number of prime digits fi od; RETURN(stpf) end: ts_pr_n:=proc(n) local i, stpf, ans, ans1, tren; ans:=[ ]: stpf:=0: tren:=1: for i from 1 to n do if ( isprime(i)='true' and ts_stpf(i) =0) then ans:=[ op(ans), i ]: tren:=tren+1; fi od; RETURN(ans) end: ts_pr_n(300);
  • Mathematica
    Select[Range[150],Count[IntegerDigits[#],?(PrimeQ)]==1&] (* _Harvey P. Dale, Mar 23 2018 *)

Formula

There are 6^n*(n-1/6)*2/3 n-digit members of this sequence for n > 1. - Charles R Greathouse IV, Apr 23 2022

A085557 Numbers that have more prime digits than nonprime digits.

Original entry on oeis.org

2, 3, 5, 7, 22, 23, 25, 27, 32, 33, 35, 37, 52, 53, 55, 57, 72, 73, 75, 77, 122, 123, 125, 127, 132, 133, 135, 137, 152, 153, 155, 157, 172, 173, 175, 177, 202, 203, 205, 207, 212, 213, 215, 217, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232
Offset: 1

Views

Author

Jason Earls, Jul 04 2003

Keywords

Comments

Begins to differ from A046034 at the 21st term (which is the first 3-digit term).

Examples

			133 is in the sequence as the prime digits are 3 and 3 (those are two digits; counted with multiplicity) and one nonprime digit 1 and so there are more prime digits than nonprime digits. - _David A. Corneth_, Sep 06 2020
		

Crossrefs

Programs

  • PARI
    is(n) = my(d = digits(n), c = 0); for(i = 1, #d, if(isprime(d[i]), c++)); c<<1 > #d \\ David A. Corneth, Sep 06 2020
    
  • Python
    from itertools import count, islice
    def A085557_gen(startvalue=1): # generator of terms
        return filter(lambda n:len(s:=str(n))<(sum(1 for d in s if d in {'2','3','5','7'})<<1),count(max(startvalue,1)))
    A085557_list = list(islice(A085557_gen(),20)) # Chai Wah Wu, Feb 08 2023
Previous Showing 11-20 of 32 results. Next