login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007488 Primes whose reversal is a square.
(Formerly M5321)
26
61, 163, 487, 691, 1297, 1861, 4201, 4441, 4483, 5209, 5227, 9049, 9631, 12391, 14437, 16141, 16987, 61483, 63211, 65707, 65899, 67057, 69481, 92767, 94273, 96979, 106303, 108061, 123031, 123373, 125329, 127291, 129643, 142771, 146857, 148249, 165901 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

For prime reversals that are cubes, 4th powers, 5th powers see A057699, A058996, A059000. - R. J. Mathar, Nov 13 2007

REFERENCES

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

C. W. Trigg, Primes with Reverses That Are Powers, J. Rec. Math., 17 (1985), 172-176.

LINKS

T. D. Noe, Table of n, a(n) for n = 1..1000

MAPLE

revdigs:= proc(n)

local L, nL, j;

L:= convert(n, base, 10);

nL:= nops(L);

add(L[i]*10^(nL-i), i=1..nL);

end:

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

MATHEMATICA

Select[ Range[ 10^6 ], PrimeQ[ # ] && IntegerQ[ Sqrt[ ToExpression[ StringReverse[ ToString[ # ] ] ] ] ] & ]

Select[Prime[Range[16000]], IntegerQ[Sqrt[FromDigits[Reverse[ IntegerDigits[#]]]]]&] (* Harvey P. Dale, Jul 19 2011 *)

PROG

(Python)

from gmpy2 import is_square

from sympy import prime

A007488 = [prime(n) for n in xrange(1, 10**6) if is_square(int(str(prime(n))[::-1]))] # Chai Wah Wu, Aug 14 2014

(PARI) is(n)=isprime(n) && issquare(fromdigits(Vecrev(digits(n)))) \\ Charles R Greathouse IV, Feb 06 2017

CROSSREFS

Cf. A059007, A068989. See A132388 for another version.

Sequence in context: A161853 A106096 A142482 * A142538 A057216 A139993

Adjacent sequences:  A007485 A007486 A007487 * A007489 A007490 A007491

KEYWORD

base,nonn,nice

AUTHOR

N. J. A. Sloane, Robert G. Wilson v

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified August 23 01:14 EDT 2017. Contains 290953 sequences.