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 21-25 of 25 results.

A224990 Primes p such that q = 2*p^2 - 1 and 2*p*q - 1 are also prime.

Original entry on oeis.org

3, 13, 157, 181, 739, 829, 937, 1009, 1093, 1483, 1621, 1879, 2311, 2503, 2647, 2719, 3079, 4969, 4999, 5209, 5431, 5569, 6163, 6961, 8161, 8329, 9349, 9631, 10399, 10459, 10531, 10657, 11131, 11953, 13063, 18523, 20149, 20731, 21391, 21589, 26317, 27481, 28111, 28351, 29023
Offset: 1

Views

Author

M. F. Hasler, Apr 22 2013

Keywords

Comments

Subsequence of A106483, and more elementary version of A224614.

Programs

  • Mathematica
    Select[Prime[Range[10000]], PrimeQ[2#^2 - 1] && PrimeQ[4#^3 - 2# - 1] &] (* Alonso del Arte, Apr 22 2013 *)
  • PARI
    forprime(p=1,3e4,isprime(r=2*p^2-1)&&isprime(2*p*r-1)&&print1(p","))

A245659 Prime numbers P such that Q=2*P^2-1, R=2*Q^2-1, S=2*R^2-1 and T=2*S^2-1 are all prime numbers.

Original entry on oeis.org

281683, 496789, 823421, 1352753, 1719217, 6174109, 8643149, 9761051, 9843529, 16191167, 19132121, 19745797, 23490473, 28457797, 31820429, 32860271, 36552277, 37068569, 43506569, 44776981, 46808903, 55035047, 55957807, 67194403, 75099137, 83092897, 86580421, 89135089
Offset: 1

Views

Author

Pierre CAMI, Jul 28 2014

Keywords

Comments

Subsequence of A106483.
For P = 496789, 83092897, 467014643, U=2*T^2-1 is also prime. [Corrected by Jens Kruse Andersen, Aug 21 2014]

Examples

			281683 is prime P.
Q=2*P^2-1 = 158690624977 is prime Q.
R=2*Q^2-1 = 50365428911181712501057 is prime R.
S=2*R^2-1 = 5073352858814597404058971422301788780452234497 is prime S.
T=2*S^2-1 = 51477818460084496601334991724899650493354568309112026195311592373475872924903206720553686017 is prime T.
U=2*T^2-1 is composite.
		

Crossrefs

Cf. A106483.

Programs

  • Mathematica
    f[n_]:=2n^2-1;Select[Prime[Range[5170000]],PrimeQ[f[#]]&&PrimeQ[ f[f[#]]]&&PrimeQ[ f[f[f[#]]]]&&PrimeQ[f[f[f[f[#]]]]]&] (* Farideh Firoozbakht, Aug 11 2014 *)
    Select[Prime[Range[52*10^5]],AllTrue[Rest[FoldList[2#^2-1&,{#,#,#,#,#}]],PrimeQ]&] (* Harvey P. Dale, Jan 13 2023 *)
  • PARI
    f(x)=return(2*x^2-1)
    forprime(p=1,10^8,if(ispseudoprime(f(p)) && ispseudoprime(f(f(p))) && ispseudoprime(f(f(f(p)))) && ispseudoprime(f(f(f(f(p))))), print1(p,", "))) \\ Derek Orr, Jul 28 2014

Extensions

More terms from Derek Orr, Jul 28 2014

A340865 Primes p such that (p^2 + 1)/2 and 2*p^2 - 1 are also prime.

Original entry on oeis.org

3, 11, 59, 181, 199, 379, 409, 571, 739, 1039, 1439, 2239, 2269, 2351, 2381, 2671, 2719, 2789, 3049, 3529, 4021, 4201, 4721, 4999, 5431, 5531, 5839, 6329, 6619, 8329, 9241, 9419, 9631, 9689, 10151, 11329, 11551, 12071, 12421, 13339, 14489, 15091, 17419, 18301
Offset: 1

Views

Author

Jon E. Schoenfield, Jan 24 2021

Keywords

Comments

Intersection of A048161 and A106483.
How many triangular numbers with 6 divisors (A292989) can be divisible by the same squared prime p^2?
The k-th triangular number T(k) = A000217(k) = k*(k+1)/2 can be written as the product of two coprime factors A and B where A=k and B=(k+1)/2 for odd k, A=k/2 and B=k+1 for even k. If a triangular number has 6 divisors, then it is of the form p^2*q where p and q are distinct primes. We can identify four cases:
Case 1: A = k = p^2 and B = (k+1)/2 = q, so q = (p^2 + 1)/2; solutions occur at primes p in A048161.
Case 2: A = k = q and B = (k+1)/2 = p^2, so 2*p^2 - 1 = q; solutions occur at primes p in A106483.
Case 3: A = k/2 = p^2 and B = k+1 = q. In this case, 2*p^2 + 1 = q. For p = 2, we would get q = 9 (nonprime), so p must be odd. If prime p > 3 (so q > 19), we have p^2 == 1 (mod 3), so q == 0 (mod 3), hence nonprime. So the only solution for this case occurs at p=3, q=19, t = 3^2*19 = 171.
Case 4: A = k/2 = q and B = k+1 = p^2. In this case, 2*q + 1 = p^2, so p is odd, but then p^2 == 1 (mod 8), so q == 0 (mod 4), hence q is not prime: no solutions exist.
Since Case 4 has no solutions, at most three triangular numbers with 6 divisors can be divisible by the same squared prime p^2; Case 3 has a solution only at p=3 and, in fact, there are three triangular numbers with 6 divisors that are divisible by 3^2: t = 3^2*5 = 45 = T(9), t = 3^2*17 = 153 = T(17), and 3^2*19 = 171 = T(18).
For all primes p > 3, then, at most two triangular numbers with 6 divisors are divisible by p^2; this sequence (after the initial term, 3) lists the primes p such that p^2 divides exactly two triangular numbers that have 6 divisors.

Examples

			Both (3^2 + 1)/2 = 5 and 2*3^2 - 1 = 17 are prime, so 3 is in the sequence.
(5^2 + 1)/2 = 13 is prime, but 2*5^2 - 1 = 49 = 7^2 is not prime, so 5 is not in the sequence.
(7^2 + 1)/2 = 25 is not prime, so even though 2*7^2 - 1 = 97 is prime, 7 is not in the sequence.
Neither (23^2 + 1)/2 = 265 = 5*53 nor 2*23^2 - 1 = 1057 = 7*151 is prime, so 23 is not in the sequence.
		

Crossrefs

Programs

  • PARI
    isok(p) = (p>2) && isprime(p) && isprime((p^2+1)/2) && isprime(2*p^2-1); \\ Michel Marcus, Jan 25 2021

A356510 Primes p such that 2*p^2 - 7, 2*p^2 - 1, and 2*p^2 + 3 are prime.

Original entry on oeis.org

43, 127, 197, 3613, 3767, 4957, 28687, 29723, 40193, 46817, 66403, 78737, 89137, 93253, 104243, 105337, 105673, 110543, 114113, 123397, 127247, 145963, 148303, 168713, 173293, 190387, 201893, 207367, 213613, 241597, 256117, 261323, 268253, 278543, 283807, 333227, 339373, 340913, 356173, 359143
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 09 2022

Keywords

Comments

All terms == 3 or 7 (mod 10).
All terms == 1 or 13 (mod 14). - Jon E. Schoenfield, Sep 05 2022

Examples

			a(3) = 197 is a term because 197, 2*197^2 - 7 = 77611, 2*197^2 - 1 = 77617, and 2*197^2 + 3 = 77621 are all prime.
		

Crossrefs

Contained in A106483 and A243595.

Programs

  • Maple
    filter:= p -> isprime(p) and isprime(2*p^2+3) and isprime(2*p^2-1) and isprime(2*p^2-7):
    select(filter, [seq(i,i=3..1000000,2)]);
  • Mathematica
    Select[Prime[Range[30000]], AllTrue[2*#^2 + {-7, -1, 3}, PrimeQ] &] (* Amiram Eldar, Aug 09 2022 *)
  • Python
    from sympy import isprime
    def ok(n): return isprime(n) and all(isprime(2*n*n-i) for i in [7, 1, -3])
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Aug 09 2022

A213162 Smallest prime p such that (k+1)*p^2-k are prime for k=1..n.

Original entry on oeis.org

2, 199, 409, 17569, 981091, 3918251, 1329433951, 75902670689, 45048280453021
Offset: 1

Views

Author

Zak Seidov, Jun 06 2012

Keywords

Comments

a(1..8) are the first terms correspondingly in A106483, A213078, A213079, A213107, A213125, A213159, A213161, A213334.

Programs

  • PARI
    a(n) = {my(p = 2); until (ok, ok = 1; for (k = 1, n, if (! isprime((k+1)*p^2-k), ok = 0; break;);); if (!ok, p = nextprime(p+1);)); return (p);}  \\ Michel Marcus, Apr 19 2013

Extensions

a(9) from Tyler Busby, Jan 11 2023
Previous Showing 21-25 of 25 results.