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.

User: Jaspal Singh Cheema

Jaspal Singh Cheema's wiki page.

Jaspal Singh Cheema has authored 7 sequences.

A174167 Number of safe primes between squares of consecutive primes.

Original entry on oeis.org

2, 2, 1, 3, 1, 3, 2, 4, 4, 2, 7, 4, 1, 6, 3, 10, 1, 10, 6, 2, 10, 5, 12, 9, 9, 4, 6, 3, 9, 26, 6, 10, 5, 18, 4, 17, 11, 10, 17, 13, 3, 23, 3, 9, 6, 36, 32, 8, 6, 9, 15, 10, 22, 19, 18, 15, 7, 22, 15, 9, 31, 43, 13, 6, 14, 47, 25, 35, 10, 10, 21, 32, 23, 18, 9, 27, 34, 18, 32, 46, 3, 38, 12, 20
Offset: 1

Author

Jaspal Singh Cheema, Mar 10 2010

Keywords

Comments

If you graph n vs a(n), interesting patterns begin to emerge. As you go farther along the n-axis, greater are the number of Safe Primes, on average, within each interval obtained. The smallest count of 1 occurs 4 times (terms: 3rd, 5th, 13th, and 17th) in the sequence above. I suspect the number of Safe Primes within each interval will never be zero. If one could prove this, then it would imply that Safe Primes are infinite. Can you prove it?

Examples

			Take any pair of consecutive primes. Let us say the very first one (2,3). Square both terms to obtain an interval (4,9). Within this interval, there are two Safe Primes, namely 5 and 7. Hence the very first term of the sequence above is 2. Similarly, the next term, 2, refers to the two Safe Primes between squares of (3,5), or the interval (9,25), which are 11 and 23.
		

Crossrefs

Extensions

Edited by D. S. McNeil, Nov 17 2010

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

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

A171727 The number of twin prime pairs in the interval (p^2,p*q), where (p,q) runs over the twin prime pairs (A001359(n),A006512(n)).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 1, 3, 2, 2, 4, 7, 3, 3, 5, 7, 4, 4, 7, 6, 11, 9, 5, 11, 9, 9, 11, 10, 11, 9, 11, 11, 12, 11, 12, 18, 12, 12, 16, 11, 16, 20, 14, 16, 15, 20, 16, 22, 13, 22, 16, 17, 21, 20, 20, 23, 22, 23, 20, 21, 21, 26, 20, 28, 24, 24, 23, 24, 25, 21, 24, 37, 27, 21, 28, 24, 31
Offset: 1

Author

Jaspal Singh Cheema, Dec 16 2009

Keywords

Comments

If you graph the order of the twin primes along the x-axis (i.e., first twin, second, third, ...) and the number of twins in the sequence given above along the y-axis, a clear pattern emerges. As you go farther along the x-axis, the number of twin primes, on average, within the interval increases. The pattern appears to be nonlinear. If one could prove that there's at least one twin prime within each interval, the twin prime conjecture would be proved since the n-th twin produces larger intervals with more twin primes. The evidence seems overwhelming.

Examples

			The first twin prime pair (3,5) corresponds to the interval (9,15), which contains one twin prime pair (11,13), so a(1) = 1.
The fifth twin prime pair (29,31) corresponds to the interval (841,899), which contains the twin prime pairs (857,859) and (881,883), so a(5) = 2.
		

References

  • C. C. Clawson, Mathematical Mysteries: The Beauty and Magic of Numbers, Perseus Books, 1999.
  • J. Derbyshire, Prime Obsession: Bernhard Riemann and the Greatest Unsolved Problem in Mathematics, Penguin Books Canada Ltd., 2004.
  • M. du Sautoy, The Music of the Primes: Searching to Solve the Greatest Mystery in Mathematics, HarperCollins Publishers Inc., 2004.

Crossrefs

Programs

  • PARI
    {for(k=1, 300, if(prime(k+1)-prime(k)==2, my(c=0); forprime(m=prime(k)^2, prime(k)*prime(k+1), c+=isprime(m+2)); print1(c, ", ")))} \\ Zhandos Mambetaliyev, Mar 28 2021

Extensions

Partially edited by Michel Marcus, Mar 19 2013
Edited by Charlie Neder, Feb 12 2019

A174222 Number of symmetric primes in the interval [prime(n)^2, prime(n)*prime(n+1)].

Original entry on oeis.org

