A278740 Primes in A138290.
577, 5569, 29251
Offset: 1
Crossrefs
Cf. A138290.
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.
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]
a208083 = sum . map a010051 . a081118_row
f:= n -> nops(select(k -> isprime(2^n-2^k-1),[$1..n-1])): map(f, [$1..100]); # Robert Israel, Jun 12 2018
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 *)
a(n)=sum(k=1,n-1,ispseudoprime(2^n-2^k-1)) \\ Charles R Greathouse IV, Sep 12 2013
a(n) = sum(k=2^n+1, 2^(n+1), isprime(k) && (#select(x->x==0, binary(k))==1)); \\ Michel Marcus, Sep 11 2015
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.
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 *)
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.
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 = ', ')
Comments