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-10 of 15 results. Next

A000979 Wagstaff primes: primes of form (2^p + 1)/3.

Original entry on oeis.org

3, 11, 43, 683, 2731, 43691, 174763, 2796203, 715827883, 2932031007403, 768614336404564651, 201487636602438195784363, 845100400152152934331135470251, 56713727820156410577229101238628035243, 62357403192785191176690552862561408838653121833643
Offset: 1

Views

Author

Keywords

Comments

Also, the primes with prime indices in the Jacobsthal sequence A001045.
Indices n such that (2^n + 1)/3 is prime are listed in A000978. - Alexander Adamchuk, Oct 03 2006
Primes in A126614. - Omar E. Pol, Nov 05 2013

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A010051; subsequence of A007583.

Programs

  • Haskell
    a000979 n = a000979_list !! (n-1)
    a000979_list = filter ((== 1) . a010051) a007583_list
    -- Reinhard Zumkeller, Mar 24 2013
    
  • Mathematica
    Select[ Array[(2^# + 1)/3 &, 190], PrimeQ] (* Vladimir Joseph Stephan Orlovsky, Apr 03 2010 *)
  • PARI
    forprime(p=2,10000,if(ispseudoprime(2^p\/3),print1(2^p\/3,","))) \\ Edward Jiang, Sep 05 2014
  • Python
    from gmpy2 import divexact
    from sympy import prime, isprime
    A000979 = [p for p in (divexact(2**prime(n)+1,3) for n in range(2,10**2)) if isprime(p)] # Chai Wah Wu, Sep 04 2014
    

A127936 Numbers k such that 1 + Sum_{i=1..k} 2^(2*i-1) is prime.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 11, 15, 21, 30, 39, 50, 63, 83, 95, 99, 156, 173, 350, 854, 1308, 1769, 2903, 5250, 5345, 5639, 6195, 7239, 21368, 41669, 47684, 58619, 63515, 69468, 70539, 133508, 134993, 187160, 493095
Offset: 1

Views

Author

Artur Jasinski, Feb 08 2007, Feb 09 2007

Keywords

Comments

If this sequence is infinite then so is A124401.
Equals A127965(n)/2.
The sum has the simple closed form 1 + 2/3*(4^n-1). - Stefan Steinerberger, Nov 24 2007
Terms beyond a(30) correspond to probable primes, cf. A000978. - M. F. Hasler, Aug 29 2008

Examples

			a(1)=1 because 1 + 2 = 3 is prime;
a(2)=2 because 1 + 2 + 2^3 = 11 is prime;
a(3)=3 because 1 + 2 + 2^3 + 2^5 = 43 is prime;
a(4)=5 because 1 + 2 + 2^3 + 2^5 + 2^7 + 2^9 = 683 is prime;
...
		

Crossrefs

Programs

Formula

a(n) = floor(A000978(n)/2) = ceiling(log(4)(A000979(n))); A000978(n) = 2 a(n) + 1; A000979(n) = (2*4^a(n)+1)/3. - M. F. Hasler, Aug 29 2008

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 11 2007
2 more terms from Stefan Steinerberger, Nov 24 2007
6 more terms from Dmitry Kamenetsky, Jul 12 2008
a(30)-a(40) calculated from A000978 by M. F. Hasler, Aug 29 2008

A127955 Composite numbers of the form (2^p+1)/3 where p is a prime.

Original entry on oeis.org

178956971, 45812984491, 733007751851, 46912496118443, 3002399751580331, 192153584101141163, 49191317529892137643, 787061080478274202283, 3148244321913096809131, 3223802185639011132549803
Offset: 1

Views

Author

Artur Jasinski, Feb 09 2007

Keywords

Comments

If p-1 is squarefree, the terms are overpseudoprimes (see A141232). - Vladimir Shevelev, Jul 15 2008

Crossrefs

Programs

  • Mathematica
    a = {}; Do[c = (2^Prime[x] + 1)/3; If[PrimeQ[c] == False, AppendTo[a, c]], {x, 2, 30}]; a
    Select[(2^Prime[Range[2,30]]+1)/3,CompositeQ] (* Harvey P. Dale, Feb 04 2015 *)

A127957 Numbers k such that (2^prime(k) + 1)/3 is composite.

Original entry on oeis.org

10, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89
Offset: 1

Views

Author

Artur Jasinski, Feb 09 2007

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[c = (2^Prime[x] + 1)/3; If[PrimeQ[c] == False, AppendTo[a, x]], {x, 2, 300}]; a
    Select[Range[2,100],!PrimeQ[(2^Prime[#]+1)/3]&] (* Harvey P. Dale, Nov 24 2013 *)
  • PARI
    isok(n) = (n!=1) && !isprime((2^prime(n)+1)/3); \\ Michel Marcus, Jul 07 2018

A127956 Prime numbers p such that (2^p+1)/3 is composite.

Original entry on oeis.org

29, 37, 41, 47, 53, 59, 67, 71, 73, 83, 89, 97, 103, 107, 109, 113, 131, 137, 139, 149, 151, 157, 163, 173, 179, 181, 193, 197, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 317, 331, 337, 349, 353, 359, 367, 373
Offset: 1

Views

Author

Artur Jasinski, Feb 09 2007

Keywords

Comments

If p-1 is squarefree, 2a(n) is the multiplicative order of 2 modulo every divisor d>1 of (2^p+1)/3. - Vladimir Shevelev, Jul 15 2008

Crossrefs

Programs

  • Mathematica
    a = {}; Do[c = (2^Prime[x] + 1)/3; If[PrimeQ[c] == False, AppendTo[a, Prime[x]]], {x, 2, 100}]; a
    Select[Prime[Range[2,100]],CompositeQ[(2^#+1)/3]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 07 2021 *)

A127958 Numbers x such that 1 + Sum_{k=1..n} 2^(2k-1) is not prime for n=1,2,...,x.

Original entry on oeis.org

4, 7, 10, 12, 13, 14, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 84, 85
Offset: 1

Views

Author

Artur Jasinski, Feb 09 2007

Keywords

Comments

Numbers x such that 1 + Sum_{k=1..n} 2^(2k-1) is prime for n=1,2,...,x gives A127936.

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + Sum[2^(2n - 1), {n, 1, x}]] == False, AppendTo[a, x]], {x, 1, 1000}]; a
  • PARI
    isok(x) = !isprime(1+sum(k=1, x, 2^(2*k-1))); \\ Michel Marcus, May 09 2018

A127962 Binary expansion of A000979(n).

Original entry on oeis.org

11, 1011, 101011, 1010101011, 101010101011, 1010101010101011, 101010101010101011, 1010101010101010101011, 101010101010101010101010101011, 101010101010101010101010101010101010101011
Offset: 1

Views

Author

Artur Jasinski, Feb 09 2007

Keywords

Crossrefs

Programs

  • Mathematica
    b[n_] := FromDigits[IntegerDigits[n, 2]]; b /@ Select[Table[(2^p + 1)/3, {p, Prime[Range[15]]}], PrimeQ] (* Amiram Eldar, Jul 23 2023 *)
  • Python
    from gmpy2 import divexact
    from sympy import prime, isprime
    A127962 = [int(bin(p)[2:]) for p in (divexact(2**prime(n)+1,3) for n in range(2,10**2)) if isprime(p)] # Chai Wah Wu, Sep 04 2014

Formula

a(n) = A007088(A000979(n)). - Amiram Eldar, Jul 23 2023

Extensions

Edited by N. J. A. Sloane, Jun 11 2007

A127963 Number of 1's in A127962(n).

Original entry on oeis.org

2, 3, 4, 6, 7, 9, 10, 12, 16, 22, 31, 40, 51, 64, 84, 96, 100, 157, 174, 351, 855, 1309, 1770, 2904, 5251, 5346, 5640, 6196, 7240, 21369, 41670, 47685, 58620, 63516, 69469, 70540, 133509, 134994, 187161, 493096, 2015700
Offset: 1

Views

Author

Artur Jasinski, Feb 09 2007

Keywords

Crossrefs

Programs

  • Mathematica
    b = {}; Do[c = 1 + Sum[2^(2n - 1), {n, 1, x}]; If[PrimeQ[c], AppendTo[b, c]], {x, 0, 1000}]; a = {}; Do[AppendTo[a, FromDigits[IntegerDigits[b[[x]], 2]]], {x, 1, Length[b]}]; d = {}; Do[AppendTo[d, DigitCount[a[[x]], 10, 1]], {x, 1, Length[a]}]; d (* Artur Jasinski, Feb 09 2007 *)
    DigitCount[#, 2, 1]& /@ Select[Table[(2^p + 1)/3, {p, Prime[Range[300]]}], PrimeQ] (* Amiram Eldar, Jul 23 2023 *)

Formula

a(n) = A000120(A000979(n)). - Michel Marcus, Nov 07 2013
a(n) = A007953(A127962(n)). - Amiram Eldar, Jul 23 2023

Extensions

a(22)-a(29) from Vincenzo Librandi, Mar 31 2012
a(30)-a(41) from Amiram Eldar, Jul 23 2023

A127964 Number of 0's in the binary expansion of A127962(n).

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 10, 14, 20, 29, 38, 49, 62, 82, 94, 98, 155, 172, 349, 853, 1307, 1768, 2902, 5249, 5344, 5638, 6194, 7238, 21367, 41668, 47683, 58618, 63514, 69467, 70538, 133507, 134992, 187159, 493094, 2015698
Offset: 1

Views

Author

Artur Jasinski, Feb 09 2007

Keywords

Comments

Apparently numbers k such that (2^(2*k+3)+1)/3 is prime. - James R. Buddenhagen, Apr 14 2011 [This is true. See the second formula. - Amiram Eldar, Oct 13 2024]

Crossrefs

Programs

  • Mathematica
    b = {}; Do[c = 1 + Sum[2^(2n - 1), {n, 1, x}]; If[PrimeQ[c], AppendTo[b, c]], {x, 0, 1000}]; a = {}; Do[AppendTo[a, FromDigits[IntegerDigits[b[[x]], 2]]], {x, 1, Length[b]}]; d = {}; Do[AppendTo[d, DigitCount[a[[x]], 10, 0]], {x, 1, Length[a]}]; d
    (Select[Prime[Range[200]], PrimeQ[(2^# + 1)/3] &] - 3)/2 (* Amiram Eldar, Oct 13 2024 *)

Formula

a(n) = A023416(A000979(n)). - Michel Marcus, Nov 07 2013
a(n) = (A000978(n)-3)/2. - Amiram Eldar, Oct 13 2024

Extensions

a(22)-a(29) from Vincenzo Librandi, Mar 31 2012
a(30)-a(41) from Amiram Eldar, Oct 13 2024

A127965 Number of bits in A127962(n).

Original entry on oeis.org

2, 4, 6, 10, 12, 16, 18, 22, 30, 42, 60, 78, 100, 126, 166, 190, 198, 312, 346, 700, 1708, 2616, 3538, 5806, 10500, 10690, 11278, 12390, 14478, 42736, 83338, 95368, 117238, 127030, 138936, 141078, 267016, 269986, 374320, 986190, 4031398
Offset: 1

Views

Author

Artur Jasinski, Feb 09 2007

Keywords

Crossrefs

Programs

  • Mathematica
    b = {}; Do[c = 1 + Sum[2^(2n - 1), {n, 1, x}]; If[PrimeQ[c], AppendTo[b, c]], {x, 0, 1000}]; a = {}; Do[AppendTo[a, FromDigits[IntegerDigits[b[[x]], 2]]], {x, 1, Length[b]}]; d = {}; Do[AppendTo[d, DigitCount[a[[x]], 10, 0]+DigitCount[a[[x]], 10, 1]], {x, 1, Length[a]}]; d

Formula

a(n) = A127964(n) + A127963(n).
a(n) = 1 + floor(log_2(A000979(n))) = 1 + floor(log_2(2^A000978(n)+1) - A020857) = A000978(n) - 1. - R. J. Mathar, Feb 01 2008

Extensions

a(22)-a(29) from Vincenzo Librandi, Mar 30 2012
a(30)-a(41) from Amiram Eldar, Oct 19 2024
Showing 1-10 of 15 results. Next