login
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).
2
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,3
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).
FORMULA
a(n) = A321393(A000040(n)).
EXAMPLE
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.
PROG
(PARI) a(n) = my (p=prime(n)); sum(b=1, p\2, isprime(p+sumdigits(p, 2*b)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 08 2018
STATUS
approved