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

A114266 a(n) is the minimal number m that makes 2*prime(n)+prime(n+m) a prime.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 1, 1, 3, 1, 2, 4, 6, 2, 6, 2, 1, 2, 5, 5, 2, 1, 2, 3, 5, 3, 1, 6, 1, 1, 8, 2, 4, 7, 1, 9, 3, 2, 9, 7, 5, 10, 4, 5, 1, 5, 5, 1, 1, 1, 8, 1, 1, 4, 6, 2, 1, 2, 12, 10, 1, 11, 8, 3, 11, 2, 2, 1, 4, 1, 7, 2, 3, 2, 11, 2, 3, 3, 3, 1, 1, 5, 2, 5, 1, 7, 3, 3, 4, 6, 4, 7, 4, 1, 9, 5, 3, 2, 4, 7, 2, 9, 2
Offset: 1

Views

Author

Lei Zhou, Nov 20 2005

Keywords

Examples

			n=1: 2*prime(1)+prime(1+1)=2*2+3=7 is prime, so a(1)=1;
n=2: 2*prime(2)+prime(2+1)=2*3+5=11 is prime, so a(2)=1;
...
n=4: 2*prime(4)+prime(4+1)=2*7+11=25 is not prime
...
2*prime(4)+prime(4+3)=2*7+17=31 is prime, so a(4)=3.
		

Crossrefs

Programs

  • Haskell
    a114266 n = head [m | m <- [1..],
                          a010051 (2 * a000040 n + a000040 (n + m)) == 1]
    -- Reinhard Zumkeller, Oct 29 2013
  • Mathematica
    Table[p1 = Prime[n1]; n2 = 1; p2 = Prime[n1 + n2]; While[cp = 2*p1 + p2; ! PrimeQ[cp], n2++; p2 = Prime[n1 + n2]]; n2, {n1, 1, 200}]
    mnm[n_]:=Module[{m=1,p=2Prime[n]},While[!PrimeQ[p+Prime[n+m]],m++];m]; Array[mnm,110] (* Harvey P. Dale, Aug 05 2017 *)

Extensions

Edited definition to conform to OEIS style. - N. J. A. Sloane, Jan 08 2011

A114264 n(k) is the minimum number that require at least k to make Prime[n]+2*Prime[n+k] a prime.

Original entry on oeis.org

2, 10, 9, 7, 8, 40, 80, 28, 34, 73, 52, 174, 86, 105, 127, 161, 326, 225, 356, 154, 245, 394, 362, 350, 279, 586, 846, 321, 929, 1822, 1683, 1208, 1091, 2025, 947, 2108, 1361, 3181, 372, 2774, 1898, 3785, 3676, 2194, 6447, 2919, 3590, 7092, 4955, 2474, 19409
Offset: 1

Views

Author

Lei Zhou, Nov 20 2005

Keywords

Examples

			Prime[2]+2*Prime[2+1]=3+2*5=13 is prime, so n(1)=2;
Prime[3]+2*Prime[3+1]=5+2*7=19 is prime, not counted;
...
Prime[7]+2*Prime[7+4]=17+2*31=79 is prime, so n(4)=7;
		

Crossrefs

Programs

  • Mathematica
    Do[n[k] = 0, {k, 1, 2000}]; ct = 0; nm = 0; n2 = 0; n1 = 2; p1 = 3; While[ct < 200, n2 = 1; p2 = Prime[n1 + n2]; While[cp = p1 + 2*p2; ! PrimeQ[cp], n2++; p2 = Prime[n1 + n2]]; If[n[n2] == 0, n[n2] = n1; If[n2 > nm, nm = n2]; If[n2 <= 200, ct++ ]; Print[Table[n[k], {k, 1, nm}]]]; n1++; p1 = Prime[n1]]

A114267 a(n) = smallest k such that A114266(k) = n.

Original entry on oeis.org

1, 11, 4, 12, 19, 13, 34, 31, 36, 42, 62, 59, 142, 158, 247, 173, 240, 273, 204, 417, 231, 669, 172, 348, 965, 1003, 115, 1369, 370, 1244, 1251, 1373, 983, 1109, 2489, 1028, 2583, 1506, 6506, 6773, 7762, 5525, 2463, 6534, 6451, 3587, 4944, 3119, 3178, 4880
Offset: 1

Views

Author

Lei Zhou, Nov 20 2005

