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-5 of 5 results.

A137270 Primes p such that p^2 - 6 is also prime.

Original entry on oeis.org

3, 5, 7, 13, 17, 23, 47, 53, 67, 73, 83, 97, 107, 113, 167, 193, 197, 263, 293, 317, 367, 373, 383, 457, 463, 467, 487, 503, 557, 593, 607, 643, 647, 673, 677, 683, 773, 787, 797, 823, 827, 857, 877, 887, 947, 1033, 1063, 1087, 1103, 1187, 1193, 1223, 1303
Offset: 1

Views

Author

Ben de la Rosa and Johan Meyer (meyerjh.sci(AT)ufa.ac.za), Mar 13 2008

Keywords

Comments

Each of the primes p = 2,3,5,7,13 has the property that the quadratic polynomial phi(x) = x^2 + x - p^2 takes on only prime values for x = 1,2,...,2p-2; each case giving exactly one repetition, in phi(p-1) = -p and phi(p) = p.
The only common term in A062718 and A137270 is 5. - Zak Seidov, Jun 16 2015

Examples

			The (2 x 7 - 2) -1 = 11 primes given by the polynomial x^2 + x - 7^2 for x = 1, 2, ..., 2 x 7 - 2 are -47, -43, -37, -29, -19, -7, 7, 23, 41, 61, 83, 107.
		

References

  • F. G. Frobenius, Uber quadratische Formen, die viele Primzahlen darstellen, Sitzungsber. d. Konigl. Acad. d. Wiss. zu Berlin, 1912, 966 - 980.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1350) | IsPrime(p^2-6)]; // Vincenzo Librandi, Apr 14 2013
  • Maple
    isA028879 := proc(n) isprime(n^2-6) ; end: isA137270 := proc(n) isprime(n) and isA028879(n) ; end: for i from 1 to 300 do if isA137270(ithprime(i)) then printf("%d, ",ithprime(i)) ; fi ; od: # R. J. Mathar, Mar 16 2008
  • Mathematica
    Select[Prime[Range[2,300]],PrimeQ[#^2-6]&] (* Harvey P. Dale, Jul 24 2012 *)

Formula

A000040 INTERSECT A028879. - R. J. Mathar, Mar 16 2008

Extensions

Corrected and extended by R. J. Mathar, Mar 16 2008

A028880 Primes of the form n^2 - 6.

Original entry on oeis.org

3, 19, 43, 163, 283, 523, 619, 2203, 2803, 3019, 4219, 4483, 5323, 5923, 6883, 7219, 9403, 11443, 12763, 13219, 15619, 17683, 20443, 21019, 24019, 27883, 34963, 37243, 38803, 41203, 42019, 46219, 55219, 69163, 75619, 85843, 100483
Offset: 1

Views

Author

Keywords

Comments

a(n) == 19 mod 24 for all n > 1. - Zak Seidov, Mar 10 2015

Programs

  • Magma
    [ a: n in [1..250] | IsPrime(a) where a is 4*n^2+4*n-5 ]; // Vincenzo Librandi, Aug 05 2010
    
  • PARI
    for(n=1,500,if(isprime(p=n^2-6),print1(p,", "))) \\ Derek Orr, Mar 11 2014

Formula

a(n) = A028879(n)^2 - 6. - Zak Seidov, Mar 10 2015

A382246 Smallest number k such that k^n - 6 is prime.

Original entry on oeis.org

8, 3, 2, 5, 5, 5, 19, 85, 7, 5, 19, 275, 23, 43, 53, 455, 65, 23, 23, 175, 7, 65, 47, 295, 7, 143, 49, 115, 23, 355, 185, 305, 7, 55, 319, 85, 113, 25, 329, 505, 25, 187, 205, 25, 295, 437, 17, 2285, 7, 583, 35, 1375, 5, 7, 35, 895, 235, 277, 197, 695, 203, 145, 43, 35, 437, 215
Offset: 1

Views

Author

Jakub Buczak, Mar 19 2025

Keywords

Comments

No term k in the sequence can be divisible by 2 or 3. Except for the special case a(1)-a(3), where the result of k^n - 6 is either the prime number 2 or 3.
If n is a multiple of 4, the only valid terms of k are those ending in a 5.
Empirical analysis suggests that the terms are typically prime or semiprime.

Examples

			a(1) = 8, because 8^1 - 6 = 2, which is prime.
a(4) = 5, because 5^4 - 6 = 619, which is prime.
		

Crossrefs

Cf. A028879 (a(2)), A239414 (a(6)) for the first term.

Programs

  • PARI
    a(n) = my(k=1); while (!isprime(k^n-6), k++); k; \\ Michel Marcus, Mar 19 2025
  • Python
    from sympy import isprime
    def a(n):
        k = 1
        while (n>1 and k not in [2,3] and (k%2==0 or k%3==0)) or not isprime(k**n-6):
            k += 1
        return k
    

A309726 Numbers k such that k^2 - 12 is prime.

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 25, 29, 35, 41, 49, 53, 59, 61, 79, 85, 91, 95, 97, 103, 107, 113, 119, 121, 137, 139, 145, 149, 163, 169, 173, 179, 181, 185, 191, 205, 209, 227, 233, 235, 245, 251
Offset: 1

Views

Author

Daniel Starodubtsev, Aug 14 2019

Keywords

Comments

All terms are odd and not divisible by 3.

Examples

			11 is in the sequence because 11^2 - 12 = 109, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[5,301,2],PrimeQ[#^2-12]&] (* Harvey P. Dale, Dec 23 2019 *)
  • PARI
    select(n->isprime(n^2-12), [1..1000]) \\ Andrew Howroyd, Aug 14 2019

Formula

If A056927(k) = 12, then k is a term. - A.H.M. Smeets, Aug 15 2019

A380905 Smallest number k such that k^(2*3^n) - 6 is prime.

Original entry on oeis.org

3, 5, 23, 7, 433, 2447, 9377, 82597, 134687
Offset: 0

Views

Author

Jakub Buczak, Feb 07 2025

Keywords

Comments

Terms must have an ending digit of 3, 5 or 7. If k ends in 1 or 9, then k^(2*3^n)-6 ends in a 5, which is not prime.
a(7) is the first composite term. - Michael S. Branicky, Feb 24 2025

Examples

			For n=0, k^(2*3^0) - 6 is prime for the first time at a(0) = k = 3.
For n=5, k^(2*3^5) - 6 is prime for the first time at a(5) = k = 2447.
		

Crossrefs

Cf. Subsequence of A382246.
Cf. A028879 (a(0)), A239414 (a(1)) for the first term.

Programs

  • PARI
    a(n) = my(p=3,q=2*3^n); while (!ispseudoprime(p^q-6), p+=2); p; \\ Michel Marcus, Feb 08 2025
  • Python
    from sympy import isprime
    from itertools import count
    def a(n): return next(k for k in count(2) if k%10 in {3,5,7} and isprime(k**(2*3**n)-6))
    

Extensions

a(7) from Michael S. Branicky, Feb 24 2025
a(8) from Georg Grasegger, Apr 17 2025
Showing 1-5 of 5 results.