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

A165778 Numbers k such that |2^k - 57| is prime.

Original entry on oeis.org

2, 4, 6, 7, 8, 10, 16, 19, 22, 28, 43, 46, 56, 58, 62, 67, 74, 82, 140, 160, 316, 346, 376, 454, 458, 487, 580, 607, 1018, 1579, 1739, 1870, 2006, 3014, 3056, 6962, 7075, 7852, 8207, 9190, 11854, 14816, 23308, 29222, 33808, 40618, 47408, 50843, 58312, 98554
Offset: 1

Views

Author

M. F. Hasler, Oct 11 2009

Keywords

Comments

If p = 2^k-57 is prime, then 2^(k-1)*p is in A101260, i.e., a solution to sigma(x)-2x = 56 = 2^3*(2^3-1) = 2*A000396(2).

Examples

			a(3) = 6 since 2^6-57 = 7 is prime.
For exponents a(1) = 2 and a(2) = 4, we get 2^a(n)-57 = -53 and -41 which are negative, but which are prime in absolute value.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..1100] | IsPrime(2^n-57)]; // Vincenzo Librandi, Apr 09 2016
    
  • Mathematica
    Select[Table[{n, Abs[2^n - 57]}, {n, 0, 100}], PrimeQ[#[[2]]] &][[All,1]] (* G. C. Greubel, Apr 08 2016 *)
  • PARI
    lista(nn) = for(n=1, nn, if(ispseudoprime(abs(2^n-57)), print1(n, ", "))); \\ Altug Alkan, Apr 08 2016
    
  • Python
    from sympy import isprime, nextprime
    def afind(limit):
        k, pow2 = 1, 2
        for k in range(1, limit+1):
            if isprime(abs(pow2-57)):
                print(k, end=", ")
            k += 1
            pow2 *= 2
    afind(2100) # Michael S. Branicky, Dec 27 2021

Extensions

a(36)-a(42) from Altug Alkan, Apr 08 2016
a(43)-a(44) from Michael S. Branicky, Dec 27 2021
a(45)-a(49) from Michael S. Branicky, May 14 2023
a(50) from Michael S. Branicky, Sep 25 2024

A165779 Numbers k such that |2^k-993| is prime.

Original entry on oeis.org

1, 4, 6, 10, 14, 17, 26, 29, 54, 62, 77, 121, 344, 476, 1012, 1717, 1954, 2929, 2993, 3014, 3304, 4704, 8882, 24042, 43572, 45722, 54913, 57893, 72566, 74473, 82092, 117302
Offset: 1

Views

Author

M. F. Hasler, Oct 11 2009

Keywords

Comments

If p = 2^k-993 is prime, then 2^(k-1)*p is a solution to sigma(x)-2x = 992 = 2^5*(2^5-1) = 2*A000396(3).

Examples

			a(4) = 10 since 2^10-993 = 31 is prime.
For exponents a(1) = 1, a(2) = 4 and a(3) = 6, we get 2^a(n)-993 = -991, -977 and -929 which are negative, but which are prime in absolute value.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..1100] |IsPrime(2^n-993)]; // Vincenzo Librandi, Apr 09 2016
    
  • Mathematica
    Select[Table[{n, Abs[2^n - 993]}, {n,0,100}], PrimeQ[#[[2]]] &][[All, 1]] (* G. C. Greubel, Apr 08 2016 *)
  • PARI
    lista(nn) = for(n=1, nn, if(ispseudoprime(abs(2^n-993)), print1(n, ", "))); \\ Altug Alkan, Apr 08 2016
    
  • Python
    from sympy import isprime, nextprime
    def afind(limit):
        k, pow2 = 1, 2
        for k in range(1, limit+1):
            if isprime(abs(pow2-993)):
                print(k, end=", ")
            k += 1
            pow2 *= 2
    afind(2000) # Michael S. Branicky, Dec 26 2021

Extensions

a(23) from Altug Alkan, Apr 08 2016
a(24) from Michael S. Branicky, Dec 26 2021
a(25)-a(26) from Michael S. Branicky, Apr 06 2023
a(27)-a(32) from Michael S. Branicky, Sep 25 2024
Showing 1-2 of 2 results.