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-4 of 4 results.

A059007 Numbers m such that m^2 reversed is a prime.

Original entry on oeis.org

4, 14, 19, 28, 32, 37, 38, 40, 41, 62, 85, 89, 95, 97, 106, 119, 136, 139, 140, 190, 193, 196, 266, 271, 274, 277, 280, 281, 313, 316, 320, 325, 328, 331, 334, 335, 353, 355, 361, 362, 370, 373, 377, 380, 383, 397, 398, 400, 401, 403, 410, 412, 421, 434, 439
Offset: 1

Views

Author

Robert G. Wilson v, Jan 16 2001

Keywords

Examples

			28 is in the sequence because the reverse of 28^2 is 487 which is a prime. - _Indranil Ghosh_, Feb 10 2017
		

Crossrefs

Cf. A007488.
Numbers m such that m^k reversed is a prime: A059008 (k=3), A059205 (k=4), A059206 (k=5), A059207 (k=6), A059208 (k=7), A059209 (k=8), A059210 (k=9), A059211 (k=10), A059212 (k=11), A059213 (k=12).

Programs

  • Magma
    [n: n in [1..500] | IsPrime(Seqint(Reverse(Intseq(n^2))))]; // Marius A. Burtea, Jan 12 2019
    
  • Mathematica
    Select[ Range[ 1000 ], PrimeQ[ ToExpression[ StringReverse[ ToString[ #^2 ] ] ] ] & ]
    Select[Range[500],PrimeQ[IntegerReverse[#^2]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 10 2019 *)
  • PARI
    isok(n) = isprime(fromdigits(Vecrev(digits(n^2)))); \\ Michel Marcus, Jan 12 2019

A059696 Primes p such that p^3 reversed is also prime.

Original entry on oeis.org

5, 89, 157, 211, 251, 271, 463, 467, 487, 491, 499, 503, 521, 523, 541, 547, 563, 571, 701, 1069, 1091, 1103, 1129, 1151, 1187, 1217, 1447, 1451, 1487, 1489, 1493, 1979, 1999, 2089, 2339, 2351, 2383, 2437, 2467, 2621, 2657, 2693, 3119, 3121, 3221, 3251
Offset: 1

Views

Author

Robert G. Wilson v, Feb 06 2001

Keywords

Crossrefs

Cf. A059008.

Programs

  • Magma
    [p: p in PrimesUpTo(3300) | IsPrime(Seqint(Reverse(Intseq(p^3))))]; // Vincenzo Librandi, Apr 11 2013
  • Mathematica
    Select[ Range[ 4000 ], PrimeQ[ # ] && PrimeQ[ ToExpression[ StringReverse[ ToString[ #^3 ] ] ] ] & ]

A232268 Numbers n such that reversal (n^3) plus 1 is prime.

Original entry on oeis.org

1, 3, 4, 6, 10, 19, 28, 30, 31, 40, 60, 63, 64, 66, 87, 88, 93, 96, 100, 129, 132, 135, 138, 141, 144, 184, 190, 274, 279, 280, 283, 285, 292, 294, 297, 300, 303, 310, 393, 399, 400, 402, 433, 436, 439, 589, 597, 598, 600, 612, 616, 621, 628, 630, 639, 640, 642
Offset: 1

Views

Author

K. D. Bajpai, Nov 22 2013

Keywords

Comments

If n is a multiple of 10, after reversal leading zeros are discarded before adding 1.

Examples

			a(3)= 4: 4^3= 64: reversing the digits gives 46: 46+1= 47 which is prime.
a(4)= 6: 6^3= 216: reversing the digits gives 612: 612+1= 613 which is prime.
a(12)= 63: 63^3= 250047: reversing the digits gives 740052: 740052+1= 740053 which is prime.
		

Crossrefs

Cf. A059008 (numbers n: n^3 reversed is prime).
Cf. A231756 (numbers n: reversal (n^2) plus 1 is prime).

Programs

  • Maple
    with(StringTools): KD:= proc() local a; a:= parse(Reverse(convert((n^3), string)))+1; if isprime(a) then RETURN (n): fi;end: seq(KD(), n=1..5000);
  • Mathematica
    Select[Range[500],PrimeQ[ToExpression[StringReverse[ToString[#^3]]] + 1] &]

A320909 Numbers k such that k^2 and k^3, when reversed, are prime.

Original entry on oeis.org

89, 271, 325, 328, 890, 1025, 1055, 1081, 1129, 1169, 1241, 2657, 2710, 3112, 3121, 3149, 3244, 3250, 3263, 3280, 3335, 3346, 3403, 4193, 4222, 4231, 4289, 4291, 5531, 5584, 5653, 5678, 5716, 5791, 5795, 5836, 5837, 8882, 8900, 8926, 8942, 9664, 9794, 9875
Offset: 1

Views

Author

Jesse Endo Jenks, Oct 23 2018

Keywords

Examples

			89 is a term since 89^2 = 7921 and 1297 is prime, and 89^3 = 704969 and 969407 is prime.
		

Crossrefs

Intersection of A059007 and A059008.

Programs

  • Mathematica
    Select[Range[10^4], AllTrue[IntegerReverse@ {#^2, #^3}, PrimeQ] &] (* Michael De Vlieger, Oct 23 2018 *)
  • PARI
    isok(n) = isprime(fromdigits(Vecrev(digits(n^2)))) && isprime(fromdigits(Vecrev(digits(n^3)))); \\ Michel Marcus, Oct 23 2018
    
  • Python
    from sympy import isprime
    A320909_list = [n for n in range(1,10**6) if isprime(int(str(n**2)[::-1])) and isprime(int(str(n**3)[::-1]))] # Chai Wah Wu, Jan 24 2019
Showing 1-4 of 4 results.