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.

A094105 Primes of the form prime(k) + 2*prime(k+1).

Original entry on oeis.org

13, 19, 29, 37, 47, 127, 137, 181, 283, 307, 317, 367, 389, 541, 563, 577, 587, 677, 743, 811, 839, 907, 929, 937, 947, 1031, 1093, 1283, 1297, 1453, 1489, 1567, 1801, 1847, 1913, 2027, 2347, 2381, 2467, 2477, 2617, 2647, 2657, 2729, 2749, 2777, 2803, 2819
Offset: 1

Views

Author

Giovanni Teofilatto, May 02 2004

Keywords

Comments

No intersection with A094104 (Primes of the form 2*prime(m)+prime(m+1)): an integer of the form 2*prime(m)+prime(m+1) cannot be of the form prime(n)+2*prime(n+1). - Zak Seidov, Feb 16 2012

Examples

			a(9) = 89 + 2*97 = 283.
		

Crossrefs

Programs

  • Magma
    [a: n in [1..200] | IsPrime(a) where a is NthPrime(n) + 2*NthPrime(n+1)]; // Vincenzo Librandi, Jul 25 2015
  • Mathematica
    f[n_] := (Prime[n] + 2Prime[n + 1]); f[ # ] & /@ Select[Range[160], PrimeQ[f[ # ]] &] (* Robert G. Wilson v, May 07 2004 *)
    Select[#[[1]]+2*#[[2]]&/@Partition[Prime[Range[200]],2,1],PrimeQ] (* Harvey P. Dale, May 08 2015 *)
    Select[Table[Prime[n] + 2 Prime[n + 1], {n, 200}], PrimeQ] (* Vincenzo Librandi, Jul 25 2015 *)
  • PARI
    q=2;forprime(p=3,1000,if(isprime(r=q+2*p),print1(r,","));q=p)
    

Extensions

Corrected and extended by Klaus Brockhaus and Robert G. Wilson v, May 07 2004

A173971 Primes p such that 2*p+q is prime, where q is the prime following p.

Original entry on oeis.org

2, 3, 5, 13, 17, 19, 29, 59, 79, 103, 109, 113, 149, 197, 223, 227, 229, 239, 241, 269, 283, 337, 349, 409, 419, 439, 491, 569, 577, 643, 659, 691, 701, 709, 739, 743, 769, 773, 787, 823, 839, 911, 919, 983, 1051, 1153, 1213, 1277, 1373, 1409, 1423, 1427
Offset: 1

Views

Author

Keywords

Comments

The resulting primes are in A094104. - Michel Marcus, Feb 11 2015

Examples

			2*2+3=7, 2*3+5=11, 2*5+7=17,..
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[2*p+Prime[n+1]],AppendTo[lst,p]],{n,6!}];lst
    Select[Partition[Prime[Range[300]],2,1],PrimeQ[2#[[1]]+#[[2]]]&][[All,1]] (* Harvey P. Dale, Apr 01 2018 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (isprime(2*p+nextprime(p+1)), print1(p, ", ")););} \\ Michel Marcus, Feb 11 2015

Extensions

Definition clarified by Zak Seidov, Feb 11 2015

A241945 Indices n where both prime(n) + 2*prime(n+1) and 2*prime(n) + prime(n+1) are primes.

Original entry on oeis.org

2, 3, 6, 17, 27, 30, 48, 53, 57, 68, 94, 137, 138, 143, 156, 157, 248, 259, 269, 289, 296, 316, 360, 369, 402, 425, 429, 430, 432, 446, 474, 500, 522, 580, 596, 631, 656, 760, 777, 810, 828, 875, 906, 951, 994, 1154, 1163, 1233, 1273, 1338, 1346, 1352, 1378, 1381, 1385, 1391, 1402, 1422, 1436, 1495, 1552, 1602
Offset: 1

Views

Author

Zak Seidov, May 03 2014

Keywords

Examples

			n=2 is in the sequence because 3 + 2*5 = 13 and 5 + 2*3 = 11 are primes.
n=3 is in the sequence because 5 + 2*7 = 19 and 7 + 2*5 = 17 are primes.
n=6 is in the sequence because 17 + 2*13 = 43 and 13 + 2*17 = 47 are primes.
		

Crossrefs

Cf. A094104 (primes of form 2*p + q), A094105 (primes of form p + 2*q).

Programs

  • PARI
    isok(n) = my(p=prime(n), q=nextprime(p+1)); isprime(p+2*q) && isprime(2*p+q); \\ Michel Marcus, Jan 06 2019

A215808 Primes of the form 2*prime(k) - prime(k+1).

Original entry on oeis.org

3, 3, 17, 41, 47, 67, 151, 167, 199, 227, 251, 257, 347, 367, 557, 587, 601, 607, 641, 647, 727, 941, 971, 1051, 1091, 1097, 1117, 1181, 1217, 1277, 1361, 1427, 1447, 1447, 1487, 1487, 1499, 1607, 1697, 1741, 1747, 1741, 1777, 1877, 1901, 2087, 2143, 2281
Offset: 1

Views

Author

Zak Seidov, Sep 06 2012

Keywords

Comments

Corresponding values of k: 3, 4, 9, 15, 16, 21, 37, 40, 47, 51, 55, 56, 71, 74, 103 (A216075).

Examples

			k=3: 2*5-7=3, k=4: 2*7-11=3, k=9: 2*23-29=17.
		

Crossrefs

Programs

  • Mathematica
    pr=Prime[Range[1000]]; s=Select[2*Most[pr]-Rest[pr],PrimeQ]
    Select[2#[[1]]-#[[2]]&/@Partition[Prime[Range[500]],2,1],PrimeQ] (* Harvey P. Dale, Feb 25 2017 *)
Showing 1-4 of 4 results.