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 20 results. Next

A057778 a(n) is the least odd k such that k*2^n + 1 is prime.

Original entry on oeis.org

1, 1, 1, 5, 1, 3, 3, 5, 1, 15, 13, 9, 3, 5, 7, 5, 1, 9, 3, 11, 7, 11, 25, 45, 45, 5, 7, 15, 13, 23, 3, 35, 43, 9, 75, 59, 3, 15, 15, 5, 27, 3, 9, 9, 15, 35, 19, 27, 15, 23, 7, 17, 7, 51, 49, 5, 27, 29, 99, 27, 31, 53, 105, 9, 25, 9, 3, 9, 31, 23, 39, 39, 127, 23, 67, 5, 93, 29, 15, 249
Offset: 0

Views

Author

Labos Elemer, Nov 02 2000

Keywords

Comments

There are no Sierpiński numbers in the sequence. See A076336. - Thomas Ordowski, Aug 13 2017
Conjecture: for n > 0, a(n) = k < 2^n, so k*2^n + 1 is a Proth prime A080076. - Thomas Ordowski, Apr 13 2019

Examples

			For n = 10, the first primes in the 1024k + 1 arithmetic progression occur at k = 12, 13, 15, 18, 19, ...; 13 is the first odd number, so a(10)=13, while A035050(10)=12. The corresponding primes are 12289 and 13313.
For n = 79, the first primes in the (2^79)k + 1 = 604462909807314587353088k + 1 progression occur at k = 36, 44, 104, 249, 296, 299, so a(79)=249, the first odd number, while A035050(79)=36. The two primes arising are 21760664753063325144711169 and 150511264542021332250918913, respectively.
		

Crossrefs

Terms are not necessarily in A035050.

Programs

  • Mathematica
    Table[k = 1; While[! PrimeQ[k 2^n + 1], k += 2]; k, {n, 0, 80}] (* Michael De Vlieger, Jul 04 2016 *)
  • PARI
    a(n) = k=1; while(!isprime(k*2^n+1), k+=2); k; \\ Michel Marcus, Dec 10 2013

Formula

a(n) = Min{k: 1+2^n*k is prime and k is odd}.
a(n) << 19^n by Xylouris's improvement to Linnik's theorem. - Charles R Greathouse IV, Dec 10 2013
Conjecture: a(n) = O(n*log(n)). - Thomas Ordowski, Oct 16 2014

A085427 Least k such that k*2^n - 1 is prime.

Original entry on oeis.org

3, 2, 1, 1, 2, 1, 2, 1, 5, 7, 5, 3, 2, 1, 5, 4, 2, 1, 2, 1, 14, 7, 26, 13, 39, 22, 11, 16, 8, 4, 2, 1, 5, 6, 3, 24, 12, 6, 3, 25, 24, 12, 6, 3, 14, 7, 20, 10, 5, 19, 11, 21, 20, 10, 5, 3, 32, 16, 8, 4, 2, 1, 12, 6, 3, 67, 63, 43, 63, 40, 20, 10, 5, 15, 12, 6, 3, 55, 47, 30, 15, 30, 15, 64, 32, 16, 8
Offset: 0

Views

Author

Jason Earls, Aug 13 2003

Keywords

Comments

First few pairs (n,k) such that k > n are (1,2), (22,26), (24,39), (65,67), (110,150), (112,140), (135,150), (137,169), ... Also, for n=398 there is an interesting anomaly since k=893 which is > 2n.
Conjecture: for every n there exists a number k < 3n such that k*2^n - 1 is prime. Comment from T. D. Noe: this fails at n=624, where a(n)=2163.
Define sumk = Sum_{n=1..N} k(n), and define sumn = Sum_{n=1..N} n, then as N increases the ratio sumk/sumn tends to log(2)/2 = 0.3465735.... so on average k(n) is about 0.35*n and seems to be always < 3.82*n or 11*log(2)/2. - Pierre CAMI, Feb 27 2009
a(n) = 1 if and only if n is in A000043. - Felix Fröhlich, Sep 14 2014

Crossrefs

Programs

  • Mathematica
    k2np[n_]:=Module[{k=1,x=2^n},While[!PrimeQ[k x-1],k++];k]; Array[ k2np,90,0] (* Harvey P. Dale, Nov 19 2011 *)
  • PARI
    lim=10^9; for(n=0, 200, k=1; i=0; while(k < lim, if(ispseudoprime(k*2^n-1), print1(k, ", "); i++; break({1})); if(i==0 && k >= lim-1, print1(">", lim, ", "); i=0); k++)) \\ Felix Fröhlich, Sep 20 2014

Formula

a(n) << 19^n by Xylouris's improvement to Linnik's theorem. - Charles R Greathouse IV, Dec 10 2013

