|
|
A321393
|
|
a(n) is the number of bases b > 1 such that n + digitsum(n, base b) is prime.
|
|
2
|
|
|
1, 1, 2, 2, 1, 1, 1, 3, 2, 2, 2, 3, 4, 4, 5, 4, 2, 4, 2, 3, 4, 3, 2, 5, 6, 5, 5, 5, 4, 6, 5, 5, 6, 6, 6, 7, 8, 7, 6, 7, 5, 7, 6, 5, 8, 7, 5, 10, 8, 6, 9, 10, 6, 9, 12, 8, 10, 11, 8, 10, 10, 8, 9, 12, 7, 12, 10, 9, 11, 11, 9, 11, 11, 10, 13, 11, 9, 12, 10, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,3
|
|
COMMENTS
|
For any n > 1 and b > n, n + digitsum(n, base b) equals 2*n and is composite, hence the sequence is well defined.
The sequence is not defined for n = 1 as 1 + digitsum(1, base b) equals 2 and is prime for any base b > 1.
In the scatterplot of the sequence, the points are separated into two beams according to whether n is divisible by 3 or not, then these beams are separated in two according to whether n is divisible by 5 or not, then similarly according to whether n is divisible by 7 or not; these separations seem to continue for each odd prime number; see scatterplot in Links section.
|
|
LINKS
|
|
|
EXAMPLE
|
For n = 9, we have:
b 9 + sumdigits(9, base b)
---- ------------------------
2 11 (prime)
3 10
4 12
5 14
6 13 (prime)
7 12
8 11 (prime)
9 10
>=10 18
Hence, a(9) = 3.
|
|
PROG
|
(PARI) a(n) = sum(b=2, n, isprime(n + sumdigits(n, b)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|