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).
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Colored scatterplot of (n, b) such that prime(n) + sumdigits(prime(n), base 2*b) is prime and 1 <= n <= 2000 and 1 <= b <= 1000 (where the color is function of floor(prime(n) / (2*b)))
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