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-16 of 16 results.

A090537 Least n-digit prime using digit 3 once and rest all 1, or 0 if no such prime exists.

Original entry on oeis.org

3, 13, 113, 0, 11113, 113111, 0, 11111131, 111111113, 0, 11111111113, 111113111111, 0, 31111111111111, 0, 0, 11111111113111111, 111111111111111131, 0, 11111111111111111131, 131111111111111111111, 0, 11111111111111111311111
Offset: 1

Views

Author

Amarnath Murthy, Dec 08 2003

Keywords

Crossrefs

Without zeros, subsequence of A107689.

Programs

  • Python
    from sympy import isprime
    def agen():
      digits = 0
      while True:
        for i in range(digits+1):
          t = int("1"*(digits-i) + "3" + "1"*i)
          if isprime(t): yield t; break
        else: yield 0
        digits += 1
    g = agen()
    print([next(g) for i in range(23)]) # Michael S. Branicky, Mar 13 2021

Formula

a(3n+1) = 0.

Extensions

More terms from David Wasserman, Jan 03 2006

A179302 Indices of primes occurring in A034050.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 11, 12, 18, 19, 20, 29, 30, 31, 32, 36, 37, 39, 43, 55, 56, 61, 62, 65, 72, 77, 104, 142, 154, 169, 191, 197, 200, 229, 258, 267, 276, 375, 407, 408, 411, 412, 437, 440, 456, 539, 597, 607, 621, 629, 653, 660, 663, 724, 742, 743, 759, 760, 768
Offset: 0

Views

Author

Dmitry Kamenetsky, Jul 10 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Position[Sort[Flatten[Table[FromDigits/@Permutations[Join[{3},PadRight[{},n,1]]],{n,0,50}]]],?PrimeQ]]-1 (* _Harvey P. Dale, Jul 16 2012 *)

A135048 Indices of primes with digit product = 3.

Original entry on oeis.org

2, 6, 11, 30, 32, 64, 1346, 1349, 1367, 10715, 12253, 26886, 733412, 733420, 733533, 734596, 6363182, 6363183, 6363289, 7437658, 503193257, 503193259, 503279746, 504057767, 1346029458, 4555878955, 12238593622, 1035905650780, 309353882444942, 2907021742443975
Offset: 1

Views

Author

Zak Seidov, Feb 11 2008

Keywords

Comments

The corresponding primes are in A107689.

Crossrefs

Formula

a(n) = primepi(A107689(n)).

Extensions

a(26)-a(30) from Amiram Eldar, Sep 06 2024

A199982 Composite numbers with digital product = 3.

Original entry on oeis.org

1113, 1131, 1311, 3111, 13111, 31111, 111113, 111131, 111311, 1111113, 1111131, 1111311, 1113111, 1131111, 1311111, 3111111, 11111113, 11311111, 13111111, 31111111, 111111311, 111131111, 111311111, 113111111, 311111111, 1111111113, 1111111131, 1111111311
Offset: 1

Views

Author

Jaroslav Krizek, Nov 13 2011

Keywords

Comments

Also composite numbers whose multiplicative digital root is 3. Complement of A107689 with respect to A034050.

Crossrefs

Cf. A107689 (primes with digital product = 3).
Cf. A034050 (numbers with digital product = 3).

Programs

  • Mathematica
    Table[Select[FromDigits[Permutations[PadRight[{3},n,1]]],CompositeQ],{n,4,10}]//Flatten//Sort (* Harvey P. Dale, May 31 2025 *)

Extensions

Incorrect 111113111 removed by Sean A. Irvine, Jan 06 2025

A342221 Integers k, not congruent to 1 mod 3, such that there is no prime of length k using digit 3 once and rest all 1.

Original entry on oeis.org

15, 26, 32, 41, 68, 93, 99, 113, 116, 119, 134, 150, 158, 161, 170, 173, 176, 177, 179, 204, 213, 252, 257, 266, 284, 299, 305, 312, 320, 333, 353, 357, 374, 392, 402, 404, 419, 434, 443, 450, 491, 495, 506, 509, 513, 518, 527, 548, 551, 554, 570, 582, 584, 593
Offset: 1

Views

Author

Michel Marcus, Mar 14 2021

Keywords

Comments

The "not congruent to 1 mod 3" condition is due to the fact that A090537(3*k+1) = 0.

Crossrefs

Subsequence of A007494.

Programs

  • Python
    from sympy import isprime
    A342221_list = []
    for k in range(1,10**3):
        if k % 3 != 1:
            m, l = (10**k-1)//9, 2
            for i in range(k):
                if isprime(m+l):
                    break
                l *= 10
            else:
                A342221_list.append(k) # Chai Wah Wu, Mar 15 2021

Extensions

More terms from Chai Wah Wu, Mar 15 2021

A346275 Number of n-digit primes with digital product = 3.

Original entry on oeis.org

1, 2, 3, 0, 3, 3, 0, 4, 4, 0, 5, 2, 0, 1, 0, 0, 1, 2, 0, 3, 1, 0, 2, 1, 0, 0, 1, 0, 4, 3, 0, 0, 1, 0, 4, 3, 0, 1, 6, 0, 0, 4, 0, 2, 1, 0, 2, 6, 0, 2, 2, 0, 5, 3, 0, 4, 3, 0, 3, 1, 0, 1, 3, 0, 1, 4, 0, 0, 2, 0, 3, 4, 0, 4, 1, 0, 2, 4, 0, 3, 2, 0, 1, 6, 0, 2, 3, 0, 3, 4, 0
Offset: 1

Views

Author

Bernard Schott, Jul 13 2021

Keywords

Comments

Equivalently: Number of n-digit terms of A107689 that are primes.
This sequence is similar to A346274 where digital product = 7.
a(n) = n if n = 1 or n = 2 or n = 3.
Conjecture: for n >= 4, there is at least one composite number among the n-digit numbers with digital product = 3 <==> a(n) < n for n >= 4 (guess proposed by Derek Holton in reference).
Also a(n) = 0 for n = 15, 26, 32, 68, ...

Examples

			3 is prime, hence a(1) = 1.
13 and 31 are primes, hence a(2) = 2.
11113, 11131, 11311 are primes, but 13111 =  7*1873 and 31111 = 53*587, hence a(5) = 3.
		

References

  • Derek Holton, A Second Step to Mathematical Olympiad Problems, Vol. 7, Mathematical Olympiad Series, World Scientific, 2011, Section 8.14 - 69, page 287.

Crossrefs

Programs

  • Mathematica
    a[n_] := Count[(10^n - 1)/9 + 2*10^Range[0, n - 1], ?PrimeQ]; Array[a, 100] (* _Amiram Eldar, Jul 13 2021 *)
  • Python
    from sympy import isprime
    def a(n): return sum(isprime(int('1'*(n-1-i)+'3'+'1'*i)) for i in range(n))
    print([a(n) for n in range(1, 92)]) # Michael S. Branicky, Jul 13 2021

Formula

a(3*k+1) = 0 for k > 0.
Previous Showing 11-16 of 16 results.