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.

A095179 Numbers whose reversed digit representation is prime.

This page as a plain text file.
%I A095179 #45 May 08 2023 09:33:48
%S A095179 2,3,5,7,11,13,14,16,17,20,30,31,32,34,35,37,38,50,70,71,73,74,76,79,
%T A095179 91,92,95,97,98,101,104,106,107,110,112,113,118,119,124,125,128,130,
%U A095179 131,133,134,136,140,142,145,146,149,151,152,157,160,164,166,167,170,172
%N A095179 Numbers whose reversed digit representation is prime.
%C A095179 If m is a term, then 10*m is another term. - _Bernard Schott_, Nov 20 2021
%H A095179 Michael S. Branicky, <a href="/A095179/b095179.txt">Table of n, a(n) for n = 1..11018</a> (all terms < 10**5)
%e A095179 The number 70 in reverse is 07 = 7, which is prime.
%p A095179 q:= n-> (s-> isprime(parse(cat(s[-i]$i=1..length(s)))))(""||n):
%p A095179 select(q, [$1..200])[];  # _Alois P. Heinz_, Aug 22 2021
%t A095179 Select[Range[200], PrimeQ[FromDigits[Reverse[IntegerDigits[#]]]] &] (* _Harvey P. Dale_, Jun 13 2013 *)
%o A095179 (PARI) r(n) = for(x=1,n,y=eval(rev(x));if(isprime(y),print1(x","))) \ Get the reverse of the input string rev(str) = { local(tmp,j,s); tmp = Vec(Str(str)); s=""; forstep(j=length(tmp),1,-1, s=concat(s,tmp[j])); return(s) }
%o A095179 (PARI) is_A095179(n)=isprime(eval(Strchr(vecextract(Vec(Vecsmall(Str(n))),"-1..1")))) \\ _M. F. Hasler_, Jan 13 2012
%o A095179 (PARI) isok(n) = isprime(fromdigits(Vecrev(digits(n)))); \\ _Michel Marcus_, Aug 22 2021
%o A095179 (Python)
%o A095179 from sympy import isprime
%o A095179 def ok(n): return isprime(int(str(n)[::-1]))
%o A095179 print(list(filter(ok, range(1, 173)))) # _Michael S. Branicky_, Aug 22 2021
%Y A095179 Cf. A004086, A007500 (primes in this sequence), A076055 (composites in this sequence), A204232 (base-2 analog), A097312.
%K A095179 base,easy,nonn
%O A095179 1,1
%A A095179 _Cino Hilliard_, Jun 21 2004
%E A095179 Offset corrected to 1 by _Alonso del Arte_, Apr 12 2020