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.

Showing 1-1 of 1 results.

A321392 a(n) is the number of bases b > 1 such that prime(n) + digitsum(prime(n), base b) is prime (where prime(n) denotes the n-th prime number).

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 4, 4, 3, 5, 6, 7, 7, 7, 7, 10, 11, 10, 12, 11, 11, 12, 11, 13, 16, 14, 13, 10, 14, 13, 21, 19, 19, 17, 20, 21, 24, 26, 25, 25, 25, 23, 26, 26, 24, 26, 29, 33, 27, 30, 31, 28, 32, 33, 32, 34, 34, 34, 32, 31, 34, 37, 37, 41, 36, 38, 41, 44, 45
Offset: 1

Views

Author

Rémy Sigrist, Nov 08 2018

Keywords

Comments

For any prime number p and base b > p, p + digitsum(p, base b) equals twice p and is not prime, hence the sequence is well defined.
For prime(n) + digitsum(prime(n), base b) to be prime, b must be even (see A320866).

Examples

			For n = 6, we have prime(6) = 13 and:
  b     13 + sumdigits(13, base b)
  ----  --------------------------
     2  16
     4  17 (prime)
     6  16
     8  19 (prime)
    10  17 (prime)
    12  15
  >=14  26
Hence, a(6) = 3.
		

Crossrefs

Programs

  • PARI
    a(n) = my (p=prime(n)); sum(b=1, p\2, isprime(p+sumdigits(p, 2*b)))

Formula

a(n) = A321393(A000040(n)).
Showing 1-1 of 1 results.