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-10 of 25 results. Next

A132388 Same as A007488, but with the numbers arranged so that their reversals are in increasing order.

Original entry on oeis.org

61, 691, 163, 487, 4201, 9631, 4441, 1861, 4483, 5227, 1297, 5209, 9049, 63211, 16141, 69481, 12391, 94273, 61483, 65707, 14437, 67057, 92767, 16987, 96979, 65899, 526501, 485701, 165901, 655111, 522211, 906421, 520621, 123031, 440131, 921931, 921241
Offset: 1

Views

Author

N. J. A. Sloane, based on an email from Jeremy Gardiner, Nov 12 2007

Keywords

Crossrefs

Cf. A068989.

Programs

  • Maple
    read transforms: A132388ind := proc(n) option remember: local d,k: if(n=1)then return 4: fi: for k from procname(n-1)+1 do d:=digrev(k^2): if(length(k^2)=length(d) and isprime(digrev(k^2)))then return k: fi: od: end: A132388 := proc(n) return digrev(A132388ind(n)^2): end: seq(A132388(n),n=1..50); # Nathaniel Johnston, May 06 2011

Extensions

Better description from Zak Seidov, Nov 14 2007

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

A033294 Squares which when written backwards remain square (final 0's excluded).

Original entry on oeis.org

1, 4, 9, 121, 144, 169, 441, 484, 676, 961, 1089, 9801, 10201, 10404, 10609, 12321, 12544, 12769, 14641, 14884, 40401, 40804, 44521, 44944, 48841, 69696, 90601, 94249, 96721, 698896, 1002001, 1004004, 1006009, 1022121, 1024144, 1026169
Offset: 1

Views

Author

Keywords

Comments

Of this sequence's first 10000 terms, only nine have an even number of digits; see A354256.

Examples

			144 = 12 * 12 is a term because 441 = 21 * 21.
		

Crossrefs

Subsequence of A115690.

Programs

  • Haskell
    a033294 n = a033294_list !! (n-1)
    a033294_list = filter chi a000290_list where
      chi m = m `mod` 10 > 0 && head ds `elem` [1,4,5,6,9] &&
              a010052 (foldl (\v d -> 10 * v + d) 0 ds) == 1 where
        ds = unfoldr
             (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 10) m
    -- Reinhard Zumkeller, Jan 19 2012
    
  • Mathematica
    Select[Range[1100]^2,Mod[#,10]!=0&&IntegerQ[Sqrt[FromDigits[Reverse[ IntegerDigits[ #]]]]]&] (* Harvey P. Dale, Oct 28 2013 *)
  • Python
    from math import isqrt
    from itertools import count, islice
    def sqr(n): return isqrt(n)**2 == n
    def agen():
        yield from (k*k for k in count(1) if k%10 and sqr(int(str(k*k)[::-1])))
    print(list(islice(agen(), 36))) # Michael S. Branicky, May 21 2022

Extensions

More terms from Erich Friedman
Initial 0 removed and offset changed by Reinhard Zumkeller, Jan 19 2012

A057699 Primes whose reversal is a cube.

Original entry on oeis.org

521, 806041, 969407, 1393939, 2303461, 3989683, 4831037, 5783273, 8081153, 8485181, 11520991, 15231851, 23206301, 25578253, 29925251, 32296051, 48762541, 52182343, 57369149, 61277761, 67134511, 67954643, 74825299
Offset: 1

Views

Author

G. L. Honaker, Jr., Oct 23 2000

Keywords

Crossrefs

Cf. A000040, A007488, A272692 (first differences).

Programs

  • Mathematica
    Do[ If[ PrimeQ[ n ] && IntegerQ[ ToExpression[ StringReverse[ ToString[ n ] ] ]^(1/3) ], Print[ n ] ], {n, 1, 10^9} ]
  • PARI
    flip(n)=fromdigits(Vecrev(digits(n)))
    Set(select(isprime, vector(1000,n,flip(n^3)))) \\ Charles R Greathouse IV, Jun 07 2016
  • Python
    from sympy import isprime
    A057699_list = []
    for i in range(10**6):
        if i % 10:
            p = int(str(i**3)[::-1])
            if isprime(p):
                A057699_list.append(p)
    A057699_list = sorted(A057699_list) # Chai Wah Wu, Jun 02 2016
    

A058996 Primes whose reversal is a fourth power.

Original entry on oeis.org

61, 61483, 123031, 125329, 5260051, 14854831, 18005983, 61277761, 63367741, 127009213, 163740361, 526098739, 639360181, 639714223, 1088352997, 1808902273, 10007631583, 10278214831, 14838314173, 16121301661
Offset: 1

Views

Author

Robert G. Wilson v, Jan 16 2001

Keywords

Crossrefs

Cf. A007488.

Programs

  • Mathematica
    Do[ If[ PrimeQ[ n ] && IntegerQ[ ToExpression[ StringReverse[ ToString[ n ] ] ]^(1/4) ], Print[ n ] ], {n, 1, 10^12} ]
  • Python
    from sympy import isprime
    A058996_list = []
    for i in range(10**6):
        if i % 10:
            p = int(str(i**4)[::-1])
            if isprime(p):
                A058996_list.append(p)
    A058996_list = sorted(A058996_list) # Chai Wah Wu, Jun 02 2016

A059008 Numbers n such that n^3 reversed is a prime.

Original entry on oeis.org

5, 50, 52, 89, 118, 122, 152, 155, 157, 194, 211, 218, 226, 244, 247, 248, 251, 256, 271, 325, 326, 328, 413, 452, 455, 463, 466, 467, 481, 485, 487, 491, 499, 500, 503, 520, 521, 523, 526, 541, 544, 547, 563, 571, 581, 584, 685, 686, 701, 707, 716, 721
Offset: 1

Views

Author

Robert G. Wilson v, Jan 16 2001

Keywords

Examples

			52 is in the sequence because the reverse of 52^3 is 806041 and it is a prime. - _Indranil Ghosh_, Feb 10 2017
		

Crossrefs

Cf. A007488.

Programs

  • Magma
    [n: n in [1..800] | IsPrime(Seqint(Reverse(Intseq(n^3))))]; // Marius A. Burtea, Jan 12 2019
    
  • Mathematica
    Select[ Range[ 1000 ], PrimeQ[ ToExpression[ StringReverse[ ToString[ #^3 ] ] ] ] & ]
    Select[Range[1000],PrimeQ[IntegerReverse[#^3]]&] (* Harvey P. Dale, Dec 20 2023 *)
  • PARI
    isok(n) = isprime(fromdigits(Vecrev(digits(n^3)))); \\ Michel Marcus, Jan 12 2019

A059003 Primes whose reversal is an eighth power.

Original entry on oeis.org

61277761, 18258901387, 526098218446813, 52609352682209503, 186386112766353931, 526093005165061333, 12785316583844897311, 18866248772202954601, 104414665083132185191, 125722028990735440387, 679091464527322606741, 1462701398540433470911, 6100159128959496276541
Offset: 1

Views

Author

Robert G. Wilson v, Jan 16 2001

Keywords

Crossrefs

Cf. A007488.

Programs

  • Maple
    rev:= proc(n) local L, i;
      L:= convert(n, base, 10);
      add(L[-i]*10^(i-1), i=1..nops(L))
    end proc:
    S:= {}:
    for i from 1 to 999 do
      if i mod 10 = 0 then next fi;
      p:= rev(i^8);
      if isprime(p) then S:= S union {p} fi;
    od:
    sort(convert(S, list)); # Robert Israel, Dec 22 2024
  • Mathematica
    Do[ If[ PrimeQ[ n ] && IntegerQ[ ToExpression[ StringReverse[ ToString[ n ] ] ]^(1/8) ], Print[ n ] ], {n, 1, 10^22} ]

Extensions

More terms from Sean A. Irvine, Sep 09 2022

A176371 Primes p such that reversal(p) - 13 is a square.

Original entry on oeis.org

31, 41, 71, 83, 281, 311, 431, 479, 733, 751, 797, 2011, 2857, 3163, 4373, 4397, 4943, 7541, 7577, 7583, 9413, 9491, 20533, 20731, 20771, 24151, 24547, 24767, 26249, 28979, 31121, 41201, 41609, 43321, 43391, 43753, 45641, 49459, 49463, 49811, 49891
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Apr 16 2010

Keywords

Comments

R(n) denotes the Reversal of a natural number n
List of all (p,N) for p < 10^6 - 1:
(*) for emirp pair (p,R(p)), (+) if square base N is a prime
(41,1), (71,2) (+) (*), (83,5) (+), (281,13) (+), (311,10) (*), (431,11) (+), (479,31) (+), (733,18) (*), (751,12) (*), (797,28),
(2011,33), (2857,87), (4373,61) (+), (4397,89) (+), (4943,59) (+), (7541,38), (7577,88) (*), (7583,62), (9413,56), (9491,44) (*), (20533,183), (20731,117), (20771,133), (24151,123), (24547,273), (24767,277) (+), (26249,307) (+), (28979,313) (+), (31121,110) (*), (41201,101) (+),
(41609,301), (43321,111), (43391,139) (+), (43753,189), (45641,121), (49459,309), (49463,191) (+), (49811,109), (49891,141), (71293,198) (*),
(73133,182), (73471,132), (73597,282) (*), (75521,112), (77611,108) (*), (77849,308), (77863,192) (*), (79613,178), (79841,122) (*), (83207,265),
(83231,115), (83243,185), (83299,315), (90031,114) (*), (92801,104), (96431,116) (*), (98057,274)

Examples

			41 = prime(13), R(41) - 13 = 14 - 13 = 1^2, is a term.
71 = prime(20), 17 - 13 = 2^2, is a term.
83 = prime(23), 38 - 13 = 5^2, is a term.
797 = prime(139) = palindromic prime(18), N = 28^2, is also a term.
Note successive terms that are also consecutive primes: p(17) = 7577, p(18) = 7583, p(36) = 49459, p(37) = 49463, p(46) = 77849, p(47) = 77863.
		

References

  • W. W. R. Ball, H. S. M.Coxeter: Mathematical Recreations and Essays, Dover Publications, 13th edition, 1987
  • O. Fritsche, R. Mischak and T. Krome: Verflixt und zugeknobelt, Mehr mathematische Raetselgeschichten, Rowohlt TB. Nr.62190, 2007
  • C. W. Trigg, Primes with Reverses That Are Powers, J. Rec. Math. 17, 1985

Crossrefs

Programs

  • PARI
    isok(n) = {if (! isprime(n), return (0)); d = digits(n); revn = sum(i=1, #d, d[i]*10^(i - 1)); issquare(revn-13);} \\ Michel Marcus, Aug 25 2013
    
  • Python
    from sympy import isprime
    A176371_list, i, j = [], 0, 13
    while j < 10**10:
        p = int(str(j)[::-1])
        if j % 10 and isprime(p):
            A176371_list.append(p)
        j += 2*i+1
        i += 1
    A176371_list = sorted(A176371_list) # Chai Wah Wu, Dec 17 2015

Extensions

Two more terms 31 and 3163 added by Michel Marcus, Aug 25 2013

A059000 Primes whose reversal is a fifth power.

Original entry on oeis.org

23, 4201, 102658511, 344800741, 39715342481, 70496383033, 869910021839, 998699567381, 3457914828521, 3487946075153, 5265190686031, 5786421085169, 7020715917491, 9432574158041, 9925883645611, 9987727089187, 23802566907811, 23888027348153, 34401855516071
Offset: 1

Views

Author

Robert G. Wilson v, Jan 16 2001

Keywords

Crossrefs

Cf. A007488.

Programs

  • Mathematica
    Do[ If[ PrimeQ[ n ] && IntegerQ[ ToExpression[ StringReverse[ ToString[ n ] ] ]^(1/5) ], Print[ n ] ], {n, 1, 10^16} ]
  • Python
    from sympy import isprime
    A059000_list = []
    for i in range(10**6):
        if i % 10:
            p = int(str(i**5)[::-1])
            if isprime(p):
                A059000_list.append(p)
    A059000_list = sorted(A059000_list) # Chai Wah Wu, Dec 20 2015, Jun 02 2016

Extensions

More terms from Sean A. Irvine, Sep 09 2022

A059001 Primes whose reversal is a sixth power.

Original entry on oeis.org

61277761, 10278214831, 424176600403, 526098190537, 526515941773, 5260934114929, 9481530370051, 40512620860813, 46882459723321, 108153140207347, 489332144054323, 526046241813643, 1619463705594643, 1676989428458959, 4249139677419331, 4878387447701941
Offset: 1

Views

Author

Robert G. Wilson v, Jan 16 2001

Keywords

Crossrefs

Cf. A007488.

Programs

  • Maple
    rev:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    S:= {}:
    for i from 1 to 999 do
      if i mod 10 = 0 then next fi;
      p:= rev(i^6);
      if isprime(p) then S:= S union {p}; fi;
    od:
    sort(convert(S,list)); # Robert Israel, Dec 22 2024
  • Mathematica
    Do[ If[ PrimeQ[ n ] && IntegerQ[ ToExpression[ StringReverse[ ToString[ n ] ] ]^(1/6) ], Print[ n ] ], {n, 1, 10^18} ]

Extensions

More terms from Sean A. Irvine, Sep 09 2022
Showing 1-10 of 25 results. Next