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.

Previous Showing 71-80 of 82 results. Next

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

Views

Author

Jorge Coveiro, Dec 31 2022

Keywords

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

Examples

			3 is a term because 3 is prime and (4^3 - 2^3 + 1)/3 = 19 is also prime.
		

Crossrefs

Cf. A000978.

Programs

  • 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

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

Views

Author

Jorge Coveiro, Mar 15 2023

Keywords

Comments

13347311 and 13372531 are also in the sequence, but may not be the next terms.

Crossrefs

Cf. A000978 (Wagstaff numbers), A002145 (primes of form 4*k+3), A112633, A361563.

Programs

  • 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<A361562_list = list(islice(A361562_gen(),10)) # Chai Wah Wu, Mar 21 2023

Formula

Intersection of A000978 and A002145.

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

Views

Author

Jorge Coveiro, Mar 15 2023

Keywords

Comments

15135397 is also in the sequence, but may not be the next term.

Crossrefs

Cf. A000978 (Wagstaff numbers), A002144 (primes of form 4*k + 1), A112634, A361562.

Programs

  • 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<A361563_list = list(islice(A361563_gen(),7)) # Chai Wah Wu, Mar 21 2023

Formula

Intersection of A000978 and A002144.

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

Views

Author

Jason Earls, Aug 18 2005

Keywords

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

Examples

			a(3)=12 because 2^12 + 2 = 4098 and 1+2+3+683+1366+2049-6 = 4098.
		

Crossrefs

Cf. A000978.

Programs

  • 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 *)

Extensions

More terms from David Wasserman, May 28 2008
a(19) from Amiram Eldar, Oct 12 2019

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

Views

Author

Artur Jasinski, Feb 09 2007

Keywords

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.

Crossrefs

Programs

  • 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 *)

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

Views

Author

Bill McEachen, Feb 26 2011

Keywords

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

Examples

			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.
		

Crossrefs

Programs

  • 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]]}]

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

Views

Author

V. Raman, Aug 27 2012

Keywords

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.

Examples

			3 is in the sequence because 2^3 + 1 = 9 can be written as 2^2 + 5 * 1^2 = 9.
		

Crossrefs

Cf. A020669, A033205 (numbers and primes of the form x^2 + 5*y^2).

Programs

  • 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",")))

Extensions

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

Views

Author

V. Raman, Sep 08 2012

Keywords

Comments

The exponent is congruent to 1 mod 3.

Crossrefs

Cf. A000978.

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

Views

Author

V. Raman, Sep 08 2012

Keywords

Comments

The exponent is congruent to 2 mod 3.

Crossrefs

Cf. A000978.

A243979 Indices of Wagstaff primes.

Original entry on oeis.org

2, 5, 14, 124, 399, 4552, 15898, 203095, 37029521, 105973558438, 19140185454656173, 3827634977577891833517
Offset: 1

Views

Author

Omar E. Pol, Jun 18 2014

Keywords

Examples

			For n = 3 the third Wagstaff prime is A000979(3) = 43 and 43 is also the 14th prime number, so a(3) = 14.
		

Crossrefs

Programs

  • 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

Formula

a(n) = A000720(A000979(n)).
A000040(a(n)) = A000979(n).

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
Previous Showing 71-80 of 82 results. Next