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.

Showing 1-2 of 2 results.

A098922 Reverse digits of largest primes, append to sequence if result is larger prime then previous one with reverse digits.

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 71, 73, 97, 101, 701, 941, 971, 991, 9001, 9601, 9721, 9931, 9941, 9967, 70001, 90001, 93001, 96001, 97001, 99401, 99611, 99721, 99881, 99923, 99989, 940001, 972001, 973001, 996001, 997001, 999101, 999331, 999431, 999631, 999931
Offset: 1

Views

Author

Jani Melik, Oct 18 2004

Keywords

Examples

			The prime 37 in reverse is 73. 73 is prime and is larger than previous prime (17), written with reverse digits 71.
		

Crossrefs

Programs

  • Maple
    obrni_stev:=proc(n) local i, tren, tren1, st, ans; ans:=[ ]: tren:=n: tren1:=0: for i while (tren>0) do st:=round( 10*frac(tren/10) ): ans:=[ op(ans), st ]: tren:=trunc(tren/10): od; for i from 0 to nops(ans)-1 do tren1:= tren1 + op(nops(ans)-i, ans)*10^(i); od: RETURN(tren1); end: ts_inv_prav_pra:= proc(n) local i, tren, ans; tren:=0: ans:=[ ]: for i from 1 to n do if ( isprime( i ) = 'true' and isprime( obrni_stev (i) )='true' and obrni_stev(i) > tren ) then ans:=[ op(ans),obrni_stev(i) ]; tren:=obrni_stev(i); fi: od: RETURN(ans); end: ts_inv_prav_pra(200000);

A321523 List of pairs: primes whose reversal is also prime, each followed by its reversal.

Original entry on oeis.org

2, 2, 3, 3, 5, 5, 7, 7, 11, 11, 13, 31, 17, 71, 31, 13, 37, 73, 71, 17, 73, 37, 79, 97, 97, 79, 101, 101, 107, 701, 113, 311, 131, 131, 149, 941, 151, 151, 157, 751, 167, 761, 179, 971, 181, 181, 191, 191, 199, 991, 311, 113, 313, 313, 337, 733, 347, 743, 353, 353
Offset: 1

Views

Author

Kritsada Moomuang, Nov 12 2018

Keywords

Examples

			The sequence begins:
     2,  2;
     3,  3;
     5,  5;
     7,  7;
    11, 11;
    13, 31;
    17, 71;
    31, 13;
    37, 73;
    71, 17;
...
107 has its reversal as 701.
971 has its reversal as 179.
		

Crossrefs

Subsequence of A135020.

Programs

  • Mathematica
    Flatten@ Table[ If[PrimeQ[r = IntegerReverse@ p], {p,r}, {}], {p, Prime@ Range@ 71}] (* Giovanni Resta, Nov 13 2018 *)
  • PARI
    forprime(p=1, 353, r=fromdigits(Vecrev(digits(p))); if (isprime(r), print1(p ", " r ", "))) \\ Rémy Sigrist, Nov 16 2018

Formula

a(2n-1) = A007500(n).
a(2n) = A004086(A007500(n)).
a(2n) = A095180(n). - Rémy Sigrist, Nov 16 2018
Showing 1-2 of 2 results.