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 36 results. Next

A053176 Primes p such that 2p+1 is composite.

Original entry on oeis.org

7, 13, 17, 19, 31, 37, 43, 47, 59, 61, 67, 71, 73, 79, 97, 101, 103, 107, 109, 127, 137, 139, 149, 151, 157, 163, 167, 181, 193, 197, 199, 211, 223, 227, 229, 241, 257, 263, 269, 271, 277, 283, 307, 311, 313, 317, 331, 337, 347, 349, 353, 367, 373, 379, 383
Offset: 1

Views

Author

Enoch Haga, Feb 29 2000

Keywords

Comments

Primes not in A005384 = non-Sophie Germain primes.
Also, numbers n such that odd part of A005277(n) is prime. Proof by John Renze, Sep 30 2004
Sequence gives primes p such that B(2p) has denominator 6, where B(2n) are the Bernoulli numbers. - Benoit Cloitre, Feb 06 2002
Sequence gives all n such that the equation phi(x)=2n has no solution. - Benoit Cloitre, Apr 07 2002
A010051(a(n))*(1-A156660(a(n))) = 1; subsequence of A138887. - Reinhard Zumkeller, Feb 18 2009
Mersenne prime exponents > 3 must be in the union of this sequence and (A002144). - Roderick MacPhee, Jan 12 2017

Examples

			17 is a term because 2*17 + 1 = 35 is composite.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(12200) | not IsPrime(2*p+1)]; // Vincenzo Librandi, Jun 18 2015
  • Mathematica
    Select[Prime[Range[1000]], ! PrimeQ[2 # + 1] &] (* Vincenzo Librandi, Jun 18 2015 *)
  • PARI
    list(lim)=select(p->!isprime(2*p+1),primes(primepi(lim))) \\ Charles R Greathouse IV, Jul 25 2011
    

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Feb 20 2012

A066170 Triangle read by rows: T(n,k) = (-1)^n*(-1)^(floor(3*k/2))*binomial(floor((n+k)/2),k), 0 <= k <= n, n >= 0.

Original entry on oeis.org

1, -1, 1, 1, -1, -1, -1, 2, 1, -1, 1, -2, -3, 1, 1, -1, 3, 3, -4, -1, 1, 1, -3, -6, 4, 5, -1, -1, -1, 4, 6, -10, -5, 6, 1, -1, 1, -4, -10, 10, 15, -6, -7, 1, 1, -1, 5, 10, -20, -15, 21, 7, -8, -1, 1, 1, -5, -15, 20, 35, -21, -28, 8, 9, -1, -1, -1, 6, 15, -35, -35, 56, 28, -36, -9, 10, 1, -1, 1, -6, -21, 35, 70, -56, -84, 36, 45, -10, -11
Offset: 0

Views

Author

Floor van Lamoen, Dec 14 2001

Keywords

Comments

The original name of this sequence was: Triangle giving coefficients of characteristic function of n X n matrix in which the left upper half and the antidiagonal are filled with 1's and the right lower half is filled with 0's. As was pointed out by L. Edson Jeffery this is only correct if we multiply each triangle row by (-1)^n. For the straightforward version of the coefficients of the characteristic polynomials see A187660. - Johannes W. Meijer, Aug 08 2011

Examples

			The table begins {1}; {-1, 1}; {1, -1, -1}; {-1, 2, 1, -1}; ...
The characteristic function of
( 1 1 1 )
( 1 1 0 )
( 1 0 0 )
is f(x) = x^3 - 2x^2 - x + 1, so the 3rd row is (-1)^3 times the f(x) coefficients, i.e., {-1; 2; 1; -1}.
		

References

  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", John Wiley and Sons, 2001 (Chapter 14)

Crossrefs

Cf. A007700, A059455, A065941. For another version see A030111.

Programs

  • Maple
    A066170 := proc(n,k): (-1)^n*(-1)^(floor(3*k/2))*binomial(floor((n+k)/2),k) end: seq(seq(A066170(n,k),k=0..n), n=0..11); // Johannes W. Meijer, Aug 08 2011
  • Mathematica
    Flatten[Table[(-1)^n*(-1)^Floor[3*k/2]*Binomial[Floor[(n+k)/2],k],{n,0,12}, {k,0,n}]] (* Indranil Ghosh, Feb 19 2017 *)

Formula

From L. Edson Jeffery, Mar 23 2011: (Start)
T(n,k) = (-1)^n*(-1)^(floor(3*k/2))*binomial(floor((n+k)/2),k);
T(n,k) = (-1)^n*A187660(n,k). (End)
From Johannes W. Meijer, Aug 08 2011: (Start)
abs(T(n,k)) = A046854(n,k) = abs(A108299(n,n-k))
abs(T(n,n-k)) = A065941(n,k). (End)

Extensions

More terms from Vladeta Jovovic, Jan 02 2002
Corrected and edited by Johannes W. Meijer, Aug 08 2011

A059452 Safe primes (A005385) that are not Sophie Germain primes.

Original entry on oeis.org

7, 47, 59, 107, 167, 227, 263, 347, 383, 467, 479, 503, 563, 587, 839, 863, 887, 983, 1187, 1283, 1307, 1319, 1367, 1487, 1523, 1619, 1823, 1907, 2027, 2099, 2207, 2447, 2579, 2879, 2999, 3119, 3167, 3203, 3467, 3947, 4007, 4079, 4127, 4139, 4259, 4283
Offset: 1

Views

Author

Labos Elemer, Feb 02 2001

Keywords

Comments

Except for 7, these primes are congruent to 11 modulo 12.
Terminal primes in complete Cunningham chains of first kind, i.e., the chains cannot be continued from these primes.

Examples

			347 is a term because 173 is a prime but 695 is not.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p-1)/2],If[ !PrimeQ[2*p+1],AppendTo[lst,p]]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jun 24 2009 *)
  • PARI
    is(p) = p > 2 && isprime(p) && isprime((p-1)/2) && !isprime(2*p+1); \\ Amiram Eldar, Jul 15 2024
  • Python
    from itertools import count, islice
    from sympy import isprime, prime
    def A059452_gen(): # generator of terms
        return filter(lambda p:isprime(p>>1) and not isprime(p<<1|1),(prime(i) for i in count(1)))
    A059452_list = list(islice(A059452_gen(),10)) # Chai Wah Wu, Jul 12 2022
    

