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

A079953 Smallest prime p such that prime(n) mod 2*p = prime(n).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jan 19 2003

Keywords

Comments

a(n) is smallest prime greater than prime(n)/2. - Peter Munn, Sep 18 2017

Examples

			n=6: prime(6)=13 and 13 mod(2*2)=1, 13 mod(2*3)=1, 13 mod(2*5)=3, 13 mod(2*7)=13, therefore a(6)=7.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = 2}, While[Prime@ n != Mod[Prime@ n, 2 p], p = NextPrime@ p]; p]; Array[f, 64] (* Michael De Vlieger, Mar 17 2015 *)
  • PARI
    a(n,q=prime(n))=nextprime(q/2) \\ Charles R Greathouse IV, Mar 17 2015

Formula

T(n, A049084(a(n))) = A000040(n), T defined as in A079950.
a(n) = nextprime(prime(n)/2) ~ (n log n)/2. - Charles R Greathouse IV, Mar 17 2015
Conjecture: a(n) = A039734(n), n>=2. - R. J. Mathar, May 03 2021

A217564 Number of primes between prime(n)/2 and prime(n+1)/2.

Original entry on oeis.org

0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 2, 0, 1, 0, 2, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 2, 2, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1
Offset: 1

Views

Author

Hans Havermann, Oct 06 2012

Keywords

Comments

Conjecture: this sequence is unbounded, as implied by Dickson's conjecture. - Charles R Greathouse IV, Oct 09 2012
Conjecture: 0 appears infinitely often. - Jon Perry, Oct 10 2012
First differences of A079952. - Peter Munn, Oct 19 2017

Examples

			a(30) = 2 because there are two primes between prime(30)/2 [=113/2] and prime(31)/2 [=127/2]; i.e., the numbers 59 and 61.
		

Crossrefs

Cf. A215237 (location of first n).
A164368 lists the prime(n) corresponding to the zero terms.

Programs

  • Mathematica
    q = 2; Table[p = q; q = NextPrime[p]; Length[Position[PrimeQ[Range[p + 1, q - 1, 2]/2], True]], {105}]
    Table[PrimePi[Prime[n + 1]/2] - PrimePi[Prime[n]/2], {n, 105}] (* Alonso del Arte, Oct 08 2012 *)

Formula

a(n) = pi(prime(n + 1)/2) - pi(prime(n)/2), where pi is the prime counting function and prime(n) is the n-th prime.
Equivalently, a(n) = A079952(n+1) - A079952(n). - Peter Munn, Oct 19 2017
The average order of a(n) is 1/2, that is, a(1) + a(2) + ... + a(n) ~ n/2. - Charles R Greathouse IV, Oct 09 2012

A079950 Triangle of n-th prime modulo twice primes less n-th prime.

Original entry on oeis.org

2, 3, 3, 1, 5, 5, 3, 1, 7, 7, 3, 5, 1, 11, 11, 1, 1, 3, 13, 13, 13, 1, 5, 7, 3, 17, 17, 17, 3, 1, 9, 5, 19, 19, 19, 19, 3, 5, 3, 9, 1, 23, 23, 23, 23, 1, 5, 9, 1, 7, 3, 29, 29, 29, 29, 3, 1, 1, 3, 9, 5, 31, 31, 31, 31, 31, 1, 1, 7, 9, 15, 11, 3, 37, 37, 37, 37, 37, 1, 5, 1, 13, 19, 15, 7, 3, 41
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 19 2003

Keywords

Comments

The right border of the triangle are the primes: T(n,n)=A000040(n); T(n,1)=A039702(n), T(n,2)=A039704(n) for n>1, T(n,3)=A007652(n) for n>2, T(n,4)=A039712(n) for n>3;

Examples

			Triangle begins:
  2;
  3, 3;
  1, 5, 5;
  3, 1, 7,  7;
  3, 5, 1, 11, 11;
  1, 1, 3, 13, 13, 13;
  1, 5, 7,  3, 17, 17, 17;
  ...
		

Crossrefs

Programs

  • Maple
    A079950 := proc(n,k)
        modp(ithprime(n),2*ithprime(k)) ;
    end proc:
    seq(seq(A079950(n,k),k=1..n),n=1..12) ; # R. J. Mathar, Sep 28 2017
  • PARI
    T(n,k) = prime(n) % (2*prime(k));
    tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n,k), ", ")); print); \\ Michel Marcus, Sep 21 2017