1, 2, 2, 6, 4, 7, 5, 10, 18, 6, 24, 18, 10, 21, 35, 29, 14, 33, 27, 14, 44, 32, 43, 64, 36, 16, 36, 17, 38, 133, 41, 71, 16, 123, 21, 71, 72, 49, 90, 85, 36, 158, 34, 66, 31, 190, 184, 73, 39, 73, 109, 33, 188, 109, 117, 110, 35, 126, 85, 36, 221, 298, 99, 41, 95, 320, 136, 237
Offset: 1

Author

Jaspal Singh Cheema, Mar 18 2010

Keywords

Comments

If you graph a(n) vs. n, an interesting pattern with random-looking fluctuations begins to emerge.
As you go farther along the n-axis, greater are the number of symmetric primes, on average.
The smallest count of a(.)=1 occurs only once at the very beginning.
I suspect all a(n) are > 0. If one could prove this, it would imply that Symmetric primes are infinite.

Examples

			The square of the first prime is 2^2=4 and the product of the first and second prime is 2*3=6. Within this interval, there is 1 symmetric prime, which is 5. Hence a(1)=1.
The second term, a(2)=2, refers to the two symmetric primes 11 and 13 within the interval (9,15).
		

Crossrefs

Programs

  • PARI
    issym(p) = fordiv(p-1, d, if(isprime(p-d) || isprime(p+d), return(1))); 0; \\ A090190
    a(n) = my(p=prime(n), nb=0); forprime(q=p^2, p*nextprime(p+1), if (issym(q), nb++)); nb; \\ Michel Marcus, Nov 03 2022

Formula

#{ A090190(j): A001248(n) < A090190(j) < A006094(n)}.

Extensions

Edited by R. J. Mathar, Mar 31 2010

A172483 a(n) is the number of cousin primes between p^2 and p*(p+4) where p is the n-th cousin prime A023200(n).

Original entry on oeis.org

2, 1, 1, 2, 5, 4, 4, 2, 6, 4, 7, 7, 5, 9, 12, 13, 14, 14, 9, 12, 10, 11, 13, 20, 16, 15, 16, 15, 23, 19, 22, 26, 27, 28, 26, 22, 20, 27, 25, 27, 28, 26, 35, 29, 29, 29, 30, 45, 30, 36, 22, 30, 39, 39, 40, 44, 44, 43, 34, 38, 36, 48, 54, 43, 38, 43, 49, 45, 47, 53, 38, 51, 51, 62, 56
Offset: 1

Author

Jaspal Singh Cheema, Feb 04 2010

Keywords

Comments

If you graph the order of the consecutive cousin primes along the x-axis (i.e., first pair of cousin primes, second, third,...) and the number of cousin primes in the sequence given above along the y-axis, a clear pattern emerges. As you go farther along the x-axis, greater are the number of consecutive cousin primes, on average, within the interval obtained. If one can prove that there's at least one consecutive cousin prime within each interval, this would imply that cousin primes are infinite. I suspect the number of consecutive primes within each interval will never be zero. Can you prove it?

Examples

			The 1st pair of cousin primes is (3, 7), between 3^2=9 and 3*7=21 there is 2 cousin primes: 13 and 19. So a(1) = 2.
The 2nd pair of cousin primes is (7, 11), between 7^2=49 and 7*11=77 there is 1 cousin prime: 67. So a(2) = 1.
		

References

  • C. C. Clawson, Mathematical Mysteries: The Beauty and Magic of Numbers, Perseus Books, 1999.
  • M. D. Sautoy, The Music of the Primes: Searching to Solve the Greatest Mystery in Mathematics, HarperCollins Publishers Inc., 2004.

Crossrefs

