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

A101896 Primes obtained if 2^j for some suitable j is written backward.

Original entry on oeis.org

2, 61, 23, 821, 4201, 270131, 61277761, 274359834731, 23888027348153, 86936981079782063, 4243031147170261950811, 272838646828154727511151, 821882010875193363312928672952261, 274562423560500997742392394025368175422471, 4266472836315949449695828501889595072967427241
Offset: 1

Views

Author

Labos Elemer, Jan 28 2005

Keywords

Comments

The relevant exponents are collected in A057708.
a(23), reverse(2^3489), has 1023 decimal digits. - Michael De Vlieger, Dec 03 2015

Examples

			Reverse 128, obtain 821, a prime.
		

Crossrefs

Cf. A057708.

Programs

  • GAP
    a:=Filtered(List(List([1..300],j->Reversed(ListOfDigits(2^j))),k->Sum([1..Size(k)],i->k[i]*10^(Size(k)-i))),IsPrime);; Print(a); # Muniru A Asiru, Dec 25 2018
  • Mathematica
    Select[FromDigits@ Reverse@ IntegerDigits[2^#] & /@ Range@ 3200, PrimeQ] (* Michael De Vlieger, Dec 03 2015 *)

Formula

a(n) = reverse(2^A057708(n)).

A341713 Indices of Ennesrem primes: k such that A004094(k)-1 is prime.

Original entry on oeis.org

2, 3, 13, 21, 347, 1217, 1267, 16459, 100909, 342243
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2021

Keywords

Comments

Numbers k such that reverse(2^k) - 1 is prime.
Is this sequence infinite?

Examples

			13 is a term, since 2^13 = 8192 -> 2918 -> 2917, which is prime.
		

Crossrefs

Programs

  • PARI
    for(n=1,10000,my(pe=fromdigits(Vecrev(digits(2^n)))-1);if(ispseudoprime(pe),print1(n,", "))) \\ Hugo Pfoertner, Feb 20 2021
    
  • Python
    from sympy import isprime
    def ok(k): return isprime(int(str(2**k)[::-1]) - 1)
    for k in range(1, 2*10**3):
      if ok(k): print(k, end=", ") # Michael S. Branicky, Feb 20 2021

Extensions

a(8) from Hugo Pfoertner, Feb 20 2021
a(9) from Hugo Pfoertner, Mar 22 2021
a(10) from Steven Charlton, Apr 26 2021

A309607 Exponents k for which reversal(2^k-1) is prime.

Original entry on oeis.org

2, 3, 5, 53, 189, 293, 1107, 2181, 2695, 2871, 7667, 19999, 27471, 44537, 62323, 134367, 174295
Offset: 1

Views

Author

Metin Sariyar, Aug 09 2019

Keywords

Comments

According to the statements in the first link given below, the terms for k <= 7667, the primes of the form reversal(2^k-1) are certified and for k >= 19999 they are probable primes.

Examples

			5 is included because for n=5, reversal(2^5-1)=13 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[7667], PrimeQ[IntegerReverse[2^# - 1]] &]
  • PARI
    isok(k) = isprime(fromdigits(Vecrev(digits(2^k-1)))); \\ Michel Marcus, Aug 10 2019

A318568 Primes p such that 2^p reversed is a prime.

Original entry on oeis.org

5, 7, 17, 37, 107, 137, 271
Offset: 1

Views

Author

Vincenzo Librandi, Sep 22 2018

Keywords

Comments

Equivalently, primes in A057708. - Muniru A Asiru, Dec 25 2018
a(8) > 200000 using A057708. - Michael S. Branicky, May 17 2025

Crossrefs

Cf. A059706.
Subsequence of A057708.

Programs

  • GAP
    P0:=List(List([1..300],j->Reversed(ListOfDigits(2^j))),k->Sum([1..Size(k)],i->k[i]*10^(Size(k)-i)));;
    a:=Filtered([1..Length(P0)],m->IsPrime(m) and IsPrime(P0[m]));; Print(a); # Muniru A Asiru, Dec 25 2018
  • Magma
    [p: p in PrimesUpTo(200) | IsPrime(Seqint(Reverse(Intseq(2^p))))];
    
  • Mathematica
    Select[Prime[Range[100]], PrimeQ[ToExpression[StringReverse[ToString[2^#]]]] &]
  • PARI
    isok(p) = isprime(p) && isprime(fromdigits(Vecrev(digits(2^p)))); \\ Michel Marcus, Sep 22 2018
    

A379938 Numbers k such that the k-th prime is a power of two reversed.

Original entry on oeis.org

1, 9, 18, 142, 575, 23652, 3633466, 10846595429, 802467018101, 2289255503212477
Offset: 1

Views

Author

Kalle Siukola, Jan 06 2025

Keywords

Examples

			The 9th prime is 23, 23 reversed is 32, and 32 = 2^5, so 9 is a term.
		

Crossrefs

Programs

  • Python
    import sympy
    for (k, p) in enumerate(sympy.primerange(10**8)):
        rev = int(str(p)[::-1])
        # is rev a power of two (or zero)?
        if rev & (rev - 1) == 0:
            print(k + 1, end=",")
    print()

Formula

A000040(a(n)) = A102385(n).
a(n) = A000720(A102385(n)). - Michel Marcus, Jan 07 2025

Extensions

a(8)-a(10) from Amiram Eldar, Jan 07 2025

A380992 Powers of two which produce a prime number when their digits are reversed.

Original entry on oeis.org

2, 16, 32, 128, 1024, 131072, 16777216, 137438953472, 35184372088832, 36028797018963968, 1180591620717411303424, 151115727451828646838272, 162259276829213363391578010288128, 174224571863520493293247799005065324265472, 1427247692705959881058285969449495136382746624
Offset: 1

Views

Author

Paul Duckett, Feb 11 2025

Keywords

Comments

A057708 is the main entry for this question. - N. J. A. Sloane, Feb 28 2025

Examples

			The digits of 1024 (2^10) reverse to form the prime number 4201.
		

Crossrefs

Cf. A057708.

Programs

  • Mathematica
    Select[2^Range[200],PrimeQ[IntegerReverse[#]]&] (* James C. McMahon, Feb 28 2025 *)

Formula

a(n) = 2^A057708(n). - Pontus von Brömssen, Feb 11 2025
Previous Showing 11-16 of 16 results.