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 21-23 of 23 results.

A346203 a(n) is the smallest nonnegative number k such that the decimal expansion of the product of the first k primes contains the string n.

Original entry on oeis.org

3, 0, 1, 3, 10, 7, 2, 9, 9, 8, 4, 18, 17, 11, 15, 16, 14, 18, 24, 16, 11, 4, 9, 5, 21, 13, 13, 13, 9, 21, 3, 5, 10, 14, 12, 13, 26, 24, 12, 17, 18, 15, 12, 26, 16, 22, 10, 16, 12, 11, 13, 7, 13, 20, 17, 19, 11, 20, 15, 18, 11, 14, 21, 13, 10, 24, 20, 14, 21, 8, 9
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 10 2021

Keywords

Examples

			a(5) = 7 since 5 occurs in prime(7)# = 2 * 3 * 5 * 7 * 11 * 13 * 17 = 510510, but not in prime(0)#, prime(1)#, prime(2)#, ..., prime(6)#.
		

Crossrefs

Programs

  • Mathematica
    primorial[n_] := Product[Prime[j], {j, 1, n}]; a[n_] := (k = 0; While[! MatchQ[IntegerDigits[primorial[k]], {_, Sequence @@ IntegerDigits[n], _}], k++]; k); Table[a[n], {n, 0, 70}]
  • PARI
    a(n) = my(k=0, p=1, q=1, sn=Str(n)); while (#strsplit(Str(q), sn)==1, k++; p=nextprime(p+1); q*=p); k; \\ Michel Marcus, Jul 13 2021; corrected Jun 15 2022
  • Python
    from sympy import nextprime
    def A346203(n):
        m, k, p, s = 1, 0, 1, str(n)
        while s not in str(m):
            k += 1
            p = nextprime(p)
            m *= p
        return k # Chai Wah Wu, Jul 12 2021
    

A381099 a(n) is the smallest prime number that contains Fibonacci(n) as a substring.

Original entry on oeis.org

101, 11, 11, 2, 3, 5, 83, 13, 211, 347, 557, 89, 1447, 233, 2377, 6101, 1987, 1597, 25841, 24181, 67651, 109469, 177113, 28657, 2463683, 1750253, 1213931, 1964189, 2317811, 514229, 8320409, 13462693, 22178309, 35245781, 135702887, 192274651, 149303521
Offset: 0

Views

Author

Gonzalo Martínez, Feb 13 2025

Keywords

Comments

If Fibonacci(n) is itself prime (n in A001605), then a(n) = Fibonacci(n).

Examples

			For n = 6, since Fibonacci(6) = 8, the smallest prime that contains 8 as a substring is 83, so a(6) = 83.
		

Crossrefs

Formula

a(n) = A062584(A000045(n)).

A382392 a(n) is the least prime number whose factorial base expansion contains the digit n.

Original entry on oeis.org

2, 2, 5, 19, 97, 601, 4327, 35281, 322571, 3265949, 36288017, 439084817, 5748019201, 80951270459, 1220496076831, 19615115520037, 334764638208037, 6046686277632071, 115242726703104073, 2311256907767808001, 48658040163532800037, 1072909785605898240031
Offset: 0

Views

Author

Rémy Sigrist, Mar 23 2025

Keywords

Comments

This sequence is well defined: a(0) = a(1) = 2, and for n > 1, (n+1)! and n*n! + 1 are coprime, so by Dirichlet's theorem on arithmetic progressions, there exists a prime number p of the form k*(n+1)! + n*n! + 1 for some k >= 0, and the factorial base expansion of this prime number contains the digit n, hence a(n) <= p.

Examples

			The initial terms, in decimal and in factorial base, are:
  n  a(n)     fact(a(n))
  -  -------  -----------------
  0        2  1,0
  1        2  1,0
  2        5  2,1
  3       19  3,0,1
  4       97  4,0,0,1
  5      601  5,0,0,0,1
  6     4327  6,0,0,1,0,1
  7    35281  7,0,0,0,0,0,1
  8   322571  8,0,0,0,0,1,2,1
  9  3265949  9,0,0,0,0,1,0,2,1
		

Crossrefs

Programs

  • PARI
    a(n) = { forprime (p = n*n!, oo, my (q = p); for (r = 2, oo, if (q==0, break, q % r==n, return (p), q \= r););); }

Formula

a(n) > A001563(n).
Previous Showing 21-23 of 23 results.