login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the smallest prime number p > n, not yet in the sequence, such that p is a palindrome when written in base n.
1

%I #15 Jul 03 2020 02:37:57

%S 3,13,5,31,7,71,73,109,11,199,157,313,197,241,17,307,19,419,401,463,

%T 23,599,577,701,677,757,29,929,991,1117,1153,1123,1259,1471,37,1481,

%U 1483,1873,41,1723,43,1979,2069,2161,47,2351,2593,2549,2551,2857,53,2969,2917,3191,3137

%N a(n) is the smallest prime number p > n, not yet in the sequence, such that p is a palindrome when written in base n.

%C Using a representation where the digits of the prime are written between "[" and "]_" separated by commas with the base following the "_" then by checking up to a base of 7000 (where the lowest prime palindrome is [1, 1]_7000):

%C 1) Either the palindrome is [1, 1]_n where n is one less than a prime number, or [1, X, 1]_n where X << n, asymptotically.

%C 2) A conjecture: No lowest primes need more than three digits.

%C 3) The terms a(12) and a(30) differ from the similar sequence A331806 as these terms in A331806 are the same as the earlier terms a(3) and a(5).

%H Chai Wah Wu, <a href="/A331807/b331807.txt">Table of n, a(n) for n = 2..10000</a>

%e a(2)=3 which is 11 in binary, a(3)=13 which is 111 in ternary, a(4)=5 which is 11 in quaternary, a(16)=17 which is 11 in hexadecimal.

%e If we use the representation described earlier, then:

%e a(2) = 3 is [1, 1]_2,

%e a(3) = 13 is [1, 1, 1]_3,

%e a(4) = 5 is [1, 1]_4,

%e a(11) = 199 is [1, 7, 1]_11,

%e a(13) = 313 is [1, 11, 1]_13,

%e a(16) = 17 is [1, 1]_16,

%e a(48) = 2593 is [1, 6, 1]_48.

%t Array[Block[{p = Prime[PrimePi[#] + 1]}, While[! PalindromeQ@ IntegerDigits[p, #], p = NextPrime@ p]; p] &, 55, 2] (* _Michael De Vlieger_, Feb 25 2020 *)

%Y A331806 is a similar sequence where repeated terms are allowed.

%Y Cf. A006093 (prime(n) - 1).

%K nonn,base,easy

%O 2,1

%A _Colin M Ready_, Feb 22 2020