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

A250027 Primes p such that f(p) and f(f(p)) are primes, where f(x) = x^2+3*x+1.

Original entry on oeis.org

3, 19, 29, 59, 113, 373, 379, 419, 449, 593, 643, 929, 983, 1063, 1423, 2053, 2069, 3169, 3593, 3943, 4159, 4493, 5153, 6163, 6659, 6689, 6869, 6949, 7583, 8963, 9629, 10099, 10103, 12413, 13963, 14303, 14639, 15359, 15649, 16703, 17099, 18523, 18869
Offset: 1

Views

Author

Zak Seidov, Nov 11 2014

Keywords

Crossrefs

Subsequence of A094210 and of A153590.

Programs

  • Magma
    f:=func; [p: p in PrimesUpTo(22000) | IsPrime(f(p)) and IsPrime(f(f(p)))]; // Vincenzo Librandi, Nov 19 2014
  • Mathematica
    Select[Range[25000], PrimeQ[#] && PrimeQ[#^2 + 3 # + 1] && PrimeQ[#^4 + 6 #^3 + 14 #^2 + 15 # + 5] &] (* Vincenzo Librandi, Nov 19 2014 *)

A162237 Primes p such that p^2+3*p+1 is not prime.

Original entry on oeis.org

11, 13, 17, 31, 41, 61, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 127, 131, 149, 151, 167, 181, 191, 193, 197, 199, 211, 223, 227, 233, 241, 251, 269, 271, 277, 281, 283, 307, 311, 317, 331, 337, 347, 367, 383, 389, 397, 401, 409, 421, 431, 433, 439, 443
Offset: 1

Author

Vincenzo Librandi, Jun 28 2009

Keywords

Examples

			p=11, p^2+3*p+1=155=5*31; p=13, p^2+3*p+1=209=11*19; p=17, p^2+3*p+1=341=11*31.
		

Crossrefs

Cf. A153590.

Programs

  • Magma
    [p: p in PrimesUpTo(500) | not IsPrime(p^2+3*p+1)]; // Vincenzo Librandi, Sep 11 2013
  • Mathematica
    Select[Range[0, 500], PrimeQ[#] && !PrimeQ[#^2 + 3 # + 1] &] (* Vincenzo Librandi, Sep 11 2013 *)

A352604 Primes p such that p^2+3*p+1 and p^2+p-1 are also prime.

Original entry on oeis.org

2, 3, 5, 19, 53, 59, 163, 263, 349, 373, 419, 449, 499, 1013, 1093, 1259, 1303, 1423, 1489, 1493, 1669, 1759, 2069, 2729, 2879, 3463, 3943, 4159, 4243, 4283, 4493, 4603, 4793, 4969, 5113, 5303, 5563, 6323, 6599, 6803, 6829, 6883, 7369, 7523, 7529, 7963, 8039, 8713, 8969, 9043, 9173, 9293, 9623
Offset: 1

Author

J. M. Bergot and Robert Israel, Mar 22 2022

Keywords

Comments

Primes p such that (p-1)*p+(p-1)+p and p*(p+1)+p+(p+1) are also prime.

Examples

			a(3) = 5 is a term because 5, 5^2+3*5+1 = 41 and 5^2+5-1 = 29 are all prime.
		

Crossrefs

Intersection of A053184 and A153590.

Programs

  • Maple
    select(t -> isprime(t^2+3*t+1) and isprime(t^2+t-1), [seq(ithprime(i),i=1..10000)]);
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen():
        p = 2
        while True:
            if isprime(p**2 + 3*p + 1) and isprime(p**2 + p - 1):
                yield p
            p = nextprime(p)
    print(list(islice(agen(), 53))) # Michael S. Branicky, Mar 22 2022

A244113 Primes p such that f(p), f(f(p)), f(f(f(p))), and f(f(f(f(p)))) are all prime, where f(x) = x^2+3x+1.

Original entry on oeis.org

3, 1628779, 2481113, 3260683, 3520229, 9733123, 10671253, 10673129, 11772809, 36758303, 45459353, 45594019, 58552279, 64597903, 66539353, 74674559, 83471243, 96765313, 115623929, 117479039, 131701183, 133500553, 145010533, 163341319, 163845719, 166410353, 167197243, 169948223
Offset: 1

Author

Zak Seidov, Nov 11 2014

Keywords

Examples

			p = 3, f(p) = 19,  f(19) = 419, f(419) = 176819 , and  f(176819) = 31265489219 all prime.
		

Crossrefs

Subsequence of A250027. Cf. A094210, A153590.

Programs

  • Mathematica
    Select[Prime[Range[10^7]],AllTrue[Rest[NestList[#^2+3#+1&,#,4]], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 12 2018 *)
Showing 1-4 of 4 results.