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.

A359113 a(n) counts the bases b in the interval 2 to p = prime(n), where p if written in base b gives again a prime number in base b if all digits are written in reverse order.

This page as a plain text file.
%I A359113 #40 Feb 13 2023 12:46:19
%S A359113 0,1,3,5,7,10,12,9,14,15,20,19,23,26,24,33,22,30,38,36,40,39,38,33,54,
%T A359113 49,43,52,37,60,65,53,59,57,50,52,85,52,79,76,57,77,69,103,90,83,84,
%U A359113 106,80,68,90,85,89,94,75,100,108,87,128,97,119,99,118,139,105,96
%N A359113 a(n) counts the bases b in the interval 2 to p = prime(n), where p if written in base b gives again a prime number in base b if all digits are written in reverse order.
%C A359113 Let p' be p with digit reversal in base b. If p' is composite then all multiplication operations c * d = p' in base b of integers c,d > 1 are using carry in long multiplication. For A000040(n) this is the case in A000040(n) - (a(n)+1) bases.
%C A359113 If a(n) is a record in this sequence, then A000040(n) is in A331486.
%C A359113 Prime indices of numbers in A228768 are also among the indices of the records in the rational number sequence a(n)/(n-1) with n > 1. See also the plot of this sequence in the link section.
%H A359113 Thomas Scheuerle, <a href="/A359113/b359113.txt">Table of n, a(n) for n = 1..4000</a>
%H A359113 Thomas Scheuerle, <a href="/A359113/a359113.png">Scatterplot a(n)/(n-1) for the first 2000 values</a>. Will this quotient remain inside the interval 1..2.5 for any n? For n = 2..2000 a mean value of approximately 1.65... (orange line in plot) was observed.
%H A359113 Rémy Sigrist, <a href="/A359113/a359113_1.png">Scatterplot of (n, b) such that the reversal of prime(n) in base b gives a prime number with n, b <= 2000 and 2 <= b <= prime(n)</a>
%F A359113 a(n) >= A135551(A000040(n)).
%e A359113 a(3) = 3:
%e A359113   prime(3) = 5 in bases 2..5:
%e A359113   5 = 101_2; reversing digits gives 101_2 = 5 (prime).
%e A359113   5 =  12_3; reversing digits gives  21_3 = 7 (prime).
%e A359113   5 =  11_4; reversing digits gives  11_4 = 5 (prime).
%e A359113   5 =  10_5; reversing digits gives  01_5 = 1 (nonprime).
%o A359113 (PARI) revprime(p, b)=my(q, t=p); while(t, q=b*q+t%b; t\=b); isprime(q)
%o A359113 a(n) = sum(b = 2, prime(n), revprime(prime(n), b))
%Y A359113 Cf. A000040, A007500, A002385, A135551, A228768, A331486.
%K A359113 nonn,base
%O A359113 1,3
%A A359113 _Thomas Scheuerle_, Jan 07 2023