Keywords

Comments

Inverse sequence to A114266.

Crossrefs

Programs

  • Mathematica
    Do[n[k] = 0, {k, 1, 2000}]; ct = 0; nm = 0; n2 = 0; n1 = 1; p1 = 2; While[ct < 200, n2 = 1; p2 = Prime[n1 + n2]; While[cp = 2*p1 + p2; ! PrimeQ[cp], n2++; p2 = Prime[n1 + n2]]; If[n[n2] == 0, n[ n2] = n1; If[n2 > nm, nm = n2]; If[n2 <= 200, ct++ ]; Print[Table[n[k], {k, 1, nm}]]]; n1++; p1 = Prime[n1]]

Extensions

I clarified the definition. - N. J. A. Sloane, Jan 08 2011

A329973 Smallest prime p such that both 2*prime(n+1)+p and p*prime(n+1)+2 are primes.

Original entry on oeis.org

5, 3, 3, 7, 3, 3, 3, 7, 3, 5, 23, 67, 3, 7, 7, 13, 5, 5, 7, 5, 5, 67, 3, 3, 37, 17, 43, 5, 13, 3, 7, 127, 3, 19, 5, 17, 53, 3, 3, 43, 5, 19, 23, 3, 3, 101, 17, 3, 41, 37, 13, 17, 7, 7, 37, 3, 59, 23, 31, 257, 7, 47, 31, 5, 7, 11, 3, 67, 3, 3, 43, 23
Offset: 1

Views

Author

Ivan N. Ianakiev, Jun 08 2020

Keywords

Comments

a(n)=3 if and only if prime(n+1) is in A106067. - Robert Israel, Jul 17 2020

Crossrefs

Programs

  • Maple
    f:= proc(n) local pn,p;
     pn:= ithprime(n+1);
     p:= 1;
     do
       p:= nextprime(p);
       if isprime(2*pn+p) and isprime(p*pn+2) then return p fi
     od
    end proc:
    map(f, [$1..100]); # Robert Israel, Jul 17 2020
  • Mathematica
    f[n_Integer/;n>1]:=Module[{p=3},While[Or[CompositeQ[2*Prime[n]+p],CompositeQ[p*Prime[n]+2]],p=NextPrime[p]];p];f/@Range[2,100]
  • PARI
    a(n) = my(p=2,q=prime(n+1)); while(!isprime(2*q+p) || !isprime(p*q+2), p=nextprime(p+1)); p; \\ Michel Marcus, Jun 08 2020

A076812 a(n) = the smallest prime p such that p-prime(n)*4 is prime.

Original entry on oeis.org

11, 17, 23, 31, 47, 59, 71, 79, 97, 127, 127, 151, 167, 179, 191, 223, 239, 251, 271, 307, 311, 347, 337, 359, 401, 409, 419, 431, 439, 457, 521, 541, 571, 563, 599, 607, 631, 659, 673, 709, 719, 727, 769, 809, 811, 809, 857, 911, 911, 919, 937, 967, 967
Offset: 1

Views

Author

Cino Hilliard, Nov 19 2002

Keywords

References

  • Hans Rademacher, Lectures on Elementary Number Theory, 1964: Primes in an arithmetic progression - Proof of Dirichlet's Theorem. pp. 121-136.

Crossrefs

Extensions

Edited by Don Reble, May 03 2006

A190664 Least semiprime whose prime factors differ by 2*prime(n).

Original entry on oeis.org

21, 55, 39, 51, 203, 87, 111, 123, 371, 183, 335, 395, 623, 267, 291, 327, 1703, 635, 411, 1043, 447, 815, 1211, 543, 591, 7223, 1055, 2951, 1115, 687, 771, 1883, 831, 843, 4043, 1535, 951, 1655, 1011, 1047, 12059, 1835, 2723, 1167, 1191, 1203, 4763, 1347
Offset: 1

Views

Author

Michel Lagneau, May 16 2011

Keywords

Examples

			a(5) = 203 because 203 = 7*29, and 29 - 7 = 22 = 2*11 = 2*prime(5).
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p=3}, While[! PrimeQ[p+2*Prime[n]], p=NextPrime[p]]; p*(p+2*Prime[n])]; Table[f[n], {n, 1, 60}]

Formula

a(n) = A073703(n) * A073704(n).
Previous Showing 11-16 of 16 results.