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.
%I A007488 M5321 #66 Jul 15 2025 11:35:58 %S A007488 61,163,487,691,1297,1861,4201,4441,4483,5209,5227,9049,9631,12391, %T A007488 14437,16141,16987,61483,63211,65707,65899,67057,69481,92767,94273, %U A007488 96979,106303,108061,123031,123373,125329,127291,129643,142771,146857,148249,165901 %N A007488 Primes whose reversal is a square. %C A007488 Number of terms less than 10^k: 0, 0, 1, 4, 13, 26, 74, 213, 615, 1773, 5000, 14356, 41474, 120186, 352310, 1035235, ... - _Muniru A Asiru_, Jan 19 2018 and _David A. Corneth_, Jan 12 2019 %D A007488 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %D A007488 James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 113. %D A007488 Charles W. Trigg, Primes with Reverses That Are Powers, J. Rec. Math., 17 (1985), 172-176. %H A007488 David A. Corneth, <a href="/A007488/b007488.txt">Table of n, a(n) for n = 1..14356</a> (terms 1..1000 from T. D. Noe, terms 1001..1773 from Marius A. Burtea) %e A007488 61 is in the sequence because 16 = 4^2. %e A007488 163 is in the sequence because 361 = 19^2. %e A007488 167 is not in the sequence because 761 is also prime, not a square. %p A007488 revdigs:= proc(n) %p A007488 local L,nL,j; %p A007488 L:= convert(n,base,10); %p A007488 nL:= nops(L); %p A007488 add(L[i]*10^(nL-i),i=1..nL); %p A007488 end: %p A007488 map(proc(i) local r; r:= revdigs(i^2); if isprime(r) then r else NULL fi end proc, {$1..9999}); # _Robert Israel_, Aug 14 2014 %t A007488 Select[Prime[Range[16000]], IntegerQ[Sqrt[ToExpression[StringReverse[ToString[#]]]]] &] %t A007488 Select[Prime[Range[16000]], IntegerQ[Sqrt[FromDigits[ Reverse[ IntegerDigits[ #]]]]] &] (* _Harvey P. Dale_, Jul 19 2011 *) %t A007488 Select[Prime@ Range[10^5], IntegerQ@ Sqrt@ IntegerReverse@ # &] (* _Michael De Vlieger_, Jan 20 2018 *) %o A007488 (Python) %o A007488 from gmpy2 import is_square %o A007488 from sympy import prime %o A007488 A007488 = [prime(n) for n in range(1,10**6) if is_square(int(str(prime(n))[::-1]))] # _Chai Wah Wu_, Aug 14 2014 %o A007488 (PARI) is(n)=isprime(n) && issquare(fromdigits(Vecrev(digits(n)))) \\ _Charles R Greathouse IV_, Feb 06 2017 %o A007488 (PARI) uptoQdigits(n) = {my(res=List(), i2); for(i=4, sqrtint(10^n), i2 = i^2; if(i%10!=0 && gcd(10, i2 \ (10^logint(i2, 10))) == 1, c=fromdigits(Vecrev(digits(i2))); if(isprime(c), listput(res,c) ) ) ); listsort(res); res } \\ _David A. Corneth_, Jan 12 2019 %o A007488 (Magma) [p: p in PrimesUpTo(150000)|IsSquare(Seqint(Reverse(Intseq(p))))];// _Marius A. Burtea_, Jan 12 2019 %Y A007488 Cf. A059007, A068989. See A132388 for another version. %Y A007488 Primes whose reversal is a k-th power: A057699 (k=3), A058996 (k=4), A059000 (k=5), A059001 (k=6), A059002 (k=7), A059003 (k=8), A350363 (k=9), A059005 (k=10). %K A007488 base,nonn,nice %O A007488 1,1 %A A007488 _N. J. A. Sloane_, _Robert G. Wilson v_