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

A060308 Largest prime <= 2n.

Original entry on oeis.org

2, 3, 5, 7, 7, 11, 13, 13, 17, 19, 19, 23, 23, 23, 29, 31, 31, 31, 37, 37, 41, 43, 43, 47, 47, 47, 53, 53, 53, 59, 61, 61, 61, 67, 67, 71, 73, 73, 73, 79, 79, 83, 83, 83, 89, 89, 89, 89, 97, 97, 101, 103, 103, 107, 109, 109, 113, 113, 113, 113, 113, 113, 113, 127, 127, 131
Offset: 1

Views

Author

Labos Elemer, Mar 27 2001

Keywords

Comments

a(n) is the smallest k such that C(2n,n) divides k!. - Benoit Cloitre, May 30 2002
a(n) is largest prime factor of C(2n,n) = (2n)!/(n!)^2. - Alexander Adamchuk, Jul 11 2006
a(n) is also the largest prime in the interval [n,2n]. - Peter Luschny, Mar 04 2011
Odd prime p repeats (q-p)/2 times, where q > p is the next prime. In particular, every lesser of twin primes (A001359) occurs 1 time, every lesser more than 3 of cousin primes (A023200) occurs 2 times, etc. - Vladimir Shevelev, Mar 12 2012

Examples

			n=1, 2n=2, p(1) = 2 = a(1) is the largest prime not exceeding 2.
		

Crossrefs

Apart from initial term, same as A060265.
Cf. A007917 (largest prime <= n), A005843 (2n).

Programs

Formula

a(n) = Max[FactorInteger[(2n)!/(n!)^2]]. - Alexander Adamchuk, Jul 11 2006
a(n) = A006530(A000142(2*n)) and a(n) = A006530(A056040(2*n)). - Peter Luschny, Mar 04 2011
a(n) ~ 2*n as n tends to infinity. - Vladimir Shevelev, Mar 12 2012
a(n) = A007917(A005843(n)) = A226078(n, A067434(n)). - Reinhard Zumkeller, May 25 2013

Extensions

More terms from Alexander Adamchuk, Jul 11 2006

