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

A125251 a(n)=sqrt(A051779(n+2)-1)/30.

Original entry on oeis.org

5, 6, 8, 9, 14, 19, 43, 44, 77, 85, 91, 112, 113, 142, 155, 195, 196, 212, 226, 300, 308, 321, 351, 363, 399, 456, 461, 467, 485, 541, 555, 602, 604, 618, 638, 646, 720, 728, 779, 789, 891, 896, 923, 980, 1009, 1099, 1105, 1150, 1176, 1234, 1253, 1287, 1392
Offset: 1

Views

Author

Zak Seidov, Nov 26 2006

Keywords

Comments

Consider twin primes p, q = p + 2 such that pq + 2 is prime. It would seem that there are infinitely many such p. Except for p = 3 and p = 5 all such p appear to be of the form 30k - 1 and the values of k give the current sequence. - James R. Buddenhagen, Jan 09 2007
This is true. Prime numbers (other than 2,3,5) are 30k + 1,7,11,13,17,19,23,29. p+2 is then prime only for p = 30k + 11,17,29; then p(p+2)+2 is 30k + 25,25,1 respectively, so the last case mod 30 is the only one possible. - Gareth McCaughan, Jan 09 2007
This is the sequence of positive integers k such that p = 30*k - 1, q = 30*k + 1 and p*q + 2 are all prime. - James R. Buddenhagen, Jan 09 2007

Examples

			a(1)=5 because A051779(3)=22501 and sqrt(22501-1)/30=5,
a(2)=6 because A051779(4)=32401 and sqrt(32401-1)/30=6.
		

Crossrefs

Cf. A051779.

Programs

  • PARI
    isok(n) = isprime(p = 30*n+1) && isprime(q = 30*n-1) && isprime(p*q+2); \\ Michel Marcus, Oct 11 2013

A078597 Primes of the form p*(p+4)+2 where p and p+4 are primes.

Original entry on oeis.org

23, 79, 223, 439, 4759, 53359, 77839, 95479, 99223, 159199, 194479, 239119, 378223, 416023, 680623, 2223079, 2595319, 2873023, 3186223, 3515623, 4003999, 5022079, 6456679, 6859159, 8732023, 9235519, 9492559, 10017223, 10595023
Offset: 1

Views

Author

Cino Hilliard, Dec 08 2002

Keywords

Comments

More generally, if a and b are even numbers, let Seq(a,b) be the sequence of primes of the form p*(p+a)+b where p and p+a are primes. Seq(a,b) is finite if either a^2+b == 2 (mod 3) or a^2-4*b is a square. Is it infinite in all other cases?

Crossrefs

Except for the term 23, this is a subsequence of A048880. A051779 is Seq(2, 2). A049002 is Seq(0, -2). A045637 is Seq(0, 4).

