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.

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).

This page as a plain text file.
%I A321392 #15 Nov 12 2018 15:20:44
%S A321392 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,
%T A321392 14,13,21,19,19,17,20,21,24,26,25,25,25,23,26,26,24,26,29,33,27,30,31,
%U A321392 28,32,33,32,34,34,34,32,31,34,37,37,41,36,38,41,44,45
%N 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).
%C A321392 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.
%C A321392 For prime(n) + digitsum(prime(n), base b) to be prime, b must be even (see A320866).
%H A321392 Rémy Sigrist, <a href="/A321392/b321392.txt">Table of n, a(n) for n = 1..10000</a>
%H A321392 Rémy Sigrist, <a href="/A321392/a321392.png">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</a> (where the color is function of floor(prime(n) / (2*b)))
%F A321392 a(n) = A321393(A000040(n)).
%e A321392 For n = 6, we have prime(6) = 13 and:
%e A321392   b     13 + sumdigits(13, base b)
%e A321392   ----  --------------------------
%e A321392      2  16
%e A321392      4  17 (prime)
%e A321392      6  16
%e A321392      8  19 (prime)
%e A321392     10  17 (prime)
%e A321392     12  15
%e A321392   >=14  26
%e A321392 Hence, a(6) = 3.
%o A321392 (PARI) a(n) = my (p=prime(n)); sum(b=1, p\2, isprime(p+sumdigits(p, 2*b)))
%Y A321392 Cf. A000040, A243441, A320866, A321393.
%K A321392 nonn,base
%O A321392 1,3
%A A321392 _Rémy Sigrist_, Nov 08 2018