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

A244175 Semiprimes s = p*q such that (p+q)^2 - s is prime.

Original entry on oeis.org

6, 14, 21, 26, 33, 35, 51, 69, 74, 87, 93, 111, 119, 122, 129, 143, 146, 161, 185, 203, 209, 215, 219, 278, 287, 299, 303, 305, 314, 321, 341, 371, 381, 395, 413, 437, 458, 482, 489, 515, 527, 533, 537, 545, 551, 591, 629, 671, 698, 707, 713, 717, 734, 737, 755
Offset: 1

Views

Author

Peter Luschny, Jun 21 2014

Keywords

Comments

All terms are squarefree, since primes p and q must be distinct. (Otherwise, we would have (p+q)^2 - s = (2p)^2 - p^2 = 3p^2, which could not be prime.) - Jon E. Schoenfield, Dec 16 2016

Examples

			The terms 6, 14, 21 and 581543 are in the sequence because:
2^2 + 2*3 + 3^2 = (2+3)^2 -  6 = 19 is prime.
2^2 + 2*7 + 7^2 = (2+7)^2 - 14 = 67 is prime.
3^2 + 3*7 + 7^2 = (3+7)^2 - 21 = 79 is prime.
677^2 + 677*859 + 859^2 = (677+859)^2 - 581543 = 1777753 is prime.
		

Crossrefs

Subsequence of A006881.
Cf. A244146.

Programs

  • Mathematica
    max = 1000; Reap[For[p=2, p <= Sqrt[max], p = NextPrime[p], For[q=NextPrime[p], p*q <= max, q=NextPrime[q], If[PrimeQ[(p+q)^2-p*q], Sow[p*q]]]]][[2, 1]] // Sort (* Jean-François Alcover, Dec 09 2014 *)
    Select[Select[Range[10^3], SquareFreeQ@ # && PrimeOmega@ # == 2 &],
    Function[s, PrimeQ[(#1 + #2)^2 - s] & @@ FactorInteger[s][[All, 1]]]] (* Michael De Vlieger, Dec 17 2016 *)

A349986 Numbers that can be represented as p^2 + p*q + q^2 where p and q are primes.

Original entry on oeis.org

12, 19, 27, 39, 49, 67, 75, 79, 109, 147, 163, 199, 201, 217, 247, 259, 309, 327, 349, 363, 399, 403, 427, 433, 457, 481, 507, 543, 579, 597, 607, 669, 679, 691, 739, 777, 867, 903, 937, 973, 997, 1011, 1027, 1063, 1083, 1093, 1141, 1209, 1227, 1281, 1327, 1387, 1423, 1447, 1489, 1533, 1579, 1587
Offset: 1

Views

Author

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

Keywords

Comments

The only square in this sequence is 49.

Examples

			a(3) = 27 is a term because 27 = 3^2+3*3+3^2.
a(4) = 39 is a term because 39 = 2^2+2*5+5^2.
		

Crossrefs

Contains A079705, A244146, A349987.
Subsequence of A024614.

Programs

  • Maple
    N:= 10^4: # for terms <= N
    P:= select(isprime, [2,seq(i,i=3..floor(sqrt(N)),2)]):
    nP:= nops(P):
    S:= {}:
    for i from 1 to nP do
      for j from 1 to i do
        x:= P[i]^2 + P[i]*P[j]+P[j]^2;
        if x > N then break fi;
        S:= S union {x};
    od od:
    sort(convert(S,list));

A300845 a(n) is the smallest prime q such that q^2 + q*p + p^2 is a prime number where p is n-th prime, or 0 if no such q exists.

Original entry on oeis.org

3, 2, 7, 2, 3, 2, 3, 11, 3, 3, 3, 2, 7, 3, 19, 7, 7, 2, 11, 13, 2, 5, 37, 19, 11, 3, 5, 3, 5, 13, 3, 7, 7, 2, 7, 5, 2, 3, 37, 7, 3, 29, 13, 5, 3, 11, 17, 29, 37, 2, 13, 3, 2, 67, 19, 7, 7, 5, 3, 3, 29, 43, 23, 7, 5, 3, 3, 5, 7, 2, 43, 3, 2, 17, 17, 7, 19, 2, 13, 23, 43, 3, 7, 2, 2, 7, 7, 2, 7
Offset: 1

Views

Author

Altug Alkan, Mar 13 2018

Keywords

Comments

Probably, for each prime p, there is prime q such that q^2 + q*p + p^2 is also a prime since the existence of such q is a special case of Hypothesis H of Schinzel and Sierpinski. However, this is not proven yet.
Corresponding generalized cuban primes are 19, 19, 109, 67, 163, 199, 349, 691, 607, 937, 1063, 1447, 2017, 1987, 3463, 3229, 3943, 3847, 5347, 6133, ...

Examples

			a(3) = 7 because 7^2 + 7*5 + 5^2 = 109 is prime number and 7 is the least prime with this property.
		

Crossrefs

Programs

  • Maple
    f:= proc(p) local q;
      q:= 1;
      do
        q:= nextprime(q);
        if isprime(q^2+q*p+p^2) then return q fi;
      od
    end proc:
    map(f, select(isprime, [2,seq(i,i=3..1000,2)])); # Robert Israel, Mar 13 2018
  • Mathematica
    Table[Block[{q = 2}, While[! PrimeQ[q^2 + q p + p^2], q = NextPrime@ q]; q], {p, Prime@ Range@ 89}] (* Michael De Vlieger, Mar 14 2018 *)
  • PARI
    a(n) = {my(p=prime(n)); forprime(q=2, ,if(isprime(p^2+p*q+q^2), return(q)))}
Showing 1-3 of 3 results.