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.

Original entry on oeis.org

5, 31, 37, 41, 53, 103, 197, 263, 277, 337, 349, 353, 359, 373, 397, 401, 421, 431, 439, 547, 569, 587, 599, 857, 859, 863, 877, 883, 983, 1009, 1013, 1039, 1069, 1091, 1097, 1103, 1117, 1129, 1153, 1171, 1193, 1213, 1223, 1237, 1249, 1279, 1291, 1301, 1367, 1811, 1871, 1931, 1979, 2647, 2663
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jul 13 2022

Keywords

Comments

Primes p such that A013636(p) is in A095179.

Examples

			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.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    P:= [seq(ithprime(i),i=1..1000)]:
    P[select(i -> isprime(revdigs(P[i]*P[i+1])), [$1..999])];
  • Mathematica
    a354881[n_] := Select[Map[Prime, Range[n]], PrimeQ[FromDigits[Reverse[IntegerDigits[# NextPrime[#]]]]]&]
    a354881[390] (* Hartmut F. W. Hoft, Jul 20 2022 *)
    Select[Partition[Prime[Range[400]],2,1],PrimeQ[IntegerReverse[Times@@#]]&][[;;,1]] (* Harvey P. Dale, Feb 10 2024 *)