A359436
Primes p such that (4^p - 2^p + 1)/3 is prime.
Original entry on oeis.org
3, 5, 7, 13, 29, 61, 383, 401, 1637, 1871, 36229, 44771, 44797, 75167
Offset: 1
3 is a term because 3 is prime and (4^3 - 2^3 + 1)/3 = 19 is also prime.
-
isok(k)={k%2 && ispseudoprime((4^k - 2^k + 1)/3)}
{ forprime(p=3, 2000, if(isok(p), print1(p, ", "))) } \\ Andrew Howroyd, Dec 31 2022
A361562
Wagstaff numbers that are of the form 4*k + 3.
Original entry on oeis.org
3, 7, 11, 19, 23, 31, 43, 79, 127, 167, 191, 199, 347, 3539, 5807, 10691, 11279, 12391, 14479, 83339, 117239, 127031, 141079, 269987, 986191, 4031399
Offset: 1
-
from itertools import count, islice
from sympy import prime, isprime
def A361562_gen(): # generator of terms
return filter(lambda p: p&2 and isprime(((1<A361562_list = list(islice(A361562_gen(),10)) # Chai Wah Wu, Mar 21 2023
A361563
Wagstaff numbers that are of the form 4*k + 1.
Original entry on oeis.org
5, 13, 17, 61, 101, 313, 701, 1709, 2617, 10501, 42737, 95369, 138937, 267017, 374321
Offset: 1
-
from itertools import count, islice
from sympy import prime, isprime
def A361563_gen(): # generator of terms
return filter(lambda p: not p&2 and isprime(((1<A361563_list = list(islice(A361563_gen(),7)) # Chai Wah Wu, Mar 21 2023
A109138
Numbers n such that 2^n + 2 is an admirable number (A111592).
Original entry on oeis.org
6, 8, 12, 14, 18, 20, 24, 32, 44, 62, 80, 102, 128, 168, 192, 200, 314, 348, 702
Offset: 1
a(3)=12 because 2^12 + 2 = 4098 and 1+2+3+683+1366+2049-6 = 4098.
-
fQ[n_] := Block[{d = Most[ Divisors[n]], k = 1}, l = Length[d]; s = Plus @@ d; While[k < l && s - 2d[[k]] > n, k++ ]; If[k > l || s != n + 2d[[k]], False, True]]; Do[ If[ fQ[2^n + 2], Print[n]], {n, 200}] (* Robert G. Wilson v, Aug 30 2005 *)
A127959
Nonprime numbers of the form 1 + Sum_{k=1..m} 2^(2*k - 1).
Original entry on oeis.org
171, 10923, 699051, 11184811, 44739243, 178956971, 2863311531, 11453246123, 45812984491, 183251937963, 733007751851, 11728124029611, 46912496118443, 187649984473771, 750599937895083, 3002399751580331, 12009599006321323
Offset: 1
-
a = {}; Do[c = 1 + Sum[2^(2n - 1), {n, 1, x}]; If[PrimeQ[c] == False, AppendTo[a, c]], {x, 1, 50}]; a
Select[Table[Sum[2^(2k-1),{k,n}]+1,{n,50}],!PrimeQ[#]&] (* Harvey P. Dale, Dec 23 2017 *)
A185343
Least positive number k such that k*p+1 divides 2^p+1 where p is prime(n), or 0 if no such number exists.
Original entry on oeis.org
2, 0, 2, 6, 62, 210, 2570, 9198, 121574, 2, 23091222, 48, 2, 68186767614, 6, 2, 48, 12600235023025650, 109368, 794502, 24, 2550476412689091085878, 6, 2, 10, 8367330694575771627040945250, 4030501264, 6, 955272, 2, 446564785985483547852197647548252246, 8, 8, 32424, 8
Offset: 1
2^3+1 = 9 has no factor of the form k*3+1 except 1, so a(primepi(3)) = a(2) = 0.
2^29+1 = 536870913 has factor 2*29+1=59, so a(primepi(29)) = a(10) = 2.
-
f:= proc(n) local p,F;
p:= ithprime(n);
F:= select(t -> t mod p = 1, numtheory:-divisors(2^p+1) minus {1});
if F = {} then 0 else (min(F)-1)/p; fi
end proc:
map(f, [$1..50]); # Robert Israel, Jul 17 2023
-
Table[q = First /@ FactorInteger[2^p + 1]; s = Select[q, Mod[#1, p] == 1 &, 1]; If[s == {}, 0, (s[[1]] - 1)/p], {p, Prime[Range[30]]}]
A215937
Numbers n such that 2^n + 1 can be written in the form a^2 + 5*b^2.
Original entry on oeis.org
2, 3, 7, 10, 11, 19, 23, 31, 43, 47, 50, 58, 71, 79, 82, 107, 127, 167, 178, 179, 191, 199, 250, 290, 298, 311, 347, 359, 410, 487, 563, 599, 683, 751, 802, 890, 907, 1051
Offset: 1
3 is in the sequence because 2^3 + 1 = 9 can be written as 2^2 + 5 * 1^2 = 9.
-
for(i=2, 500, a=factorint(2^i+1)~; has=0; for(j=1, #a, if(((a[1, j]%20>10)||(i%4<2))&&a[2, j]%2==1, has=1; break)); if(has==0, print(i",")))
-
for(i=2, 500, a=factorint(2^i+1)~; flag=0; flip=0; for(j=1, #a, if(((a[1, j]%20>10))&&a[2, j]%2==1, flag=1); if(((a[1, j]%20==2)||(a[1, j]%20==3)||(a[1, j]%20==7))&&a[2, j]%2==1, flip=flip+1)); if(flag==0&&flip%2==0, print(i",")))
Terms corrected by
V. Raman, Sep 20 2012
A216550
Numbers n such that (2^n+1)/3 is prime and can be written in the form a^2 + 3*b^2.
Original entry on oeis.org
7, 13, 19, 31, 43, 61, 79, 127, 199, 313, 2617, 10501, 12391, 14479, 138937, 141079, 986191
Offset: 1
A216551
Numbers n such that (2^n+1)/3 is prime, but cannot be written in the form a^2 + 3*b^2.
Original entry on oeis.org
5, 11, 17, 23, 101, 167, 191, 347, 701, 1709, 3539, 5807, 10691, 11279, 42737, 83339, 95369, 117239, 127031, 267017, 269987, 374321, 4031399
Offset: 1
A243979
Indices of Wagstaff primes.
Original entry on oeis.org
2, 5, 14, 124, 399, 4552, 15898, 203095, 37029521, 105973558438, 19140185454656173, 3827634977577891833517
Offset: 1
For n = 3 the third Wagstaff prime is A000979(3) = 43 and 43 is also the 14th prime number, so a(3) = 14.
- Andrew R. Booker, The Nth Prime Page.
- Chris K. Caldwell, Wagstaff, The Top Twenty, The PrimePages.
- Xavier Gourdon and Pascal Sebah, Counting primes.
- Tomás Oliveira e Silva, Tables of values of pi(x) and of pi2(x).
- Samuel S. Wagstaff, Jr., The Cunningham Project.
- Kim Walisch, Fast C++ prime counting function implementation (primecount).
- Wikipedia, Wagstaff prime.
-
default(primelimit, 10^9); forprime(p=3, 31, q=(2^p+1)/3; if(isprime(q), print1(primepi(q)", "))) \\ Jens Kruse Andersen, Jun 22 2014
a(12) calculated using Kim Walisch's primecount and added by
Amiram Eldar, Sep 05 2024
Comments