Programs

  • PARI
    vcp(nn) = my(list=List(), p=3); listput(list, p); p=7; forprime(q=11, nn, if(q-p==4, listput(list, p)); p=q); Vec(list); \\ A023200
    nbcp(p) = my(nb=0); forprime(q=p^2, p*(p+4), if (isprime(q+4), nb++)); nb;
    lista(nn) = my(v=vcp(nn)); vector(#v, n, nbcp(v[n])); \\ Michel Marcus, Nov 02 2022

Extensions

New name and a(1)=2 prepended by Michel Marcus, Nov 02 2022

A174220 Number of regular primes between p^2 and p*q, where p and q are consecutive primes.

Original entry on oeis.org

1, 2, 2, 4, 3, 8, 2, 6, 8, 5, 22, 15, 7, 10, 23, 21, 6, 26, 19, 7, 34, 18, 33, 38, 27, 18, 27, 12, 30, 95, 29, 59, 14, 79, 11, 59, 58, 37, 61, 59, 23, 96, 22, 43, 19, 131, 143, 50, 31, 55, 84, 30, 134, 86, 88, 77, 24, 87, 60, 28, 162, 227, 73, 37, 55, 248, 104, 174, 39, 65, 104, 143
Offset: 1

Author

Jaspal Singh Cheema, Mar 12 2010

Keywords

Comments

If you graph a(n) versus n, an interesting pattern with random-looking fluctuations emerges.
As you go farther along the n-axis, greater are the number of regular primes, on average, within each interval obtained.
The smallest count of 1 occurs only once at the very beginning.
I suspect all numbers in this sequence are > 0.
If one could prove that there is at least 1 regular prime within each interval, this would imply that regular primes are infinite.
This would be very significant since "Kummer was able to prove Fermat's Last Theorem in the case where the exponent is a regular prime, a result that prior to Wiles's recent work was the only demonstration of Fermat's Last Theorem for a large class of exponents." (see Jao link).

Examples

			Take any pair of consecutive primes. Say the first (2,3). Square the first term, and then take the product of the two to obtain an interval (4,6). Within this interval, there is 1 regular prime, which is 5. Hence the very first term of the sequence above is 1. Similarly, the second term, 2, refers to the two regular primes 11 and 13.
		

Crossrefs

Programs

  • PARI
    has(p)=forstep(k=2, p-3, 2, if(numerator(bernfrac(k))%p==0, return(0))); 1
    a(n,p=prime(n))=my(q=nextprime(p+1),s); forprime(r=p^2,p*q, if(has(r), s++)); s \\ Charles R Greathouse IV, Nov 02 2022

Formula

Used the table of irregular primes by T.D. Noe in A000928 to extract a longer list of regular primes from a list of odd primes.

Extensions

New name from Charles R Greathouse IV, Nov 02 2022

A173198 Number of pairs of sexy consecutive primes between (A031924(n))^2 and A031924(n)*A031925(n).

Original entry on oeis.org

10, 10, 12, 8, 11, 14, 12, 15, 18, 19, 21, 21, 25, 31, 19, 23, 32, 29, 27, 28, 43, 36, 36, 35, 42, 51, 52, 46, 43, 53, 45, 55, 41, 55, 51, 46, 71, 52, 66, 60, 54, 62, 75, 66, 56, 67, 91, 65, 78, 75, 77, 97, 62, 80, 90, 81, 68, 78, 89, 99, 86, 90, 98, 98, 106, 96, 90, 84, 105, 89
Offset: 1

Author

Jaspal Singh Cheema, Feb 12 2010

Keywords

Comments

If you graph a(n) versus n, a clear pattern emerges.
As you go farther along the n-axis, greater are the number of consecutive sexy primes, on average, within each interval obtained.
If one could prove that there is at least one consecutive sexy prime within each interval, this would imply that consecutive sexy primes are infinite.
I suspect all numbers in the sequence are > 0.

Examples

			The first sexy prime pair with consecutive primes is (23,29) = A031924(1) and A031925(1). Square the first term, you get 529, then take the product of the two primes, you get 667.
Between these two numbers, namely (529,667), there are ten consecutive sexy primes: (541,547), (557,563), (563,569),
(571,577), (587,593), (593,599), (601,607), (607,613), (647,653), and (653 659).
Hence the very first term of the sequence is 10.
		

Crossrefs

Programs

  • Maple
    isA031924 := proc(p) return (isprime(p) and (nextprime(p)-p) = 6 ); end proc:
    A031924 := proc(n) local p; if n = 1 then 23; else p := nextprime(procname(n-1)) ; while not isA031924(p) do p := nextprime(p) ; end do ; return p ; end if ; end proc:
    A031925 := proc(n) A031924(n)+6 ; end proc:
    A173198 := proc(n) local ulim,llim,a,i ; llim := A031924(n)^2 ; ulim := A031924(n)*A031925(n) ; a := 0 ; for i from llim to ulim-6 do if isA031924(i) then a := a+1 ; end if; end do ; a ; end proc:
    seq(A173198(n),n=1..80) ; # R. J. Mathar, Feb 15 2010

Extensions

Comments condensed by R. J. Mathar, Feb 15 2010