A060266 Difference between 2n and the following prime.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 3, 1, 1, 5, 3, 1, 3, 1, 1, 3, 1, 5, 3, 1, 5, 3, 1, 1, 5, 3, 1, 3, 1, 1, 5, 3, 1, 3, 1, 5, 3, 1, 7, 5, 3, 1, 3, 1, 1, 3, 1, 1, 3, 1, 13, 11, 9, 7, 5, 3, 1, 3, 1, 5, 3, 1, 1, 9, 7, 5, 3, 1, 1, 5, 3, 1, 5, 3, 1, 3, 1, 5, 3, 1, 5, 3, 1, 1, 9, 7, 5, 3, 1, 1, 3, 1, 1, 11, 9, 7, 5
Offset: 1

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nextprime(2*i)-2*i,i=1..256)];
  • Mathematica
    d2n[n_]:=Module[{c=2n},NextPrime[c]-c]; Array[d2n,120] (* Harvey P. Dale, May 14 2011 *)
    Table[NextPrime@ # - # &[2 n], {n, 120}] (* Michael De Vlieger, Feb 18 2017 *)
  • PARI
    a(n) = nextprime(2*n+1) - 2*n; \\ Michel Marcus, Feb 19 2017

Formula

Conjecture: Limit_{n->oo} (Sum_{k=1..n} a(k)) / (Sum_{k=1..n} log(2*k)) = 1. - Alain Rocchelli, Oct 24 2023

A118750 a(n) = product[k=1..n] P(k), where P(k) is the largest prime <= 3*k. a(n) = product[k=1..n] A118749(k).

Original entry on oeis.org

3, 15, 105, 1155, 15015, 255255, 4849845, 111546435, 2565568005, 74401472145, 2306445636495, 71499814731345, 2645493145059765, 108465218947450365, 4664004414740365695, 219208207492797187665, 10302785752161467820255
Offset: 1

Views

Author

Jonathan Vos Post, Apr 29 2006

Keywords

Comments

Differs from (after first term) A048599 "Partial products of the sequence (A001097) of twin primes" after 8th term. Differs from (after first term) A070826 "One half of product of first n primes A000040" after 9th term. Analogous to A118455 a(1)=1. a(n) = product{k=1..n} P(k), where P(k) is the largest prime <= k.

Crossrefs

A060267 Difference between 2 closest primes surrounding 2n.

Original entry on oeis.org

2, 2, 4, 4, 2, 4, 4, 2, 4, 4, 6, 6, 6, 2, 6, 6, 6, 4, 4, 2, 4, 4, 6, 6, 6, 6, 6, 6, 2, 6, 6, 6, 4, 4, 2, 6, 6, 6, 4, 4, 6, 6, 6, 8, 8, 8, 8, 4, 4, 2, 4, 4, 2, 4, 4, 14, 14, 14, 14, 14, 14, 14, 4, 4, 6, 6, 6, 2, 10, 10, 10, 10, 10, 2, 6, 6, 6, 6, 6, 6, 4, 4, 6, 6, 6, 6, 6, 6, 2, 10, 10, 10, 10, 10, 2, 4
Offset: 2

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Examples

			a(3) = 2 because the closest primes to 2*3 = 6 are (5,7) and the difference between these is 2. - _Michael De Vlieger_, Nov 02 2017
		

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nextprime(2*i)-prevprime(2*i),i=2..256)];
  • Mathematica
    Array[Subtract @@ NextPrime[#, {1, -1}] &[2 #] &, 96, 2] (* Michael De Vlieger, Nov 02 2017 *)
    NextPrime[#]-NextPrime[#,-1]&/@(2*Range[2,100]) (* Harvey P. Dale, Nov 07 2017 *)
  • PARI
    a(n) = nextprime(2*n+1) - precprime(2*n-1); \\ Michel Marcus, Sep 16 2020

A060272 Distance from n^2 to closest prime.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Examples

			n=1: n^2=1 has next prime 2, so a(1)=1;
n=11: n^2=121 is between primes {113,127} and closer to 127, thus a(11)=6.
		

Crossrefs

Programs

  • Maple
    seq((s-> min(nextprime(s)-s, `if`(s>2, s-prevprime(s), [][])))(n^2), n=1..256);  # edited by Alois P. Heinz, Jul 16 2017
  • Mathematica
    Table[Function[k, Min[k - #, NextPrime@ # - k] &@ If[n == 1, 0, Prime@ PrimePi@ k]][n^2], {n, 103}] (* Michael De Vlieger, Jul 15 2017 *)
    Min[#-NextPrime[#,-1],NextPrime[#]-#]&/@(Range[110]^2) (* Harvey P. Dale, Jun 26 2021 *)
  • PARI
    a(n) = if (n==1, nextprime(n^2) - n^2, min(n^2 - precprime(n^2), nextprime(n^2) - n^2)); \\ Michel Marcus, Jul 16 2017

Formula

a(n) = abs(A000290(n) - A113425(n)) = abs(A000290(n) - A113426(n)). - Reinhard Zumkeller, Oct 31 2005

A118747 a(n) = product[k=1..n] P(k), where P(k) is the largest prime <= 2*k. a(n) = product[k=1..n] A060308(k).

Original entry on oeis.org

2, 6, 30, 210, 1470, 16170, 210210, 2732730, 46456410, 882671790, 16770764010, 385727572230, 8871734161290, 204049885709670, 5917446685580430, 183440847252993330, 5686666264842793230, 176286654210126590130
Offset: 1

Views

Author

Jonathan Vos Post, Apr 29 2006

Keywords

Crossrefs

A118752 a(n) = product[k=0..n] P(k), where P(k) is the smallest prime > 3*n. a(n) = product[k=0..n] A118751(k).

Original entry on oeis.org

2, 10, 70, 770, 10010, 170170, 3233230, 74364290, 2156564410, 62540367890, 1938751404590, 71733801969830, 2654150672883710, 108820177588232110, 4679267636293980730, 219925578905817094310, 11656055682008305998430
Offset: 0

Views

Author

Jonathan Vos Post, Apr 29 2006

Keywords

Comments

Analogous to A118456 a(n) = product{k=1..n} P(k), where P(k) is the smallest prime >= k.

Crossrefs

Programs

  • Mathematica
    Rest[FoldList[Times,1,Table[NextPrime[3n],{n,0,20}]]] (* Harvey P. Dale, Mar 09 2014 *)

Extensions

Definition corrected by Harvey P. Dale, Mar 09 2014
Showing 1-7 of 7 results.