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 11-13 of 13 results.

A241099 Primes p such that (p^3 + 4)/3 is prime.

Original entry on oeis.org

5, 23, 53, 113, 173, 197, 269, 317, 383, 443, 557, 563, 587, 647, 659, 773, 797, 827, 947, 983, 1097, 1103, 1187, 1217, 1229, 1889, 1913, 1949, 2039, 2099, 2153, 2213, 2339, 2357, 2399, 2417, 2447, 2579, 2693, 2837, 2879, 2897, 2903, 2939, 2969, 3089, 3203
Offset: 1

Views

Author

K. D. Bajpai, Apr 15 2014

Keywords

Examples

			5 is prime and appears in the sequence because (5^3 + 4)/3 = 43 which is a prime.
23 is prime and appears in the sequence because (23^3 + 4)/3 = 4057 which is a prime.
		

Crossrefs

Cf. A109953 (primes p:(p^2+1)/3 is prime).
Cf. A118915 (primes p:(p^2+5)/6 is prime).
Cf. A118918 (primes p:(p^2+11)/12 is prime).

Programs

  • Maple
    KD:= proc() local a,b;a:=ithprime(n); b:=(a^3+4)/3; if b=floor(b) and isprime(b) then RETURN (a); fi; end: seq(KD(), n=1..1000);
  • Mathematica
    Select[Prime[Range[500]], PrimeQ[(#^3 + 4)/3] &]
    n = 0; Do[If[PrimeQ[(Prime[k]^3 + 4)/3], n = n + 1; Print[n, " ", Prime[k]]], {k, 1, 200000}] (* b-file *)

A245590 Primes p such that p^2 + 6 is a semiprime.

Original entry on oeis.org

2, 3, 7, 17, 23, 41, 47, 53, 59, 101, 149, 157, 173, 179, 193, 211, 229, 233, 239, 241, 251, 311, 347, 349, 353, 359, 373, 379, 383, 389, 409, 421, 439, 443, 457, 479, 499, 509, 521, 541, 571, 577, 599, 619, 641, 661, 691, 701, 719, 751, 761, 769, 809, 823, 829
Offset: 1

Views

Author

K. D. Bajpai, Jul 26 2014

Keywords

Examples

			7 is in the sequence because it is prime and 7^2 + 6 = 55 = 5 * 11, which is semiprime.
23 is in the sequence because it is prime and 23^2 + 6 = 535 = 5 * 107, which is semiprime.
		

Crossrefs

Cf. A109953 (primes p: p^2 + 2 is semiprime).
Cf. A243365 (primes p: p^2 + 6 and p^2 - 6 are semiprimes).

Programs

  • Maple
    with(numtheory):A245590:=n->`if`(isprime(n) and bigomega(n^2+6)=2, n, NULL): seq(A245590 (n), n=1..1500);
  • Mathematica
    Select[Prime[Range[200]], PrimeOmega[#^2 + 6] == 2 &]
  • PARI
    forprime(p=1,10^4,if(bigomega(p^2+6)==2,print1(p,", "))) \\ Derek Orr, Aug 03 2014

A351051 a(n) is the least prime that begins a sequence of exactly n primes under iteration of the map x -> (x^2+2)/3.

Original entry on oeis.org

3, 11, 17, 7, 25781659, 13505561767
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 30 2022

Keywords

Examples

			7 is prime, (7^2+2)/3 = 17 is prime, (17^2+2)/3 = 97 is prime, (97^2+2)/3 = 3137 is prime, but (3137^2+2)/3 = 3280257 is not prime, so 7 begins the sequence of 4 primes (7, 17, 97, 3137).  Since this is the first prime to do so, a(4) = 7.
		

Crossrefs

Cf. A109953.

Programs

  • Maple
    f:= proc(p) option remember; local q;
      q:= (p^2+2)/3;
      if isprime(q) then 1 + procname(q) else 1 fi
    end proc:
    A:= Vector(5): count:= 0:
    p:= 3:
    while count < 5 do
    p:= nextprime(p);
    v:= f(p);
    if A[v] = 0 then A[v]:= p; count:= count+1; fi;
    od:
    convert(A,list);
  • Mathematica
    f[n_] := -1 + Length @ NestWhileList[(#^2 + 2)/3 &, n, PrimeQ]; a[n_] := Module[{p = 3}, While[f[p] != n, p = NextPrime[p]]; p]; Array[a, 4] (* Amiram Eldar, Feb 01 2022 *)

Extensions

a(6) from Amiram Eldar, Feb 01 2022
Previous Showing 11-13 of 13 results.