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

A278740 Primes in A138290.

Original entry on oeis.org

577, 5569, 29251
Offset: 1

Views

Author

Hans Havermann, Nov 27 2016

Keywords

Crossrefs

Cf. A138290.

A208083 Number of primes of the form 2^n - 2^k - 1, 1 <= k < n.

Original entry on oeis.org

0, 0, 2, 3, 2, 4, 0, 5, 4, 3, 1, 5, 1, 5, 0, 3, 2, 9, 1, 12, 4, 5, 0, 7, 1, 2, 0, 1, 5, 4, 0, 8, 5, 1, 1, 9, 0, 6, 0, 7, 1, 6, 0, 4, 7, 2, 1, 10, 3, 3, 1, 2, 1, 6, 0, 4, 3, 0, 1, 8, 3, 4, 0, 3, 1, 8, 1, 2, 2, 3, 0, 9, 1, 5, 2, 5, 8, 3, 0, 10, 3, 0, 2, 4, 4, 6
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 23 2012

Keywords

Comments

Number of primes in (n-1)-st row of the triangle in A081118;
a(A138290(n)+1) = 0;
for n >= 0: a(A208091(n)) = n and a(m) <> n for m < A208091(n).

Examples

			n _ A208083(n) ________________ (n-1)-st row of A081118 _________
5   #{23,29} = 2                [15,23,27,29]
6   #{31,47,59,61} = 4          [31,47,55,59,61]
7   #{} = 0                     [63,95,111,119,123,125]
8   #{127,191,223,239,251} = 5  [127,191,223,239,247,251,253]
9   #{383,479,503,509} = 4      [255,383,447,479,495,503,507,509]
		

Crossrefs

Programs

  • Haskell
    a208083 = sum . map a010051 . a081118_row
    
  • Maple
    f:= n -> nops(select(k -> isprime(2^n-2^k-1),[$1..n-1])):
    map(f, [$1..100]); # Robert Israel, Jun 12 2018
  • Mathematica
    a[n_] := Module[{m = 2^n - 1, cnt = 0}, For[ k = 1, k < n, k++, If[PrimeQ[m - 2^k], cnt++]]; cnt]; Table[a[n], {n, 2, 86}] (* Jean-François Alcover, Sep 12 2013 *)
  • PARI
    a(n)=sum(k=1,n-1,ispseudoprime(2^n-2^k-1)) \\ Charles R Greathouse IV, Sep 12 2013

Formula

a(n) = Sum_{k=1..n-1} A010051(A081118(n-1,k)).

A095058 Number of primes with a single 0-bit (A095078) in range ]2^n,2^(n+1)].

Original entry on oeis.org

0, 1, 2, 2, 3, 0, 4, 4, 3, 1, 5, 1, 4, 0, 3, 2, 8, 1, 11, 4, 5, 0, 7, 1, 2, 0, 1, 5, 4, 0, 7, 5, 1, 1, 9, 0, 6, 0, 7, 1, 6, 0, 4, 7, 2, 1, 10, 3, 3, 1, 2, 1, 6, 0, 4, 3, 0, 1, 8, 3, 3, 0, 3, 1, 8, 1, 2, 2, 3, 0, 9, 1, 5, 2, 5, 8, 3, 0, 10, 3, 0, 2, 4, 4, 6, 1
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Comments

For large n, the average value of a(n) is about 4. See A138290 for the n such that a(n)=0. - T. D. Noe, Mar 14 2008

Crossrefs

Cf. A095018.

