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

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

A156541 Multiplicative closure of Sophie Germain primes (A005384).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 15, 16, 18, 20, 22, 23, 24, 25, 27, 29, 30, 32, 33, 36, 40, 41, 44, 45, 46, 48, 50, 53, 54, 55, 58, 60, 64, 66, 69, 72, 75, 80, 81, 82, 83, 87, 88, 89, 90, 92, 96, 99, 100, 106, 108, 110, 113, 115, 116, 120, 121, 123, 125, 128, 131, 132
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 10 2009

Keywords

Comments

A156542(a(n)) = A001221(a(n));
Subsequence of A130176.

Crossrefs

Programs

  • Mathematica
    Select[Range@132, And @@ PrimeQ[FactorInteger[#][[All, 1]]*2 + 1] &] (* Ivan Neretin, Aug 30 2015 *)

A172037 Prime partial sums of Sophie Germain primes A005384.

Original entry on oeis.org

2, 5, 73, 167, 2423, 7621, 39233, 50969, 89563, 198139, 207029, 267143, 322963, 335117, 438517, 481207, 541547, 812051, 874697, 917611, 939293, 1077761, 1149593, 1354267, 1464011, 1695559, 1880401, 2510083, 2548703, 3115249, 3157487, 3505849, 4519057
Offset: 1

Views

Author

Jonathan Vos Post, Jan 23 2010

Keywords

Comments

a(1) and a(2) are themselves Sophie Germain primes.

Examples

			a(1) = 2 = first Sophie Germain prime A005384(1). a(2) = 5 = sum of first two Sophie Germain primes = 2+3. a(3) = 73 = sum of first six Sophie Germain primes = 2+3+5+11+23+29.
		

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Select[Prime[Range[5000]],PrimeQ[2#+1]&]],PrimeQ] (* Harvey P. Dale, Nov 27 2013 *)

Formula

A000040 INTERSECTION A066819 = {p such that p is prime and SUM[i=1..k]A005384(k) is prime} = {p such that p is prime and SUM[i=1..k]{p is prime and 2p+1 is prime}.}.

Extensions

a(7) - a(34) from Nathaniel Johnston, Apr 29 2011

A074259 Gaps between primes p such that 2p+1 is also prime, i.e., Sophie-Germain primes A005384.

Original entry on oeis.org

1, 2, 6, 12, 6, 12, 12, 30, 6, 24, 18, 42, 6, 12, 42, 6, 12, 30, 12, 66, 60, 12, 12, 48, 18, 84, 48, 12, 6, 24, 36, 24, 18, 48, 102, 42, 60, 6, 12, 18, 54, 120, 6, 60, 120, 30, 12, 30, 18, 12, 48
Offset: 1

Views

Author

Jon Perry, Sep 20 2002

Keywords

Comments

The first two consecutive identical gaps are 12, 12 between A005384(6..8) = (29, 41, 53).
The first three, four and five identical gaps in a row are equal to 30, 150 and 420, respectively, and occur after A005384(85) = 3299, A005384(29952) = 4866623, and A005384(32361449747) = 22081407211439. These were found by N. Fernandez and G. Resta, see link to discussion on the SeqFan mailing list. - M. F. Hasler, Sep 18 2016

Crossrefs

First differences of A005384.

Programs

  • Mathematica
    Select[Prime[Range[500]],PrimeQ[2#+1]&]//Differences (* Harvey P. Dale, Jul 15 2019 *)
  • PARI
    c=0; forprime(p=1+L=2,10^6,if(isprime(2*p+1),write("primegap.txt",c++," "p-L); L=p)) \\ Edited by M. F. Hasler, Sep 16 2016

Extensions

Edited (name, offset, more terms) by M. F. Hasler, Sep 16 2016

A099108 Numbers n such that A005382(n) + A005384(n) - 1 and A005382(n) + A005384(n) + 1 are twin primes.

Original entry on oeis.org

3, 4, 8, 11, 18, 19, 21, 40, 44, 53, 59, 73, 82, 100, 104, 107, 108, 118, 125, 127, 135, 148, 156, 161, 171, 181, 184, 185, 199, 214, 215, 232, 237, 240, 242, 267, 277, 283, 286, 292, 305, 317, 326, 330, 346, 350, 351, 377, 379, 381, 403, 405, 406, 425, 438
Offset: 1

Views

Author

Pierre CAMI, Sep 27 2004

Keywords

Comments

1 and 2 are excluded as being trivial solutions ( A005382(1)=A005384(1) and A005382(2)=A005384(2) ).

Crossrefs

A099109 Primes A005382(n) + A005384(n) - 1 with a twin prime A005382(n) + A005384(n) + 1.

Original entry on oeis.org

11, 29, 149, 311, 617, 659, 857, 2309, 2687, 3671, 4241, 5651, 6569, 8429, 9011, 9281, 9341, 10709, 11549, 11717, 12539, 14321, 15359, 15971, 17291, 18539, 19139, 19211, 21377, 23627, 23909, 26261, 26729, 27479, 27749, 31151, 32801, 33749, 34469
Offset: 1

Views

Author

Pierre CAMI, Sep 27 2004

Keywords

Comments

3 and 5 are excluded as being trivial solutions.

Crossrefs

For n values see A099108

A173897 a(n) is the number of Sophie Germain primes (A005384) between prime(n)^2 and prime(n+1)^2.

Original entry on oeis.org

1, 2, 2, 4, 1, 7, 2, 5, 9, 2, 8, 9, 2, 10, 12, 12, 4, 16, 7, 6, 14, 11, 19, 16, 10, 6, 11, 9, 11, 49, 11, 18, 6, 43, 10, 21, 18, 15, 25, 21, 7, 43, 11, 19, 12, 53, 55, 18, 9, 20, 35, 9, 50, 31, 32, 28, 4, 38, 23, 15, 65, 74, 17, 12, 27, 90, 38, 63, 13, 29, 38, 51, 46, 39, 27, 38, 47, 28
Offset: 1

Views

Author

Jaspal Singh Cheema, Mar 01 2010

Keywords

Comments

If you graph a(n) versus n, an interesting pattern emerges. As you go farther along the n-axis, greater are the number of Sophie Germain primes, on average, within each interval obtained. The smallest count of 1 occurs twice: between squares of (2,3) and (11,13). I suspect the number of Sophie Germain primes within each interval will never be zero. If one could prove that there is at least 1 Sophie Germain prime within each interval, this would imply that Sophie Germain primes are infinite.

Examples

			For n = 1, we consider the interval [2^2, 3^2], within which is one Sophie Germain prime, 5. Thus a(1) = 1.
		

Crossrefs

Cf. A005384.
Cf. A069482 (prime(n+1)^2 - prime(n)^2). - Zak Seidov, Sep 04 2016

Programs

  • PARI
    is_a005384(n) = ispseudoprime(2*n+1)
    a(n) = my(i=0); forprime(q=prime(n)^2, prime(n+1)^2, if(is_a005384(q) && q < prime(n+1)^2, i++)); i \\ Felix Fröhlich, Sep 04 2016
  • Sage
    A173897 = lambda n: len([p for p in prime_range(nth_prime(n)**2, nth_prime(n+1)**2) if is_prime(2*p+1)]) # D. S. McNeil, Dec 02 2010
    

Extensions

Edited by D. S. McNeil, Dec 02 2010

A276821 First of n consecutive Sophie Germain primes (A005384: such that 2p+1 is also prime) in arithmetic progression.

Original entry on oeis.org

2, 2, 29, 3299, 4866623, 22081407211439
Offset: 1

Views

Author

M. F. Hasler, Sep 18 2016

Keywords

Comments

The corresponding safe primes 2p+1 (A005385) are again the first in that sequence to have the same property.
Terms a(5) and a(6) were given, respectively, by Neil Fernandez and Giovanni Resta, on the SeqFan mailing list, cf. links.

Examples

			The first two consecutive identical gaps between Sophie Germain primes are 12 and 12 which occur between A005384(6..8) = (29, 41, 53), therefore a(3) = 29.
The first three consecutive identical gaps between Sophie Germain primes are equal to 30 and occur between A005384(85..88) = (3299, 3329, 3359, 3389), therefore a(4) = 3299.
The first four consecutive identical gaps between Sophie Germain primes are equal to 150 and occur between A005384(29952..29956) = (4866623, 4866773, 4866923, 4867073, 4867223), therefore a(5) = 4866623.
The first five consecutive identical gaps between Sophie Germain primes are equal to 420 and occur between A005384(32361449747..32361449752) = (22081407211439, 22081407211859, 22081407212279, 22081407212699, 22081407213119, 22081407213539), therefore a(6) = 22081407211439.
For n=1 and n=2, a(n) is equal to the smallest Sophie Germain prime, A005384(1) = 2, which is the first of two terms (and also one term) "in arithmetic progression" (which means not any restriction for a single term or any two subsequent terms).
		

Crossrefs

Cf. A005384 (Sophie Germain primes), A074259 (gaps between SG primes), A005385 (safe primes: 2p+1 for SG primes p).

A333084 a(n) equals the smallest Sophie Germain prime q such that pi_(p,2p+1)(q,10,(1,3)) - pi_(p,2p+1)(q,10,(3,1)) = n, where pi_(p,2p+1)(q,10,(b,c)) equals the number of Sophie Germain primes A005384(i) such A005384(i) <= q and (A005384(i),A005384(i+1)) == (b,c) (mod 10).

Original entry on oeis.org

11, 41, 191, 281, 431, 2351, 2741, 31721, 32561, 34631, 35291, 36821, 37181, 60761, 62591, 62981, 63671, 64301, 65171, 196541, 238691, 239201, 241781, 244301, 246731, 255191, 310181, 311021, 358331, 358901, 360611, 361481, 363491, 374771, 376241, 427991
Offset: 1

Views

Author

A.H.M. Smeets, Mar 07 2020

Keywords

Comments

Except for the Sophie Germain primes 2 and 5, all Sophie Germain primes have either 1, 3 or 9 as least significant digit. Excluding 2 and 5, we start at 11. The sequence of the least significant digits of these prime numbers, i.e., A005384, travels to the following graph
Start -> (1)-----(3)
\ /
\ /
\ /
(9) .
Pairs (A005384(i) mod 10, A005384(i+1) mod 10) denote the edges, and the trajectory prefers to travel in this graph in clockwise direction as is shown here. Term a(n), for n > 0, is the least Sophie Germain prime where the (n-1)-th net clockwise cycle has been completed and the Sophie Germain prime next to a(n) has 3 as least significant digit. The start is at vertex (1) in the graph, due to the fact that the first Sophie Germain prime after 2, 3 and 5 is 11, i.e., a(1) = 11.
pi_(p,2p+1)(x;10,(1,3)) is the number of outgoing arrows from vertex (1) in clockwise direction in the graph; pi_(p,2p+1)(x;10,(3,1)) is the number of outgoing arrows from vertex (1) in counterclockwise direction in the graph.
For other prime pairs, like prime twins with vertices (1), (7) and (9) for the lesser of a twin pair and clockwise defined by the order (1) -> (7) -> (9), it seems that their trajectories prefer clockwise cycles through similar graphs too, so an open question is, "is the clockwise preference always the case for prime constellation pairs?"

Examples

			The sequence starts at 11 so a(1) = 11, because the next Sophie Germain prime after 11 is 23. For 41 the first clockwise cycle is completed, and the next Sophie Germain prime after 41 is 43, so a(2) = 41. For 131 the number of net clockwise cycles is returned to 0, so 131 is not in the sequence. For 191, the number of net clockwise cycles becomes 2, while the next Sophie Germain prime after 191 is 233, so a(3) = 191.
		

Crossrefs

Cf. A005384.

Programs

  • Mathematica
    togo = 35; mx = togo; T = 0 Range[++togo]; T[[1]] = 11; c = 0; q = 17; While[togo > 1, p=q; While[! PrimeQ[2 (q = NextPrime[q]) + 1]]; t = Mod[{p, q}, 10]; If[t == {3, 1}, c--]; If[t == {1, 3}, c++]; If[0 <= c <= mx && T[[c + 1]] == 0, togo--; T[[c + 1]] = p]]; T (* Giovanni Resta, May 07 2020 *)
  • Python
    def IsPrime(n):
        if n < 2:
            return 0
        elif n == 2 or n == 3:
            return 1
        elif n%2 == 0 or n%3 == 0:
            return 0
        else:
            d, dd = 5, 2
            while d*d <= n and n%d != 0:
                d, dd = d+dd, 6-dd
            if d*d <= n:
                return 0
            else:
                return 1
    p = 11
    ptry = p
    cycle = 0
    cmax = 0
    while cmax < 36:
        ptry = ptry+6
        if IsPrime(ptry) and IsPrime(2*ptry+1):
            pnext = ptry
            if p%10 == 1 and pnext%10 == 3:
                cycle = cycle+1
            if p%10 == 3 and pnext%10 == 1:
                cycle = cycle-1
            if cycle > cmax:
                print(cycle, p)
                cmax = cycle
            p = pnext

Formula

n = pi_(p,2p+1)(a(n);10,(1,3)) - pi_(p,2p+1)(a(n);10,(3,1)).
n-1 = pi_(p,2p+1)(a(n);10,(3,9)) - pi_(p,2p+1)(a(n);10,(9,3)).
n-1 = pi_(p,2p+1)(a(n);10,(9,1)) - pi_(p,2p+1)(a(n);10,(1,9)).

A360757 Numbers k for which the arithmetic derivative of k is a Sophie Germain prime (A005384).

Original entry on oeis.org

6, 42, 154, 182, 222, 231, 286, 357, 434, 442, 455, 483, 582, 595, 645, 690, 742, 762, 770, 806, 861, 906, 969, 987, 994, 1045, 1066, 1086, 1122, 1162, 1463, 1534, 1547, 1554, 1582, 1738, 1742, 1771, 1798, 1869, 1905, 2065, 2121, 2193, 2265, 2274, 2282, 2365
Offset: 1

Views

Author

Marius A. Burtea, Mar 01 2023

Keywords

Examples

			6' = 5 is prime and 2*6' + 1 = 2*5 + 1 = 11 is prime, so 6 is a term.
42' = 41 is prime and 2*42' + 1 = 2*41 + 1 = 83 is prime, so 42 is a term.
		

Crossrefs

Subsequence of A157037.

Programs

  • Magma
    f:=func; [p:p in [1..2500]| IsPrime(Floor(f(p))) and IsPrime(2*Floor(f(p))+1) ];
  • Maple
    filter:= proc(n) local np,t;
      np:= n*add(t[2]/t[1], t = ifactors(n)[2]);
      isprime(np) and isprime(2*np+1)
    end proc:
    select(filter, [$1..3000]); # Robert Israel, Mar 18 2023
  • Mathematica
    d[1] = 0; d[n_] := n * Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); Select[Range[2400], PrimeQ[d1 = d[#]] && PrimeQ[2*d1 + 1] &] (* Amiram Eldar, Mar 01 2023 *)
Showing 1-10 of 433 results. Next