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.

Previous Showing 11-20 of 25 results. Next

A059002 Primes whose reversal is a seventh power.

Original entry on oeis.org

821, 90367894271, 188372457491, 1938510215909, 67717549154641, 95168980930291, 772155318141637, 1558489460499871, 7505006230374799, 8237815094854781, 23021614989689299, 39712513595115047, 919042243755035867, 3573813286514042801, 7597919404531928707
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:= {}: count:= 0:
    for d from 1 while count < 60 do
     for i from 10^(d-1) to 10^d do
      if i mod 10 = 0 then next fi;
      p:= rev(i^7);
      if isprime(p) then S:= S union {p}; count:= count+1; fi;
    od od:
    sort(convert(S,list)); # Robert Israel, Dec 22 2024
  • Mathematica
    Do[ If[ PrimeQ[ n ] && IntegerQ[ ToExpression[ StringReverse[ ToString[ n ] ] ]^(1/7) ], Print[ n ] ], {n, 1, 10^19} ]

Extensions

More terms from Sean A. Irvine, Sep 09 2022

A059005 Primes whose reversal is a tenth power.

Original entry on oeis.org

4201, 940315563074788471, 940291214439736193431, 948413222299837654933, 1081016161371207738841, 4243031147170261950811, 428799714836577410775151, 671856480838442730716731, 1049138260426397606038531, 4224428884713520708904251, 9425086013565224928896521
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^10);
      if isprime(p) then S:= S union {p} fi;
    od:
    sort(convert(S, list)); # Robert Israel, Dec 22 2024
  • Mathematica
    Union[Select[FromDigits[Reverse[IntegerDigits[#]]]&/@(Range[300]^10),PrimeQ]] (* Harvey P. Dale, Mar 19 2013 *)

Extensions

More terms from Sean A. Irvine, Sep 09 2022

A068989 Squares which when reversed are primes (ignore leading zeros).

Original entry on oeis.org

16, 196, 361, 784, 1024, 1369, 1444, 1600, 1681, 3844, 7225, 7921, 9025, 9409, 11236, 14161, 18496, 19321, 19600, 36100, 37249, 38416, 70756, 73441, 75076, 76729, 78400, 78961, 97969, 99856, 102400, 105625, 107584, 109561, 111556, 112225
Offset: 1

Views

Author

Joseph L. Pe, Mar 12 2002

Keywords

Examples

			40^2 = 1600. Reversing the digits we get 0061, which is the prime 61 padded with leading zeroes. Hence 1600 is in the sequence.
41^2 = 1681. Reversing the digits we get 1861, which is a prime. Hence 1681 is in the sequence.
42^2 = 1764. Reversing the digits we get 4671 = 3^3 * 173. So 1764 is not in the sequence.
		

Crossrefs

Cf. primes whose reversal is a square, A007488; numbers n such that n^2 reversed is a prime, A059007.

Programs

  • Mathematica
    Do[s = i^2; If[PrimeQ[FromDigits[Reverse[IntegerDigits[s]]]], Print[s]], {i, 1, 10^2}] (* Pe *)
    Select[Range[100]^2, PrimeQ[FromDigits[Reverse[IntegerDigits[#]]]] &] (* Alonso del Arte, Jan 07 2018 *)
  • PARI
    isok(n) = issquare(n) && isprime(fromdigits(Vecrev(digits(n)))); \\ Michel Marcus, Jan 07 2018

Extensions

More terms from Zak Seidov, Jan 26 2005
Edited by N. J. A. Sloane, Dec 23 2007

A069798 Primes whose digit reversal is a nontrivial power.

Original entry on oeis.org

23, 61, 163, 487, 521, 691, 821, 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
Offset: 1

Views

Author

Amarnath Murthy, Apr 09 2002

Keywords

Examples

			691 is in the sequence because it is prime and its reversal, 196, is a power (greater than one) of 14.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{a, p = ToExpression[ StringReverse[ ToString[ Prime[n]]]]}, Log[ Apply[ Times, Transpose[ FactorInteger[p]][[1]]], p]]; Prime[ Select[ Range[10^5], IntegerQ[ f[ # ]] && f[ # ] > 1 &]]
  • PARI
    lista(nn) = {forprime(p=2, nn, if (ispower(subst(Polrev(digits(p)), x, 10)), print1(p, ", ")););} \\ Michel Marcus, Jun 03 2016

Extensions

Edited, corrected and extended by Robert G. Wilson v, Apr 15 2002
Missing terms a(4), a(24), and a(26) added by Chai Wah Wu, Jun 02 2016

A067194 Sequence of prime numbers whose reverse is a nontrivial prime power (A025475).

Original entry on oeis.org

23, 61, 163, 521, 821, 1297, 1861, 4201, 9049, 9631, 12391, 14437, 16987, 92767, 94273, 96979, 108061, 123031, 125329, 127291, 142771, 148249, 165901, 180289, 270131, 906421, 906727, 906751, 921931, 942013, 942691, 965443, 969407, 986641
Offset: 1

Views

Author

Shyam Sunder Gupta, Feb 19 2002

Keywords

Examples

			23 is a prime and its reversal is 32 = 2^5.
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[ If[ PrimeQ[n], b = ToExpression[ StringReverse[ ToString[n]]]; If[ !PrimeQ[b] && Mod[b, b - EulerPhi[b]] == 0, a = Append[a, n]]], {n, 1, 10^6} ]; a
    Select[Prime[Range[80000]],PrimePowerQ[IntegerReverse[#]]&& CompositeQ[ IntegerReverse[ #]]&] (* Harvey P. Dale, Dec 25 2021 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (ispower(subst(Polrev(digits(p)), x, 10),,&pp) && isprime(pp), print1(p, ", ")););} \\ Michel Marcus, Jun 03 2016

Extensions

Edited and extended by Robert G. Wilson v, Feb 19 2002 and Feb 24 2002

A306301 Numbers k such that k^2 reversed is a prime and k^2+(k^2 reversed) is a prime.

Original entry on oeis.org

14, 136, 190, 266, 280, 1036, 1060, 1306, 1406, 1898, 1934, 2660, 2686, 2746, 2776, 3112, 10040, 10250, 10546, 10550, 10630, 10880, 11090, 11156, 11204, 11276, 11354, 11386, 11474, 11740, 11804, 11914, 12064, 12136, 12194, 12250, 12410, 12524, 12626, 12710, 12770, 12794, 12916, 13060
Offset: 1

Views

Author

Robert Price, Mar 31 2019

Keywords

Comments

All terms are even and not divisible by 3. - Robert Israel, Apr 09 2019

Examples

			14 is a term because 691 (the reverse of 14^2=196) and 196+691=887 are two prime numbers.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    filter:= proc(k) local v; v:= revdigs(k^2); isprime(v) and isprime(v+k^2) end proc:
    select(filter, [seq(seq(6*i+j,j=[2,4]),i=0..10000)]); # Robert Israel, Apr 09 2019
  • Mathematica
    Select[Range[50000], PrimeQ[IntegerReverse[#^2]] && PrimeQ[#^2 + IntegerReverse[#^2]] &]
  • PARI
    isok(k) = my(kk=fromdigits(Vecrev(digits(k^2)))); isprime(kk) && isprime(k^2+kk); \\ Michel Marcus, Apr 01 2019

A307046 Numbers k such that k^2 reversed is a prime and k^2 + (k^2 reversed) is a semiprime.

Original entry on oeis.org

4, 28, 40, 62, 106, 140, 193, 196, 274, 316, 334, 400, 410, 554, 556, 620, 862, 866, 874, 884, 962, 1004, 1025, 1066, 1154, 1174, 1190, 1205, 1256, 1274, 1294, 1360, 1390, 1394, 1396, 1400, 1744, 1784, 1816, 1844, 1891, 1900, 1927, 1960, 1981, 1988, 2672, 2696, 2710, 2722, 2740, 2786, 2800, 3016, 3026
Offset: 1

Views

Author

Robert Price, Mar 31 2019

Keywords

Examples

			4^2=16, reversed is 61. 16+61=77 which is semiprime (7*11), so 4 is in this sequence.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L,i;
    L:= convert(n,base,10);
    add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    filter:= proc(n) local a,b;
    a:= n^2;
    b:= revdigs(a);
    isprime(b) and numtheory:-bigomega(a+b)=2
    end proc:
    select(filter, [$1..10000]); # Robert Israel, Mar 31 2019
  • Mathematica
    Select[Range[50000],
    PrimeQ[IntegerReverse[#^2]] &&
       PrimeOmega[#^2 + IntegerReverse[#^2]] == 2 &]

A350363 Primes whose reversal is a ninth power.

Original entry on oeis.org

23888027348153, 17571893445665616311, 3627487775963728773631, 5213075488148035940813, 232364835105859429802371, 1648344985192619771689693, 6522990445513252220198849, 6771520922071318266744521, 23295376285906990980268061, 29758574646480445207299379
Offset: 1

Views

Author

Mohammed Yaseen, Dec 27 2021

Keywords

Crossrefs

Primes whose reversal is a k-th power: A007488 (k=2), A057699 (k=3), A058996 (k=4), A059000 (k=5), A059001 (k=6), A059002 (k=7), A059003 (k=8), A059005 (k=10).

Programs

  • Mathematica
    Union[(i=IntegerReverse)@Select[Range@1000^9,PrimeQ@i@#&]] (* Giorgos Kalogeropoulos, Jan 04 2022 *)
    Select[IntegerReverse/@(Range[1000]^9),PrimeQ]//Union (* Harvey P. Dale, Nov 27 2024 *)
  • PARI
    flip(n)=fromdigits(Vecrev(digits(n))) \\ A004086
    Set(select(isprime, vector(1000, n, flip(n^9)))) \\ adapted from A057699
    
  • Python
    from sympy import isprime
    flip9 = (int(str(k**9)[::-1]) for k in range(1, 1000) if k%10)
    print(sorted(filter(isprime, flip9))) # Michael S. Branicky, Jan 02 2022

A059004 Smallest prime whose reversal is an n-th power.

Original entry on oeis.org

2, 61, 521, 61, 23, 61277761, 821, 61277761, 23888027348153, 4201, 33670369817243, 61277761, 5265674839116110941, 441435249928911950281, 23888027348153, 1232787935486158110509626783, 270131
Offset: 1

Views

Author

Robert G. Wilson v, Jan 16 2001

Keywords

Crossrefs

Cf. A007488.

Programs

  • Maple
    revdigs:= proc(n) local L,k;
      L:= convert(n,base,10);
      add(L[-k]*10^(k-1),k=1..nops(L))
    end proc:
    f:= proc(n) local d, k, wmin,  v,w;
      wmin:= infinity;
      for d from 1 do
        for k from ceil(10^(d/n)) do
          v:= k^n;
          if v >= 10^(d+1) then break fi;
          w:= revdigs(v);
          if isprime(w) and w < wmin then wmin:= w fi;
        od;
        if wmin < infinity then return wmin fi
      od
    end proc:
    map(f, [$1..20]); # Robert Israel, May 22 2019
  • Mathematica
    Do[ k = 1; While[ r = ToExpression[ StringReverse[ ToString[ k^n ] ] ]; ! PrimeQ[ r ], k++ ]; Print[ r ], {n, 1, 25} ]

A167218 Primes whose reversal - 1 is a square.

Original entry on oeis.org

2, 5, 71, 73, 101, 109, 263, 269, 523, 541, 587, 1061, 1063, 2089, 2251, 2273, 2297, 2843, 2861, 5441, 5477, 5483, 6203, 6221, 7129, 7507, 7937, 10009, 10163, 10169, 10487, 10691, 20201, 20693, 22391, 22769, 24023, 24877, 26141, 26171, 26723
Offset: 1

Views

Author

Claudio Meller, Oct 30 2009

Keywords

Comments

The first digit of a(n) cannot be 3, 4, 8 or 9. - Altug Alkan, Dec 20 2015

Examples

			71 is prime and 17-1 = 16 = 4^2.
		

Crossrefs

Cf. A007488.

Programs

  • PARI
    lista(nn) = {forprime(p=2, nn, if (issquare(eval(concat(Vecrev(Str(p))))-1), print1(p, ", ")););} \\ Michel Marcus, Dec 20 2015
  • Python
    from sympy import isprime
    A167218_list, i, j = [], 0, 1
    while j < 10**10:
        p = int(str(j)[::-1])
        if j % 10 and isprime(p):
            A167218_list.append(p)
        j += 2*i+1
        i += 1
    A167218_list = sorted(A167218_list) # Chai Wah Wu, Dec 20 2015
    
Previous Showing 11-20 of 25 results. Next