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.

A354881 Primes p such that, if q is the next prime, the digit reversal of p*q is prime.

This page as a plain text file.
%I A354881 #38 Feb 10 2024 14:09:04
%S A354881 5,31,37,41,53,103,197,263,277,337,349,353,359,373,397,401,421,431,
%T A354881 439,547,569,587,599,857,859,863,877,883,983,1009,1013,1039,1069,1091,
%U A354881 1097,1103,1117,1129,1153,1171,1193,1213,1223,1237,1249,1279,1291,1301,1367,1811,1871,1931,1979,2647,2663
%N A354881 Primes p such that, if q is the next prime, the digit reversal of p*q is prime.
%C A354881 Primes p such that A013636(p) is in A095179.
%H A354881 Robert Israel, <a href="/A354881/b354881.txt">Table of n, a(n) for n = 1..10000</a>
%e A354881 a(3) = 37 is a term because 37 is prime, the next prime is 41, 37*41 = 1517 and its digit reversal 7151 is prime.
%p A354881 revdigs:= proc(n) local L,i;
%p A354881   L:= convert(n,base,10);
%p A354881   add(L[-i]*10^(i-1),i=1..nops(L))
%p A354881 end proc:
%p A354881 P:= [seq(ithprime(i),i=1..1000)]:
%p A354881 P[select(i -> isprime(revdigs(P[i]*P[i+1])), [$1..999])];
%t A354881 a354881[n_] := Select[Map[Prime, Range[n]], PrimeQ[FromDigits[Reverse[IntegerDigits[# NextPrime[#]]]]]&]
%t A354881 a354881[390] (* _Hartmut F. W. Hoft_, Jul 20 2022 *)
%t A354881 Select[Partition[Prime[Range[400]],2,1],PrimeQ[IntegerReverse[Times@@#]]&][[;;,1]] (* _Harvey P. Dale_, Feb 10 2024 *)
%Y A354881 Cf. A013636, A004086, A095179.
%K A354881 nonn,base
%O A354881 1,1
%A A354881 _J. M. Bergot_ and _Robert Israel_, Jul 13 2022