Formula

A156659(a(n))*(1-A156660(a(n))) = 1. - Reinhard Zumkeller, Feb 18 2009

Extensions

Broken link updated by R. J. Mathar, Apr 12 2010

A059762 Initial primes of Cunningham chains of first type with length exactly 3. Primes in A059453 that survive as primes just two "2p+1 iterations", forming chains of exactly 3 terms.

Original entry on oeis.org

41, 1031, 1451, 1481, 1511, 1811, 1889, 1901, 1931, 3449, 3491, 3821, 3911, 5081, 5441, 5849, 6101, 6131, 7151, 7349, 7901, 8969, 9221, 10691, 10709, 11171, 11471, 11801, 12101, 12821, 12959, 13229, 14009, 14249, 14321, 14669, 14741, 15161
Offset: 1

Views

Author

Labos Elemer, Feb 20 2001

Keywords

Comments

Primes p such that {(p-1)/2, p, 2p+1, 4p+3, 8p+7} = {composite, prime, prime, prime, composite}.

Examples

			41 is a term because 20 and 325 are composites, and 41, 83, and 167 are primes.
		

Crossrefs

Programs

  • Mathematica
    ipccQ[n_]:=Module[{c=(n-1)/2},PrimeQ[NestList[2#+1&,c,4]]=={False, True, True, True, False}]; Select[Prime[Range[2000]],ipccQ] (* Harvey P. Dale, Nov 10 2014 *)

Extensions

Definition corrected by Alexandre Wajnberg, Aug 31 2005
Offset corrected by Amiram Eldar, Jul 15 2024

A059761 Initial primes of Cunningham chains of first type with length exactly 2. Primes in A059453 that survive as primes only one "2p-1 iteration", forming chains of exactly 2 terms.

Original entry on oeis.org

3, 29, 53, 113, 131, 173, 191, 233, 239, 251, 281, 293, 419, 431, 443, 491, 593, 641, 653, 659, 683, 743, 761, 809, 911, 953, 1013, 1049, 1103, 1223, 1289, 1499, 1559, 1583, 1601, 1733, 1973, 2003, 2069, 2129, 2141, 2273, 2339, 2351, 2393, 2399, 2543
Offset: 1

Views

Author

Labos Elemer, Feb 20 2001

Keywords

Comments

Primes p such that {(p-1)/2, p, 2p+1, 4p+3} = {composite, prime, prime, composite}.

Examples

			53 is a term because 26 and 215 are composites, and 53 and 107 are primes.
		

Crossrefs

Programs

  • Mathematica
    ccftQ[p_]:=Boole[PrimeQ[{(p-1)/2,p,2 p+1,4 p+3}]]=={0,1,1,0}; Select[ Prime[ Range[400]],ccftQ] (* Harvey P. Dale, Jun 19 2021 *)

A059763 Primes starting a Cunningham chain of the first kind of length 4.

Original entry on oeis.org

509, 1229, 1409, 2699, 3539, 6449, 10589, 11549, 11909, 12119, 17159, 19709, 19889, 22349, 26189, 27479, 30389, 43649, 55229, 57839, 60149, 71399, 74699, 75329, 82499, 87539, 98369, 101399, 104369, 112919, 122099, 139439, 148829, 166739
Offset: 1

Views

Author

Labos Elemer, Feb 20 2001

Keywords

Comments

Initial (unsafe) primes of Cunningham chains of first type with length exactly 4. Primes in A059453 that survive as primes just three "2p+1 iterations", forming chains of exactly 4 terms.
The definition indicates each chain is exactly 4 primes long (i.e., the chain cannot be a subchain of a longer one). That is why this sequence is different from A023272, which also gives primes included in longer chains ("starting" them or not).
Prime p such that {(p-1)/2, p, 2p+1, 4p+3, 8p+7, 16p+15} = {composite, prime, prime, prime, prime, composite}.

Examples

			1229 is a term because, through 2p+1, 1229 -> 2459 -> 4919 -> 9839 and the chain ends here since 2*9839 + 1 = 11*1789 is composite.
		

Crossrefs

Programs

  • Maple
    isA059763 := proc(p) local pitr,itr ; if isprime(p) then if isprime( (p-1)/2 ) then RETURN(false) ; else pitr := p ; for itr from 1 to 3 do pitr := 2*pitr+1 ; if not isprime(pitr) then RETURN(false) ; fi ; od: pitr := 2*pitr+1 ; if isprime(pitr) then RETURN(false) ; else RETURN(true) ; fi ; fi ; else RETURN(false) ; fi ; end: for i from 2 to 100000 do p := ithprime(i) ; if isA059763(p) then printf("%d,",p) ; fi ; od: # R. J. Mathar, Jul 23 2008

Extensions

Edited and extended by R. J. Mathar, Jul 23 2008, Aug 18 2008

A059764 Initial (unsafe) primes of Cunningham chains of first type with length exactly 5. Primes in A059453 that survive as primes just four "2p+1 iterations", forming chains of exactly 5 terms.

Original entry on oeis.org

2, 53639, 53849, 61409, 66749, 143609, 167729, 186149, 206369, 268049, 296099, 340919, 422069, 446609, 539009, 594449, 607319, 658349, 671249, 725009, 775949, 812849, 819509, 926669, 1008209, 1092089, 1132949, 1271849
Offset: 1

Views

Author

Labos Elemer, Feb 20 2001

Keywords

Comments

Primes p such that {(p-1)/2, p, 2p+1, 4p+3, 8p+7, 16p+15, 32p+31} = {nonprime, prime, prime, prime, prime, prime, composite}.

Examples

			2 is here because (2-1)/2 = 1/2 and 32*2+31 = 95 are not primes, while 2, 5, 11, 23, and 47 give a first-kind Cunningham chain of 5 primes which cannot be continued.
53639 is here because through <2p+1>, 53639 -> 107279 -> 214559 -> 429119 -> 858239 and the chain ends here (with this operator).
		

Crossrefs

Programs

  • Mathematica
    l5Q[n_]:=Module[{a=PrimeQ[(n-1)/2],b=PrimeQ[ NestList[2#+1&,n,5]]}, Join[{a},b]=={False,True,True,True,True,True,False}]; Select[Range[ 1300000],l5Q] (* Harvey P. Dale, Oct 14 2012 *)

Extensions

Definition corrected by Alexandre Wajnberg, Aug 31 2005
Entry revised by N. J. A. Sloane, Apr 01 2006

A059453 Sophie Germain primes (A005384) that are not safe primes (A005385).

Original entry on oeis.org

2, 3, 29, 41, 53, 89, 113, 131, 173, 191, 233, 239, 251, 281, 293, 419, 431, 443, 491, 509, 593, 641, 653, 659, 683, 743, 761, 809, 911, 953, 1013, 1031, 1049, 1103, 1223, 1229, 1289, 1409, 1451, 1481, 1499, 1511, 1559, 1583, 1601, 1733, 1811, 1889, 1901
Offset: 1

Views

Author

Labos Elemer, Feb 02 2001

Keywords

Comments

Except for 2 and 3 these primes are congruent to 5 or 11 modulo 12.
Introducing terms of Cunningham chains of first kind.

Examples

			89 is a term because (89-1)/2 = 44 is not prime, but 2*89 + 1 = 179 is prime.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[ !PrimeQ[(p-1)/2],If[PrimeQ[2*p+1],AppendTo[lst,p]]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jun 24 2009 *)
    Select[Prime[Range[300]],PrimeQ[2#+1]&&!PrimeQ[(#-1)/2]&] (* Harvey P. Dale, Nov 10 2017 *)
  • PARI
    is(p) = isprime(p) && isprime(2*p+1) && if(p > 2, !isprime((p-1)/2), 1); \\ Amiram Eldar, Jul 15 2024
  • Python
    from itertools import count, islice
    from sympy import isprime, prime
    def A059453_gen(): # generator of terms
        return filter(lambda p:not isprime(p>>1) and isprime(p<<1|1),(prime(i) for i in count(1)))
    A059453_list = list(islice(A059453_gen(),10)) # Chai Wah Wu, Jul 12 2022
    

Formula

A156660(a(n))*(1-A156659(a(n))) = 1. - Reinhard Zumkeller, Feb 18 2009

A059766 Initial (unsafe) primes of Cunningham chains of first type with length exactly 6.

Original entry on oeis.org

89, 63419, 127139, 405269, 810809, 1069199, 1178609, 1333889, 1598699, 1806089, 1958249, 2606069, 2848949, 3241289, 3339989, 3784199, 3962039, 4088879, 4444829, 4664249, 4894889, 4897709, 5132999, 5215499, 5238179, 6026309, 6059519, 6088529, 6490769, 6676259
Offset: 1

Views

Author

Labos Elemer, Feb 21 2001

Keywords

Comments

Special terms of A059453. Not identical to A023330 of which 1122659, 2164229, 2329469, ..., etc. are omitted since they have exact length 7 or larger.
Unsafe primes starting complete chains of length 6.

Examples

			89 is a term because (89-1)/2 = 44 and 64*89+63 = 5759 = 13*443 are composites, while 89, 179, 359, 719, 1439, and 2879 are primes.
1122659 is not a term because it initiates a chain of length 7.
4658939 is not a term because (4658939-1)/2 = 2329469 is prime. - _Sean A. Irvine_, Oct 09 2022
		

Crossrefs

Extensions

Entry revised by N. J. A. Sloane Apr 01 2006
a(12) onward corrected and extended by Sean A. Irvine, Oct 09 2022

A075712 Rearrangement of primes into Germain groups (or Cunningham chains).

Original entry on oeis.org

2, 5, 11, 23, 47, 3, 7, 13, 17, 19, 29, 59, 31, 37, 41, 83, 167, 43, 53, 107, 61, 67, 71, 73, 79, 89, 179, 359, 719, 1439, 2879, 97, 101, 103, 109, 113, 227, 127, 131, 263, 137, 139, 149, 151, 157, 163, 173, 347, 181, 191, 383, 193, 197, 199, 211, 223, 229, 233
Offset: 1

Views

Author

Zak Seidov, Oct 03 2002

Keywords

Comments

In each group, p(i+1) = 2*p(i)+1.
The groups are also known as Cunningham chains of the first kind.

Examples

			The groups are:
{2, 5, 11, 23, 47},
{3, 7},
{13},
{17},
{19},
{29, 59},
{31},
{37},
{41, 83, 167},
{43},
{53, 107},
{61},
{67},
{71},
{73},
{79},
{89, 179, 359, 719, 1439, 2879},
{97},
{101},
{103},
{109},
{113, 227},
{127},
{131, 263},
{137},
{139},
...
		

Crossrefs

See also A181697.
See A059456 for initial terms, A338945 for lengths.

Programs

  • Mathematica
    Block[{a = {2}, j = 1, k, p}, Do[k = j; If[PrimeQ@ a[[-1]], AppendTo[a, 2 a[[-1]] + 1], While[! FreeQ[a, Set[p, Prime[k]]], k++]; j++; Set[a, Append[a[[1 ;; -2]], p]]], 10^3]; a] (* Michael De Vlieger, Nov 17 2020 *)
  • PARI
    first(n) = my(res=List([2,5,11,23,47])); forprime(p=3, oo, if(!isprime((p-1)>>1), listput(res,p); c = 2*p+1; while(isprime(c), listput(res,c); c=2*c+1)); if(#res>n,return(res))); res \\ David A. Corneth, Nov 13 2021

Extensions

Edited by N. J. A. Sloane, Nov 13 2021
More terms from David A. Corneth, Nov 13 2021
Showing 1-10 of 36 results. Next