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 61-62 of 62 results.

A382498 Smallest k such that the fractional part of 1/k is pandigital in base n.

Original entry on oeis.org

3, 5, 13, 7, 11, 11, 11, 43, 17, 13, 17, 19, 17, 19, 79, 23, 29, 23, 23, 23, 31, 47, 31, 73, 29, 29, 41, 41, 41, 47, 37, 43, 41, 37, 137, 59, 47, 47, 47, 47, 59, 47, 47, 47, 67, 59, 53, 241, 53, 53, 59, 71, 59, 59, 59, 67, 73, 61, 73, 67, 71, 67, 383, 71, 79
Offset: 2

Views

Author

Joshua Searle, Mar 29 2025

Keywords

Comments

It appears that for squarefree n, a(n) has a reptend of maximal length and for square n, a(n) has a reptend of half the maximal length.
Not every prime appears in this sequence - excluding 2, the first missing prime is 109.
The first composite term is a(81).
How many times can a term appear consecutively?
How does a(n) grow with n?

Examples

			a(10) = 17 because 1/17 = 0.(0588235294117647)... in base 10 where the brackets indicate the reptend. Every digit 0-9 appears within the reptend and is the smallest unit fraction where this is the case.
a(36) = 137 because 1/137 = 0.(09gjyy5s47cvj6khv9q0ix3xwbk8epr2d4zqjg11u7vsn4gtfi4q9zh2w23ofrla8xmv)... in base 36 where the digits 0-9 and letters a-z have been used as additional digits. Every character appears at least once.
		

Crossrefs

A382963 Prime index gaps between consecutive full reptend primes.

Original entry on oeis.org

3, 1, 1, 1, 5, 2, 1, 7, 4, 1, 2, 3, 4, 2, 1, 2, 4, 2, 1, 4, 1, 1, 8, 3, 5, 2, 1, 1, 4, 3, 5, 4, 1, 1, 1, 1, 3, 5, 1, 2, 6, 4, 2, 6, 1, 2, 3, 9, 1, 1, 5, 2, 4, 5, 1, 2, 2, 1, 1, 5, 1, 2, 3, 2, 1, 1, 1, 2, 1, 1, 5, 2, 1, 2, 3, 1, 1, 4, 5, 1, 1, 1, 4, 2, 2, 5, 1
Offset: 1

Views

Author

Kyle Wyonch, Apr 10 2025

Keywords

Comments

This sequence gives the number of primes between consecutive full reptend primes, where a full reptend prime is a prime p for which 10 is a primitive root modulo p.

Examples

			The full reptend primes begin 7 (index 4), 17 (index 7), 19 (index 8), 23 (index 9). Then:
a(1) = 7 - 4 = 3,
a(2) = 8 - 7 = 1,
a(3) = 9 - 8 = 1.
		

Crossrefs

Partial differences of A060257.

Programs

  • Python
    from sympy import isprime, primerange, primepi
    def is_full_reptend_prime(p):
      if not isprime(p): return False
      k, mod = 1, 10 % p
      while mod != 1:
        mod = (mod * 10) % p
        k += 1
        if k >= p: return False
      return k == p - 1
    primes = list(primerange(2, 1000))
    reptends = [p for p in primes if is_full_reptend_prime(p)]
    gaps = [primepi(reptends[i+1]) - primepi(reptends[i]) for i in range(len(reptends)-1)]
    print(gaps)
    
  • Python
    from sympy import nextprime, n_order
    def A382963_gen(): # generator of terms
        p, c = 7, 0
        while True:
            p, c = nextprime(p), c+1
            if n_order(10, p)==p-1:
                yield c
                c = 0
    A382963_list = list(islice(A382963_gen(),87)) # Chai Wah Wu, Apr 10 2025

Formula

a(n) = pi(r(n+1)) - pi(r(n)), where r(n) is the n-th full reptend prime and pi(p) gives the prime index of p.
a(n) = A060257(n+1) - A060257(n).
Previous Showing 61-62 of 62 results.