Formula

T(n, k) = prime(n) mod 2*prime(k), 1<=k<=n.

A055377 a(n) = largest prime <= n/2.

Original entry on oeis.org

2, 2, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 29, 29, 29, 29, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 37, 37, 37, 37, 37
Offset: 4

Views

Author

Labos Elemer, Jun 22 2000; David W. Wilson, Jun 10 2005

Keywords

Comments

Also largest prime factor of any composite <= n. E.g., a(15) = 7 since 7 is the largest prime factor of {4,6,8,9,10,12,14,15}, the composites <= 15.
Also largest prime dividing A025527(n) = n!/lcm[1,...,n]. [Comment from Ray Chandler, Apr 26 2007: Primes > n/2 don't appear as factors of A025527(n) since they appear once in n! and again in the denominator lcm[1,...,n]. Primes <= n/2 appear more times in the numerator than the denominator so they appear in the fraction.]
a(n) is the largest prime factor whose exponent in the factorization of n! is greater than 1. - Michel Marcus, Nov 11 2018

Examples

			n = 10, n! = 3628800, lcm[1,...,10] = 2520, A025527(10) = 1440 = 32*9*5 so a(7) = 5 (offset = 3).
		

Crossrefs

Programs

Formula

a(n) = Max(gpf((n+2) mod k): 1 < k < (n+2) and k not prime), with gpf=A006530 (greatest prime factor). - Reinhard Zumkeller, Mar 27 2004
Where defined, that is for n > 2, a(A000040(n)) = A000040(A079952(n)). - Peter Munn, Sep 18 2017

Extensions

More terms from James Sellers, Jul 04 2000
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 14 2007

A079951 Number of primes p with prime(n) == 1 (modulo 2*p).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jan 19 2003

Keywords

Examples

			n=6: prime(6)=13 and 13 mod (2*2) = 1, 13 mod (2*3) = 1, 13 mod(2*5) = 3, 13 mod (2*7) = 13, therefore a(6)=2.
		

Crossrefs

Programs

  • Mathematica
    Table[PrimeNu[Floor[Prime[n]/2]], {n, 105}] (* Jon Maiga, Jan 06 2019 *)
  • PARI
    a(n) = omega(prime(n)\2); \\ Michel Marcus, Jan 06 2019

Formula

a(n) = A001221(floor(A000040(n)/2)). - Jon Maiga, Jan 06 2019

A369610 a(n) is the number of nonprime numbers < prime(n) which are not equal to twice a prime.

Original entry on oeis.org

1, 1, 1, 1, 3, 4, 6, 7, 9, 13, 14, 18, 20, 21, 23, 28, 32, 33, 37, 40, 41, 45, 47, 51, 57, 60, 61, 63, 64, 67, 78, 81, 85, 86, 93, 94, 99, 103, 105, 110, 114, 115, 124, 125, 127, 128, 137, 146, 148, 149, 152, 157, 158, 167, 171, 175, 180, 181, 185, 187, 188, 197, 208, 211
Offset: 1

Views

Author

David James Sycamore, Jan 27 2024

Keywords

Examples

			a(n) = 1 for n = 1..4 since in each case there is only one nonprime number (1) < prime(n) which is not twice a prime.
a(5) = 3 since prime(5) = 11 and there are precisely 3 nonprime numbers < 11 which are not twice a prime (1,8,9).
		

Crossrefs

Programs

  • Mathematica
    nn = Prime[10^4]; c = p = 0; Reap[Do[c += 1 - Boole[PrimeQ[i/2]]; If[PrimeQ[i], p++; Sow[c - p]], {i, nn}]][[-1, 1]] (* Michael De Vlieger, Jan 27 2024 *)
  • PARI
    a369610(n) = {my(s=1); forcomposite (j=4, prime(n)-1, if(j%2!=0 || !isprime(j/2), s++)); s} \\ Hugo Pfoertner, Jan 27 2024

Formula

a(n) = A014689(n) - A079952(n). - Jinyuan Wang, Feb 09 2024
Showing 1-6 of 6 results.