Programs

  • Mathematica
    Select[ #(#+4)+2&/@Select[Prime/@Range[500], PrimeQ[ #+4]&], PrimeQ]
  • PARI
    prodtp(n1,n2,a,b)=local(f,x); f=0; forprime(x=n1,n2,if(isprime(x+a),f=x*(x+a)+b; if(isprime(f),print(x" "x+a" "f" "); ); ); ); \ Computes that part of Seq(a,b) with n1<=p<=n2.

Extensions

Edited by Dean Hickerson, Dec 10 2002

A078622 Primes of the form prime(n)*prime(n*2)+2.

Original entry on oeis.org

23, 67, 733, 1009, 4603, 16519, 66301, 154459, 161221, 173713, 327079, 750679, 1694809, 1940683, 2023741, 2042281, 3012169, 3852973, 4011523, 4704199, 5407561, 5536213, 7292251, 7347229, 8484901, 11359939, 11633971, 12559189
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 11 2002

Keywords

Examples

			43 = prime(14), 107 = prime(14*2) and 43*107+2 = 4603 is prime, therefore 4603 is a term.
		

Crossrefs

Programs

  • Magma
    [ p: n in [1..400] | IsPrime(p) where p is NthPrime(n)*NthPrime(n*2)+2 ];
  • Mathematica
    Select[Table[Prime[n]Prime[2n]+2,{n,500}],PrimeQ] (* Harvey P. Dale, Nov 28 2011 *)
  • PARI
    for(n=1,1000,p=prime(n);p2=prime(2*n);Q=p*p2+2;if(isprime(Q),print1(Q,", ")))
    

A108013 Primes p such that p + 2 and p*(p + 2) + 2 are primes.

Original entry on oeis.org

3, 5, 149, 179, 239, 269, 419, 569, 1289, 1319, 2309, 2549, 2729, 3359, 3389, 4259, 4649, 5849, 5879, 6359, 6779, 8999, 9239, 9629, 10529, 10889, 11969, 13679, 13829, 14009, 14549, 16229, 16649, 18059, 18119, 18539, 19139, 19379, 21599, 21839
Offset: 1

Views

Author

Cino Hilliard, May 30 2005

Keywords

Comments

Except for the first 2 terms, these numbers all end in 9. Proof: Any odd prime p>5 can have one of the following forms: 10k+1, 10k+3, 10k+7, 10k+9.
10k+1 => p(p+2)+2 ends in 5, hence not prime, so p <> form 10k+1.
10k+3 => (p+2) ends in 5, hence not prime, so p <> form 10k+3.
10k+7 => p(p+2)+2 ends in 5, hence not prime, so p <> form 10k+7.
Thus p is of the form 10k+9 as stated. Moreover, p+2 ends in 1 and p(p+2)+2 is of the form 100h+1 since (10k+9)(10k+11)+2 = 100(k^2+2k+1)+1.
Subsequence of A051507. All terms larger than 5 are congruent to 29 mod 30. - Zak Seidov

Examples

			149*151 + 2 = 22501. 149, 151, and 22501 are all prime so 149 is in the sequence.
		

Crossrefs

Cf. A051779.

Programs

  • Magma
    [p: p in PrimesUpTo(25000)|  IsPrime(p+2) and IsPrime(p^2+2*p+2)] // Vincenzo Librandi, Jan 29 2011
  • Mathematica
    Select[Prime@ Range@ 3000, AllTrue[{#2, #1 #2 + 2}, PrimeQ] & @@ {#, # + 2} &] (* Michael De Vlieger, Jan 22 2018 *)
  • PARI
    g(n,k) = forprime(x1=3,n, x2=x1+2; if(isprime(x2), p=x1*x2+k; if(isprime(p), print1(x1",") ) ) )
    

A108016 Primes of the form p*(p+2)+6 where p and p+2 are primes.

Original entry on oeis.org

41, 149, 5189, 39209, 186629, 213449, 1127849, 1192469, 1695209, 2965289, 3732629, 4359749, 4460549, 5673929, 6718469, 7225349, 11370389, 12446789, 12830729, 14607689, 14837909, 16016009, 17040389, 17288969, 20684309
Offset: 1

Views

Author

Cino Hilliard, May 31 2005

Keywords

Comments

Except for the first term, these numbers end in 9. p can take one of the forms 10k+1, 10k+3, 10k+7 or 10k+9. p = 10k+1 => p*(p+2)+6 = (10k+1)(10k+3)+6 = 10h+9. p can be 10k+1. p = 10k+3 => p+2 = 0 mod 5 not prime. p cannot be 10k+3. p = 10k+7 => p(p+2)+6 = (10k+7)(10k+9)+6 = 10h+9. p can be 10k+7. p = 10k+9 => p(p+2)+6 = (10k+9)*(10k+11)+6 = 0 mod 5 not prime. p cannot be 10k+9. Thus by exhaustion p(p+2)+6 ends in 9.

Examples

			149 = 11*13 + 6 is a term since 11, 13 and 149 are primes.
		

Crossrefs

Programs

  • Mathematica
    f[p_] := p*(p + 2) + 6; f /@ Select[Range[10^4], And @@ PrimeQ[{#, # + 2, f[#]}] &] (* Amiram Eldar, Mar 26 2021 *)
    Select[Times@@#+6&/@Select[Partition[Prime[Range[1000]],2,1],#[[2]]-#[[1]]==2&],PrimeQ] (* Harvey P. Dale, Aug 16 2024 *)
  • PARI
    g(n,k=6) = forprime(x1=3,n, x2=x1+2; if(isprime(x2), p=x1*x2+k; if(isprime(p), print1(p, ", ") ) ) )

A261889 Primes that are the square of the sum of a twin prime pair plus 1.

Original entry on oeis.org

577, 1297, 7057, 14401, 41617, 90001, 147457, 156817, 484417, 746497, 1299601, 1742401, 2702737, 2944657, 4260097, 5308417, 6051601, 6780817, 8785297, 10497601, 14107537, 15210001, 16451137, 17438977, 18147601, 29419777, 38937601, 45968401, 51322897, 56791297
Offset: 1

Views

Author

K. D. Bajpai, Sep 05 2015

Keywords

Comments

Alternatively: Primes of the form (p + q)^2 + 1 where p and q are twin primes.
All the terms are congruent to 1 (mod 3).

Examples

			577 appears in the sequence because it is a prime resulting from twin prime pair (11,13): (11 + 13)^2 + 1 = 577.
7057 appears in the sequence because it is a prime resulting from twin prime pair (41,43): (41 + 43)^2 + 1 = 7057.
		

Crossrefs

Programs

  • Magma
    [k : p in PrimesUpTo (10000) | IsPrime(p+2) and IsPrime(k) where k is ((p + p + 2)^2 + 1)];
  • Maple
    A261889:= proc() local a, b, d; a:= ithprime(n); b:=a+2; d:=(a+b)^2+1; if isprime(b)and isprime(d) then return (d): fi; end: seq(A261889 (), n=1..10000);
  • Mathematica
    A261889 = {}; Do[p1 = Prime[n]; p2 = p1 + 2; p = (p1 + p2)^2 + 1; If[PrimeQ[p2] &&  PrimeQ[p], AppendTo[A261889, p]], {n, 1, 10000}]; A261889
  • PARI
    forprime(p = 1,10000, if(isprime(p+2) && isprime((p + p + 2)^2 + 1), print1(( (p + p + 2)^2 + 1), ", ")));
    
  • PARI
    list(lim)=my(v=List(),t,p=2); forprime(q=3,sqrtint(lim\1-1)\2+1, if(q-p==2 && isprime(t=(p+q)^2+1), listput(v,t)); p=q); Vec(v) \\ Charles R Greathouse IV, Sep 06 2015
    

A284045 Numbers k such that p = 6k-1 and q = 6k+1 are twin primes and (p^2 + q^2)/2 is prime.

Original entry on oeis.org

1, 25, 30, 40, 45, 70, 95, 215, 220, 385, 425, 455, 560, 565, 710, 775, 975, 980, 1060, 1130, 1500, 1540, 1605, 1755, 1815, 1995, 2280, 2305, 2335, 2425, 2705, 2775, 3010, 3020, 3090, 3190, 3230, 3600, 3640, 3895, 3945, 4455, 4480, 4615, 4900, 5045, 5495, 5525, 5750, 5880
Offset: 1

Views

Author

Thomas Ordowski and Altug Alkan, Mar 19 2017

Keywords

Comments

Numbers k such that (6k)^2 + 1 is prime and p = 6k-1 and q = 6k+1 are twin primes.
Numbers k such that p*q + 2 is prime, where p = 6k-1 and q = 6k+1 are twin primes.

Crossrefs

Subsequence of A002822.
Cf. A051779.

Programs

  • Mathematica
    fQ[n_] := AllTrue[{30n -1, 30n +1, 900n^2 +1}, PrimeQ]; Join[{1},5*Select[ Range@1200, fQ]] (* Robert G. Wilson v, Mar 19 2017 *)
  • PARI
    print1(1, ", "); for(n=1, 15000, if(isprime(30*n-1)&& isprime(30*n+1)&& isprime(900*n^2+1), print1(5*n, ", ")));

Formula

a(n) == 0 (mod 5) for n > 1.
a(n+1) = 5 * A125251(n).

A108024 First instance of primes of the form p(p+2)+ k, if they exist, where p and p+2 are prime and k is an even number.

Original entry on oeis.org

17, 19, 41, 23, 47, 29, 31, 53, 163, 37, 59, 41, 43, 173, 47, 71, 53, 941, 59, 61, 83, 193, 67, 89, 71, 73, 383, 97, 79, 101, 83, 107, 89, 113, 223, 97, 227, 101, 103, 233, 107, 109, 131, 113, 137, 139, 251, 433, 127, 149, 131, 263, 137, 139, 269, 163, 167, 149, 151
Offset: 3

Views

Author

Cino Hilliard, May 31 2005

Keywords

Comments

If p > 3 and k = 6n-2, then p(p+2) + k is composite. This follows from the fact that p and p+2 are both prime iff p = 3m+2 since p = 3m+1 => p+2 = 0 mod 3. Then p(p+2)+6n-2 = 9m^2+18m+8 + 6n-2 = 0 mod 3 composite. Therefore the above seq has no entry for k=10 = 6*2-2 because 8+10 = 0 mod 3. Similarly, if p>3, p=6m+5. As an aside, to test for twin primes > 3 we need only test numbers of the form 6m+5 = 5,11,17,23,29,..

Examples

			3*5+2 = 17,3*5+4=19,5*7+6 = 41.
		

Crossrefs

Cf. A051779.

Programs

  • PARI
    pqpk(n,m,k) = { forstep(k=2,n,2, forprime(x1=3,n, x2=x1+m; p=x1*x2+k; if(isprime(x2)&isprime(p), print1(p",");break; ) ) ) }
Showing 1-8 of 8 results.