login
Search: a000978 -id:a000978
     Sort: relevance | references | number | modified | created      Format: long | short | data
Primes p such that (4^p - 2^p + 1)/3 is prime.
+10
1
3, 5, 7, 13, 29, 61, 383, 401, 1637, 1871, 36229, 44771, 44797, 75167
OFFSET
1,1
COMMENTS
Terms > 1871 correspond to probable primes.
Is 9 the only composite k such that (4^k - 2^k + 1)/3 is prime? Checked up to 20000. - Andrew Howroyd, Sep 10 2024
EXAMPLE
3 is a term because 3 is prime and (4^3 - 2^3 + 1)/3 = 19 is also prime.
PROG
(PARI) 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
CROSSREFS
Cf. A000978.
KEYWORD
nonn,more,hard
AUTHOR
Jorge Coveiro, Dec 31 2022
STATUS
approved
Wagstaff numbers that are of the form 4*k + 3.
+10
1
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,1
COMMENTS
13347311 and 13372531 are also in the sequence, but may not be the next terms.
FORMULA
Intersection of A000978 and A002145.
PROG
(Python)
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<<p)+1)//3), (prime(n) for n in count(2)))
A361562_list = list(islice(A361562_gen(), 10)) # Chai Wah Wu, Mar 21 2023
CROSSREFS
Cf. A000978 (Wagstaff numbers), A002145 (primes of form 4*k+3), A112633, A361563.
KEYWORD
nonn,more
AUTHOR
Jorge Coveiro, Mar 15 2023
STATUS
approved
Wagstaff numbers that are of the form 4*k + 1.
+10
1
5, 13, 17, 61, 101, 313, 701, 1709, 2617, 10501, 42737, 95369, 138937, 267017, 374321
OFFSET
1,1
COMMENTS
15135397 is also in the sequence, but may not be the next term.
FORMULA
Intersection of A000978 and A002144.
PROG
(Python)
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<<p)+1)//3), (prime(n) for n in count(2)))
A361563_list = list(islice(A361563_gen(), 7)) # Chai Wah Wu, Mar 21 2023
CROSSREFS
Cf. A000978 (Wagstaff numbers), A002144 (primes of form 4*k + 1), A112634, A361562.
KEYWORD
nonn,more
AUTHOR
Jorge Coveiro, Mar 15 2023
STATUS
approved
Numbers n such that 2^n + 2 is an admirable number (A111592).
+10
0
6, 8, 12, 14, 18, 20, 24, 32, 44, 62, 80, 102, 128, 168, 192, 200, 314, 348, 702
OFFSET
1,1
COMMENTS
For k > 1, A000978(k)+1 is a member. Are there any others? - David Wasserman, May 28 2008
No more terms below 1064. - Amiram Eldar, Oct 12 2019
EXAMPLE
a(3)=12 because 2^12 + 2 = 4098 and 1+2+3+683+1366+2049-6 = 4098.
MATHEMATICA
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 *)
CROSSREFS
Cf. A000978.
KEYWORD
nonn,more
AUTHOR
Jason Earls, Aug 18 2005
EXTENSIONS
More terms from David Wasserman, May 28 2008
a(19) from Amiram Eldar, Oct 12 2019
STATUS
approved
Nonprime numbers of the form 1 + Sum_{k=1..m} 2^(2*k - 1).
+10
0
171, 10923, 699051, 11184811, 44739243, 178956971, 2863311531, 11453246123, 45812984491, 183251937963, 733007751851, 11728124029611, 46912496118443, 187649984473771, 750599937895083, 3002399751580331, 12009599006321323
OFFSET
1,1
COMMENTS
Prime numbers of the form 1 + Sum_{k=1..m} 2^(2*n - 1) is A000979. Numbers x such that 1 + Sum_{k=1..m} 2^(2*n - 1) is prime for n=1,2,...,x is A127936. A127955 is probably a subset of the present sequence.
MATHEMATICA
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 *)
KEYWORD
nonn
AUTHOR
Artur Jasinski, Feb 09 2007
STATUS
approved
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.
+10
0
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,1
COMMENTS
Akin to A186283 except for 2^p+1 and restricted to primes.
The larger terms of this sequence occur for the primes p > 3 in sequence A000978. These large terms are (2^p-2)/(3p).
a(n) = 2 iff prime(n) is in A103579. - Robert Israel, Jul 17 2023
EXAMPLE
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.
MAPLE
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
MATHEMATICA
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]]}]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Bill McEachen, Feb 26 2011
STATUS
approved
Numbers n such that 2^n + 1 can be written in the form a^2 + 5*b^2.
+10
0
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,1
COMMENTS
These 2^n + 1 numbers can only have prime factors of the form 1 (mod 20) or 3 (mod 20) or 5 (mod 20) or 7 (mod 20) or 9 (mod 20) raised to an odd power, but their overall product 2^n+1 can only be 1 (mod 20) or 5 (mod 20) or 9 (mod 20). This statement is limited to odd numbers.
In general,
A number n can be written in the form a^2+5*b^2 if and only if n is 0,
or of the form 2^(2i) 5^j Prod_{p==1 or 9 mod 20} p^k Prod_{q==3 or 7 mod 20) q^(2m)
or of the form 2^(2i+1) 5^j Prod_{p==1 or 9 mod 20} p^k Prod_{q==3 or 7 mod 20) q^(2m+1),
for integers i,j,k,m, for primes p,q.
LINKS
Samuel S. Wagstaff, Jr., The Cunningham Project, Factorizations of 2^n-1, for odd n's < 1200
EXAMPLE
3 is in the sequence because 2^3 + 1 = 9 can be written as 2^2 + 5 * 1^2 = 9.
PROG
(PARI) 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", ")))
(PARI) 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", ")))
CROSSREFS
Cf. A020669, A033205 (numbers and primes of the form x^2 + 5*y^2).
KEYWORD
nonn
AUTHOR
V. Raman, Aug 27 2012
EXTENSIONS
Terms corrected by V. Raman, Sep 20 2012
STATUS
approved
Numbers n such that (2^n+1)/3 is prime and can be written in the form a^2 + 3*b^2.
+10
0
7, 13, 19, 31, 43, 61, 79, 127, 199, 313, 2617, 10501, 12391, 14479, 138937, 141079, 986191
OFFSET
1,1
COMMENTS
The exponent is congruent to 1 mod 3.
CROSSREFS
Cf. A000978.
KEYWORD
nonn
AUTHOR
V. Raman, Sep 08 2012
STATUS
approved
Numbers n such that (2^n+1)/3 is prime, but cannot be written in the form a^2 + 3*b^2.
+10
0
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,1
COMMENTS
The exponent is congruent to 2 mod 3.
CROSSREFS
Cf. A000978.
KEYWORD
nonn
AUTHOR
V. Raman, Sep 08 2012
STATUS
approved
Indices of Wagstaff primes.
+10
0
2, 5, 14, 124, 399, 4552, 15898, 203095, 37029521, 105973558438, 19140185454656173, 3827634977577891833517
OFFSET
1,1
LINKS
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.
Wikipedia, Wagstaff prime.
FORMULA
a(n) = A000720(A000979(n)).
A000040(a(n)) = A000979(n).
EXAMPLE
For n = 3 the third Wagstaff prime is A000979(3) = 43 and 43 is also the 14th prime number, so a(3) = 14.
PROG
(PARI) 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
KEYWORD
nonn,hard,more
AUTHOR
Omar E. Pol, Jun 18 2014
EXTENSIONS
a(11) from Jens Kruse Andersen, Jun 22 2014
a(12) calculated using Kim Walisch's primecount and added by Amiram Eldar, Sep 05 2024
STATUS
approved

Search completed in 0.059 seconds