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.

A066066 a(n) = prime(2*n) - 2*prime(n).

Original entry on oeis.org

-1, 1, 3, 5, 7, 11, 9, 15, 15, 13, 17, 15, 19, 21, 19, 25, 21, 29, 29, 31, 35, 35, 33, 45, 35, 37, 45, 49, 53, 55, 39, 49, 43, 59, 51, 57, 59, 57, 63, 63, 63, 71, 61, 71, 69, 81, 69, 57, 67, 83, 91, 91, 95, 91, 87, 87, 81, 99, 93, 97, 107, 97, 87, 97, 107, 109, 95, 95, 93, 111, 115, 109, 105, 111, 105, 115, 109, 117, 127, 123, 115
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 01 2001

Keywords

Comments

a(n) = A022457(n) for n > 1.
a(n) = A031215(n)-A100484(n) = A072473(n)-A000040(n); see A179740 for primes. - Reinhard Zumkeller, Jul 25 2010
Asymptotically, a(n) ~ log(4) n, with log(4) = 2 log 2 = 1.38629436111989... = A016627. - M. F. Hasler, Oct 19 2013

Programs

  • Mathematica
    Table[Prime[2n]-2Prime[n],{n,100}] (* Harvey P. Dale, Aug 21 2016 *)
  • PARI
    { for (n = 1, 1000, a=prime(2*n) - prime(n)*2; write("b066066.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 09 2009
    
  • PARI
    A066066(n)=prime(2*n)-2*prime(n) \\ M. F. Hasler, Oct 19 2013

A069890 Smallest odd number k such that p(2m)-2p(m)=k has exactly n solutions (where p(m) = m-th prime).

Original entry on oeis.org

23, 1, 19, 15, 209, 433, 657, 135, 435, 2715, 9525, 9639, 20757, 20493, 4389, 47025, 27555, 193875, 162435, 51405, 811497, 764547, 832995, 811485, 811515, 193755, 1233309, 811473, 15680805, 4247325, 10797675, 12945345, 15391761
Offset: 0

Views

Author

Labos Elemer, May 06 2002

Keywords

Examples

			n=0: 23 is the smallest odd number without solutions: see A070774. For n=1, .., 8 the solutions are s1={3}, s2={41, 47}, s3={19, 23, 37}, s4={661, 769, 787, 811}, s5={1619, 1667, 1709, 1823, 1979}, s6={2777, 2843, 2851, 2861, 2897, 3251}, s7={439, 443, 449, 457, 487, 557, 593}, s8={1621, 1637, 1699, 1723, 1741, 1777, 1811, 1987}, expressed in terms of p(x) primes; either values of x and 2x indices or p(2x) are further computable. Odd numbers a(n) forming sequence corresponds to values of p(2x)-2p(x). E.g. p[2*Pi[s4]]=p[2x]={1531, 1747, 1783, 1831} and p[2x]-2p[x]]={209, 209, 209, 209} gives a(4)=209.
		

Crossrefs

Extensions

a(15)-a(32) from Donovan Johnson, Oct 27 2008

A070773 Number of solutions to p(2m)-2p(m)=2n-1, where p(m) = m-th prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 2, 0, 1, 0, 2, 1, 1, 3, 1, 1, 0, 1, 2, 0, 2, 1, 1, 1, 3, 2, 1, 3, 0, 1, 2, 2, 0, 0, 0, 0, 2, 1, 0, 3, 0, 3, 2, 3, 3, 1, 0, 0, 2, 2, 3, 2, 0, 3, 1, 0, 1, 1, 0, 1, 1, 1, 1, 7, 1, 2, 2, 1, 1, 1, 1, 2, 1, 0, 2, 0, 0, 2, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 2, 2, 3, 3, 2, 1, 2, 1, 2, 2, 4
Offset: 1

Views

Author

Labos Elemer, May 06 2002

Keywords

Comments

p(2m)-2p(m) is approximately 2m Log[2].

Examples

			n=12: 2n-1=23, no solution, so a(12)=0; n=8: 2n-1=15, p[2x]={53,61,89},2*p(x)=2*{19,23,37}={38,46,74}, p[2x]-2p[x]={15,15,15}, three solutions, so a(8)=3.
		

Crossrefs

Programs

  • Mathematica
    j=0; Table[Print[j]; j=0; Do[s=Prime[2*n]-2*Prime[n]; If[Equal[s, 2*k-1], j=j+1], {n, 1, 2*k}], {k, 1, 11000}] (*number of solution=j*)

A070774 Odd numbers n such that p(2m)-2p(m)=n has no solution (p(m) = m-th prime).

Original entry on oeis.org

23, 27, 41, 47, 65, 73, 75, 77, 79, 85, 89, 101, 103, 113, 119, 125, 155, 159, 161, 165, 169, 175, 179, 183, 215, 217, 221, 233, 249, 253, 257, 263, 265, 275, 289, 291, 297, 299, 311, 329, 339, 341, 345, 347, 349, 353, 359, 363, 367, 375, 377, 379, 385, 395
Offset: 1

Views

Author

Labos Elemer, May 06 2002

Keywords

Crossrefs

Showing 1-4 of 4 results.