A127589 Primes of the form 16k + 5.

Original entry on oeis.org

5, 37, 53, 101, 149, 181, 197, 229, 277, 293, 373, 389, 421, 613, 661, 677, 709, 757, 773, 821, 853, 997, 1013, 1061, 1093, 1109, 1237, 1301, 1381, 1429, 1493, 1621, 1637, 1669, 1733, 1861, 1877, 1973, 2053, 2069, 2213, 2293, 2309, 2341, 2357, 2389, 2437
Offset: 1

Views

Author

Artur Jasinski, Jan 19 2007

Keywords

Comments

All terms are the sum of two squares.
Primes with least significant digit 5 in hexadecimal. - Alonso del Arte, Oct 21 2022

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[16n + 5], AppendTo[a, 16n + 5]], {n, 0, 200}]; a
    Select[16Range[200] + 5, PrimeQ] (* Alonso del Arte, Oct 21 2022 *)
  • PARI
    select(x->(x%16)==5, primes(500)) \\ Michel Marcus, Oct 24 2022

Extensions

Invalid comment removed by Zak Seidov, Jul 22 2010

A057775 a(n) is the least prime p such that p-1 is divisible by 2^n and not by 2^(n+1).

Original entry on oeis.org

2, 3, 5, 41, 17, 97, 193, 641, 257, 7681, 13313, 18433, 12289, 40961, 114689, 163841, 65537, 1179649, 786433, 5767169, 7340033, 23068673, 104857601, 377487361, 754974721, 167772161, 469762049, 2013265921, 3489660929, 12348030977, 3221225473, 75161927681
Offset: 0

Views

Author

Labos Elemer, Nov 02 2000

Keywords

Comments

If we drop the requirement that p-1 must not be divisible by 2^(n+1), we get instead A035089, which is a nondecreasing sequence. - Jeppe Stig Nielsen, Aug 09 2015