Programs

  • PARI
    a(n) = sum(k=2^n+1, 2^(n+1), isprime(k) && (#select(x->x==0, binary(k))==1)); \\ Michel Marcus, Sep 11 2015

A369375 Numbers m such that the Mersenne number 2^m - 1 is a de Polignac number (A006285).

Original entry on oeis.org

1, 7, 15, 23, 27, 31, 37, 39, 43, 55, 58, 63, 71, 79, 82, 91, 95, 111, 123, 127, 133, 135, 139, 143, 148, 151, 159, 167, 169, 172, 173, 175, 179, 183, 191, 195, 199, 207, 211, 223, 239, 255, 286, 295, 313, 316, 319, 335, 337, 351, 367, 373, 383, 406, 415, 417, 433, 435, 447, 455, 461, 463, 479
Offset: 1

Views

Author

Thomas Ordowski, Jan 22 2024

Keywords

Comments

Integers m > 0 such that 2^m-1 - 2^n is not prime for every natural n < m.
For m > 2, a number m is a term of this sequence if and only if A208083(m) = 0.
All Mersenne number m = 2^k-1 for k > 2 are in this sequence. The proof is below.
Cf. A138290 (see Chai Wah Wu's conjecture in the third comment). By Crocker's (1971) theorem: if m > 2 and a <> b, then 2^(2^m)-1 - 2^a - 2^b is not prime.
If a = 2^m-1, then b < a, so for m > 2, 2^(2^m-1)-1 is a de Polignac number, QED.
Note that 2^(2^m-1)-1 - 2^n is divisible by some prime factor of 2^(2^m)-1.
Prime numbers of this sequence are Mersenne primes > 3, and many other primes.
Conjecture: if n > 5, then |2^(2^n-1)-1 - 2^m| is not prime for every m > 0.
If so, then by the dual Riesel conjecture, 2^(2^n-1)-1 is a (dual) Riesel number, i.e., if n > 5, then (2^(2^n-1)-1)2^m-1 is composite for every integer m > 0.
For example, the double Mersenne prime 2^(2^7-1)-1 may be a dual Riesel number.
It seems that the natural density of these numbers is about twice as high as the density of de Polignac numbers.
For many terms m, 2m+1 is also in this sequence. By iteration (x -> 2x+1), the subsequence b(n) = (m+1)2^n-1, for n >= 0, is infinite if m = 7 (which has already been proven) and probably if m = 27 (which is hard to prove).

Examples

			7 is a term since {2^7-1-2, 2^7-1-2^2, 2^7-1-2^3, 2^7-1-2^4, 2^7-1-2^5, 2^7-1-2^6} = {125, 123, 119, 111, 95, 63} and all six of these numbers are composite.
Note that both 2^148-1 and 2^148+1 are de Polignac numbers.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{k = n -1}, While[k > 1 && !PrimeQ[2^n -1 -2^k], k--]; k == 1]; Select[ Range[3, 450], fQ] (* Robert G. Wilson v, Jan 22 2024 *)

Formula

For n > 1, a(n) = A138290(n-1) + 1.
A208083(a(n)) = 0, for n > 0.

Extensions

More terms from Robert G. Wilson v, Jan 22 2024

A368214 Primes with a single 0-bit in binary expansion such that changing the position of the 0-bit always gives a nonprime (including the one with a leading zero).

Original entry on oeis.org

2, 2039, 6143, 522239, 33546239, 260046847, 16911433727, 32212254719, 2196875771903, 140735340871679, 2251799813685119, 9005000231485439, 576460752169205759, 36893488147410714623, 147573811852188057599, 9444732965739282038783, 154742504910672534362390399
Offset: 1

Views

Author

Ya-Ping Lu, Dec 23 2023

Keywords

Comments

It seems that most of the terms end with '9', followed by those ending with '3', '7', and '1'.

Examples

			2 is a term because 2 is a prime with one '0' in binary form ('10') and '01' is not a prime. 2039 is a term because 2039 is a prime with one '0' in binary form ('11111110111') and changing the position of the '0', for example, '11111111011' = 2043 and '01111111111' = 1023, always results in a composite.
		

Crossrefs

Subsequence of A095078.

Programs

  • Python
    from sympy import isprime
    for n in range(1,100):
        s = n*'1'; c = 0
        for j in range(n+1):
            num = int(s[:j]+'0'+s[j:], 2)
            if isprime(num):
                c += 1
                if c == 1: r = num
                if c == 2: break
        if c == 1: print(r, end = ', ')
Showing 1-5 of 5 results.