login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Cf. A321392.
Sequence in context: A175685 A331182 A182591 * A058914 A238585 A123682
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 08 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)