Examples

			a(13) = 40961 = 1 + 8192*5 where the last term is divisible by the 13th power of 2 and 40961 is the smallest prime with that property.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p;
      for p from 2^n+1 by 2^(n+1) do
        if isprime(p) then return p fi
      od
    end proc:
    map(f, [$0..100]); # Robert Israel, Aug 10 2015
  • Mathematica
    Table[k = 1; While[p = k*2^n + 1; ! PrimeQ[p], k = k + 2]; p, {n, 0, 40}] (* T. D. Noe, Dec 27 2011 *)
  • PARI
    a(n)=forstep(k=1,9e99,2,isprime((k<Jeppe Stig Nielsen, Aug 09 2015

Formula

a(n) = prime(A057776(n+1)). - Amiram Eldar, Mar 16 2025

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Nov 03 2000

A126717 Least odd k such that k*2^n-1 is prime.

Original entry on oeis.org

3, 3, 1, 1, 3, 1, 3, 1, 5, 7, 5, 3, 5, 1, 5, 9, 17, 1, 3, 1, 17, 7, 33, 13, 39, 57, 11, 21, 27, 7, 213, 1, 5, 31, 3, 25, 17, 21, 3, 25, 107, 15, 33, 3, 35, 7, 23, 31, 5, 19, 11, 21, 65, 147, 5, 3, 33, 51, 77, 45, 17, 1, 53, 9, 3, 67, 63, 43, 63, 51, 27, 73, 5, 15, 21, 25, 3, 55, 47, 69
Offset: 0

Views

Author

Bernardo Boncompagni, Feb 13 2007

Keywords

Comments

If a(n)=1 then n is a Mersenne exponent (A000043). - Pierre CAMI, Apr 22 2013
From Pierre CAMI, Apr 03 2017: (Start)
Empirically, as N increases, (Sum_{n=1..N} a(n)) / (Sum_{n=1..N} n) tends to log(2); this is consistent with the prime number theorem as the probability that x*2^n - 1 is prime is ~ 1/(n*log(2)) if n is large enough.
For n=1 to 10000, a(n)/n < 7.5.
a(n)*2^n - 1 and a(n)*2^n + 1 are twin primes for n = 1, 2, 6, 18, 22, 63, 211, 282, 546, 726, 1032, 1156, 1321, 1553, 2821, 4901, 6634, 8335, 8529; corresponding values of a(n) are 3, 1, 3, 3, 33, 9, 9, 165, 297, 213, 177, 1035, 1065, 291, 6075, 2403, 2565, 4737, 3975, 459. (End)

Examples

			a(10)=5 because 5*2^10-1 is prime but 1*2^10-1 and 3*2^10-1 are not.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ !PrimeQ[k*2^n - 1], k += 2]; k]; Table[f@n, {n, 0, 80}] (* Robert G. Wilson v, Feb 20 2007 *)
  • PARI
    a(n) = {my(k=1); while(!isprime(k*2^n - 1), k+=2); k}; \\ Indranil Ghosh, Apr 03 2017
    
  • Python
    from sympy import isprime
    def a(n):
        k=1
        while True:
            if isprime(k*2**n - 1): return k
            k+=2
    print([a(n) for n in range(101)]) # Indranil Ghosh, Apr 03 2017

Formula

a(n) << 19^n by Xylouris' improvement to Linnik's theorem. - Charles R Greathouse IV, Dec 10 2013
Conjecture: a(n) = O(n log n). - Thomas Ordowski, Oct 15 2014

Extensions

More terms from Robert G. Wilson v, Feb 20 2007

A127590 Numbers n such that 16n+5 is prime.

Original entry on oeis.org

0, 2, 3, 6, 9, 11, 12, 14, 17, 18, 23, 24, 26, 38, 41, 42, 44, 47, 48, 51, 53, 62, 63, 66, 68, 69, 77, 81, 86, 89, 93, 101, 102, 104, 108, 116, 117, 123, 128, 129, 138, 143, 144, 146, 147, 149, 152, 159, 167, 168, 171, 174, 177, 182, 191, 194
Offset: 1

Views

Author

Artur Jasinski, Jan 19 2007

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[16n + 5], AppendTo[a, n]], {n, 0, 200}]; a
    Select[Range[0,200],PrimeQ[16#+5]&] (* Harvey P. Dale, Aug 31 2020 *)
  • PARI
    is(n)=isprime(16*n+5) \\ Charles R Greathouse IV, Feb 17 2017

A127591 Numbers k such that 64k+21 is prime.

Original entry on oeis.org

2, 4, 10, 13, 17, 19, 20, 22, 23, 25, 29, 32, 37, 44, 50, 53, 55, 58, 59, 62, 68, 79, 83, 88, 89, 94, 95, 97, 100, 107, 109, 113, 118, 122, 134, 142, 143, 152, 155, 157, 158, 163, 167, 169, 173, 193, 194, 199, 200
Offset: 1

Views

Author

Artur Jasinski, Jan 19 2007

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[21 + 64 n], AppendTo[a, n]], {n, 0, 200}]; a
    Select[Range[200],PrimeQ[64#+21]&] (* Harvey P. Dale, Jan 15 2016 *)

A127592 Primes of the form 64k+21.

Original entry on oeis.org

149, 277, 661, 853, 1109, 1237, 1301, 1429, 1493, 1621, 1877, 2069, 2389, 2837, 3221, 3413, 3541, 3733, 3797, 3989, 4373, 5077, 5333, 5653, 5717, 6037, 6101, 6229, 6421, 6869, 6997, 7253, 7573, 7829, 8597, 9109, 9173, 9749, 9941, 10069, 10133, 10453
Offset: 1

Views

Author

Artur Jasinski, Jan 19 2007, Nov 12 2007

Keywords

Comments

All these primes are sums of two squares, also all indices are sums of two squares since we have the identity 64k+21 = 4(4(4k+1)+1)+1.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(11000) | p mod 64 eq 21 ]; // Vincenzo Librandi, Sep 06 2012
  • Mathematica
    a = {}; Do[If[PrimeQ[21 + 64 n], AppendTo[a, 21 + 64 n]], {n, 0, 200}]; a
    Select[Prime[Range[1700]], MemberQ[{21}, Mod[#, 64]] &] (* Vincenzo Librandi, Sep 06 2012 *)

A127593 Primes of the form 256 k + 85.

Original entry on oeis.org

853, 1109, 1621, 1877, 2389, 3413, 5717, 6229, 6997, 7253, 10069, 10837, 11093, 12373, 13397, 16981, 17749, 18517, 18773, 19541, 21589, 22613, 23893, 24917, 27733, 29269, 30293, 31573, 32341, 37717, 39509, 40277, 41813, 43093, 46933
Offset: 1

Views

Author

Artur Jasinski, Jan 19 2007

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[85 + 256 n], AppendTo[a, 85 + 256 n]], {n, 0, 200}]; a
    Select[256*Range[200]+85,PrimeQ] (* Harvey P. Dale, Oct 09 2020 *)

A127594 Numbers k such that 256 k + 85 is prime.

Original entry on oeis.org

3, 4, 6, 7, 9, 13, 22, 24, 27, 28, 39, 42, 43, 48, 52, 66, 69, 72, 73, 76, 84, 88, 93, 97, 108, 114, 118, 123, 126, 147, 154, 157, 163, 168, 183, 184, 186, 196, 198
Offset: 1

Views

Author

Artur Jasinski, Jan 19 2007

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[85 + 256 n], AppendTo[a, n]], {n, 0, 200}]; a
Showing 1-10 of 20 results. Next