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

A264719 Numbers that are greater than the average of their closest flanking primes.

Original entry on oeis.org

10, 11, 16, 17, 22, 27, 28, 29, 35, 36, 37, 40, 41, 46, 51, 52, 57, 58, 59, 65, 66, 67, 70, 71, 77, 78, 79, 82, 87, 88, 94, 95, 96, 97, 100, 101, 106, 107, 112, 121, 122, 123, 124, 125, 126, 127, 130, 135, 136, 137, 145, 146, 147, 148, 149, 155, 156, 161, 162
Offset: 1

Views

Author

Chris Boyd, Nov 21 2015

Keywords

Comments

Numbers that are nearer to the immediately next prime than to the immediately previous prime.
This sequence may be viewed as a generalization of A051634 (the strong primes) that includes qualifying composite numbers.
The union of this sequence with A264720 & A145025 is A000027 (omitting 1 & 2).

Examples

			a(11) = 37 because 37 > (31 + 41)/2 = 36.
a(12) = 40 because 40 > (37 + 41)/2 = 37.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 162, # > (Abs@ NextPrime[#, -1] + NextPrime@ #)/2 &] (* Michael De Vlieger, Nov 22 2015 *)
  • PARI
    test(n)= {if(n-precprime(n-1)>nextprime(n+1)-n&&n>2,return(1),return(0))}
    for(i=1,200,if(test(i),print1(i,", ")))

A264720 Numbers that are less than the average of their closest flanking primes.

Original entry on oeis.org

3, 7, 8, 13, 14, 19, 20, 23, 24, 25, 31, 32, 33, 38, 43, 44, 47, 48, 49, 54, 55, 61, 62, 63, 68, 73, 74, 75, 80, 83, 84, 85, 89, 90, 91, 92, 98, 103, 104, 109, 110, 113, 114, 115, 116, 117, 118, 119, 128, 131, 132, 133, 139, 140, 141, 142, 143, 151, 152, 153, 158
Offset: 1

Views

Author

Chris Boyd, Nov 21 2015

Keywords

Comments

Numbers that are nearer to the immediately previous prime than to the immediately next prime.
This sequence may be viewed as a generalization of A051635 (the weak primes) that includes qualifying composite numbers.
The union of this sequence with A264719 & A145025 is A000027 (omitting 1 & 2).

Examples

			a(11) = 31 because 31 < (29 + 37)/2 = 33.
a(12) = 32 because 32 < (31 + 37)/2 = 34.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 162, # < (NextPrime[#, -1] + NextPrime@ #)/2 &] (* Michael De Vlieger, Nov 22 2015 *)
  • PARI
    test(n)= {if(n-precprime(n-1)2,return(1),return(0))}
    for(i=1,200,if(test(i),print1(i,", ")))

A264721 Composite numbers that are greater than the average of their closest flanking primes.

Original entry on oeis.org

10, 16, 22, 27, 28, 35, 36, 40, 46, 51, 52, 57, 58, 65, 66, 70, 77, 78, 82, 87, 88, 94, 95, 96, 100, 106, 112, 121, 122, 123, 124, 125, 126, 130, 135, 136, 145, 146, 147, 148, 155, 156, 161, 162, 166, 171, 172, 177, 178, 187, 188, 189, 190, 196, 206, 207, 208
Offset: 1

Views

Author

Chris Boyd, Nov 21 2015

Keywords

Comments

Composite numbers that are nearer to the immediately next prime than to the immediately previous prime.
Members of this sequence are the numbers C, necessarily composite, such that I_n < C < P_n+1, where P_n is the n-th odd prime and I_n the interprime (A024675) between P_n and P_n+1.
Prime-free subsequence of A264719.

Examples

			a(7) = 36 because 36 > (31 + 37)/2 = 34.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 208, And[CompositeQ@ #, # > (Abs@ NextPrime[#, -1] + NextPrime@ #)/2] &] (* Michael De Vlieger, Nov 22 2015 *)
  • PARI
    test(n)= {if(n-precprime(n-1)>nextprime(n+1)-n&&n>2&&!isprime(n),return(1),return(0))}
    for(i=1,200,if(test(i),print1(i,", ")))
Showing 1-3 of 3 results.