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-10 of 15 results. Next

A168394 Moebius function of even interprimes (A072568).

Original entry on oeis.org

1, 0, 0, 1, -1, 1, -1, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, -1, 1, 0, -1, 0, 1, -1, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, 1, 1, -1, -1, -1, 0, 0, 0, -1, -1, 0, -1, 0, 0, 0, 0, 0, 1, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 1, 1
Offset: 1

Views

Author

Jani Melik, Nov 24 2009

Keywords

Crossrefs

Cf. A008683.

Programs

  • Maple
    ts_fip_sod:=proc(n) local i,an,tren: an:=[ ]: for i from 2 to n do tren:=(ithprime(i)+ithprime(i+1))/2: if (tren mod 2 = 0) then an:=[ op(an), numtheory[mobius](tren) ]: fi: od: RETURN(an) end: ts_fip_sod(1000);

A024675 Average of two consecutive odd primes.

Original entry on oeis.org

4, 6, 9, 12, 15, 18, 21, 26, 30, 34, 39, 42, 45, 50, 56, 60, 64, 69, 72, 76, 81, 86, 93, 99, 102, 105, 108, 111, 120, 129, 134, 138, 144, 150, 154, 160, 165, 170, 176, 180, 186, 192, 195, 198, 205, 217, 225, 228, 231, 236, 240, 246, 254, 260, 266, 270, 274, 279, 282, 288, 300
Offset: 1

Views

Author

Keywords

Comments

Sometimes called interprimes.
Where local maxima of A072681 occur: A072681(a(n))=A074927(n+1). - Reinhard Zumkeller, Mar 04 2009
Never prime, for that would contradict the definition. - Jon Perry, Dec 05 2012
A subset of A145025, obtained from that sequence by omitting the primes (which are barycenter of their neighboring primes). - M. F. Hasler, Jun 01 2013
Conjecture: Product_{k=1..n} a(k)/A028334(k+1) is an integer for every natural n. Cf. A352743. - Thomas Ordowski, Mar 31 2022
In contrast to the arithmetic mean, the geometric and the harmonic mean of two consecutive primes is never an integer. What is the first case where either of the two would differ from the arithmetic mean, i.e., this sequence? The existence of such a pair of primes is related to Legendre's conjecture, cf. link to discussion on the math-fun mailing list. - M. F. Hasler, Apr 07 2025

Crossrefs

Cf. A072568, A072569. Bisections give A058296, A079424.
Cf. A373699 (partial sums).

Programs

  • Maple
    seq( ( (ithprime(x)+ithprime(x+1))/2 ),x=2..40);
  • Mathematica
    Plus @@@ Partition[Table[Prime[n], {n, 2, 100}], 2, 1]/2
    ListConvolve[{1, 1}/2, Prime /@ Range[2, 70]] (* Jean-François Alcover, Jun 25 2013 *)
    Mean/@Partition[Prime[Range[2,70]],2,1] (* Harvey P. Dale, Jul 28 2020 *)
  • PARI
    for(X=2,50,print((prime(X)+prime(X+1))/2)) \\ Hauke Worpel (thebigh(AT)outgun.com), May 08 2008
    
  • PARI
    first(n)=my(v=primes(n+2)); vector(n,i,v[i+1]+v[i+2])/2 \\ Charles R Greathouse IV, Jun 25 2013
    
  • Python
    from sympy import prime
    def a(n): return (prime(n + 1) + prime(n + 2)) // 2
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 11 2017

Formula

a(n) = (prime(n+1)+prime(n+2))/2 = A001043(n+1)/2. - Omar E. Pol, Feb 02 2012
Conjecture: a(n) = ceiling(sqrt(prime(n+1)*prime(n+2))). - Thomas Ordowski, Mar 22 2013 [This requires gaps to be smaller than approximately sqrt(8p) and hence requires a result on prime gaps slightly stronger than that provided by the Riemann hypothesis. - Charles R Greathouse IV, Jul 13 2022]
Equals A145025 \ A006562 = A145025 \ A000040. - M. F. Hasler, Jun 01 2013

A075190 Numbers k such that k^2 is an interprime = average of two successive primes.

Original entry on oeis.org

2, 3, 8, 9, 12, 15, 18, 21, 25, 33, 41, 51, 60, 64, 72, 78, 92, 112, 117, 129, 138, 140, 159, 165, 168, 172, 192, 195, 198, 213, 216, 218, 228, 237, 273, 295, 298, 303, 304, 309, 322, 327, 330, 338, 342, 356, 360, 366, 387, 393, 408, 416, 429, 432, 441, 447, 456
Offset: 1

Views

Author

Zak Seidov, Sep 09 2002

Keywords

Comments

Interprimes are in A024675, even interprimes are in A072568, odd interprimes are in A072569 n^3 as interprimes are in A075191, n^4 as interprimes are in A075192, n^5 as interprimes are in A075228, n^6 as interprimes are in A075229, n^7 as interprimes are in A075230, n^8 as interprimes are in A075231, n^9 as interprimes are in A075232, n^10 as interprimes are in A075233, a(n) such that a(n)^n = smallest interprime (of the form a^n) are in A075234.

Examples

			3 is a term because 3^2 = 9 is the average of two successive primes 7 and 11.
		

Crossrefs

Programs

  • Maple
    s := 2: for n from 2 to 1000 do if prevprime(n^s)+nextprime(n^s)=2*n^s then print(n) else; fi; od;
  • Mathematica
    PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Select[ Range[464], 2#^2 == PrevPrim[ #^2] + NextPrim[ #^2] &] (* Robert G. Wilson v, Sep 14 2002 *)
    n2ipQ[n_]:=Module[{n2=n^2},(NextPrime[n2]+NextPrime[n2,-1])/2==n2]; Select[Range[500],n2ipQ] (* Harvey P. Dale, May 04 2011 *)
    Select[Sqrt[Mean[#]]&/@Partition[Prime[Range[30000]],2,1],IntegerQ] (* Harvey P. Dale, May 26 2013 *)

Formula

a(n) = sqrt(A069495(n)).

Extensions

Edited by Robert G. Wilson v, Sep 14 2002

A072569 Odd interprimes.

Original entry on oeis.org

9, 15, 21, 39, 45, 69, 81, 93, 99, 105, 111, 129, 165, 195, 205, 217, 225, 231, 279, 309, 315, 351, 363, 381, 393, 399, 405, 441, 453, 459, 465, 473, 483, 489, 495, 501, 515, 615, 625, 645, 667, 675, 687, 705, 723, 741, 747, 759, 765, 771, 803, 825, 855, 861
Offset: 1

Views

Author

Marco Matosic, Jun 24 2002

Keywords

Comments

The interprimes (A024675) are those integers that lie at the midpoint between consecutive odd primes.

Crossrefs

Odd members of A024675. Sequence is union of A072572 and A072573.

Programs

  • Mathematica
    a = Table[ Prime[n], {n, 2, 200}]; b = {}; Do[d = (a[[n + 1]] - a[[n]])/2; If[ OddQ[ a[[n]] + d], b = Append[b, a[[n]] + d]], {n, 1, 198}]; b
    Select[Plus @@@ Partition[Table[Prime[n], {n, 2, 100}], 2, 1]/2, OddQ]
    Select[Mean/@Partition[Prime[Range[2,200]],2,1],OddQ] (* Harvey P. Dale, Jan 22 2019 *)

Extensions

Edited by N. J. A. Sloane and Robert G. Wilson v, Jun 27 2002

A075191 Numbers k such that k^3 is an interprime = average of two successive primes.

Original entry on oeis.org

4, 12, 16, 26, 28, 36, 48, 58, 66, 68, 74, 78, 102, 106, 112, 117, 124, 126, 129, 130, 148, 152, 170, 174, 184, 189, 190, 192, 224, 273, 280, 297, 321, 324, 369, 372, 373, 399, 408, 410, 421, 426, 429, 435, 447, 449, 450, 470, 475, 496, 504, 507, 531, 537
Offset: 1

Views

Author

Zak Seidov, Sep 09 2002

Keywords

Comments

Interprimes are in A024675, even interprimes are in A072568, odd interprimes are in A072569 n^2 as interprimes are in A075190, n^4 as interprimes are in A075192, n^5 as interprimes are in A075228, n^6 as interprimes are in A075229, n^7 as interprimes are in A075230, n^8 as interprimes are in A075231, n^9 as interprimes are in A075232, n^10 as interprimes are in A075233, a(n) such that a(n)^n = smallest interprime (of the form a^n) are in A075234.

Examples

			4 is a term because 4^3 = 64 is the average of two successive primes 61 and 57.
		

Crossrefs

Programs

  • Maple
    s := 3: for n from 2 to 1000 do if prevprime(n^s)+nextprime(n^s)=2*n^s then print(n) else; fi; od;
  • Mathematica
    Select[ Range[548], 2#^3 == PrevPrim[ #^3] + NextPrim[ #^3] &]
    n3ipQ[n_]:=Mean[{NextPrime[n^3],NextPrime[n^3,-1]}]==n^3; Select[ Range[ 600],n3ipQ] (* Harvey P. Dale, Oct 05 2017 *)
    Select[Surd[Mean[#],3]&/@Partition[Prime[Range[8*10^6]],2,1],IntegerQ] (* Harvey P. Dale, Apr 07 2023 *)
  • PARI
    is(n)=n=n^3;nextprime(n)+precprime(n)==2*n \\ Charles R Greathouse IV, Aug 25 2014

Extensions

Edited by Robert G. Wilson v Sep 14 2002

A075192 Numbers k such that k^4 is an interprime = average of two successive primes.

Original entry on oeis.org

3, 5, 8, 21, 55, 66, 87, 99, 104, 105, 110, 120, 129, 135, 141, 144, 152, 168, 172, 186, 187, 192, 211, 222, 243, 279, 283, 295, 297, 321, 342, 385, 395, 398, 408, 425, 426, 460, 520, 541, 559, 597, 626, 627, 638, 642, 657, 666, 673, 680, 713, 755, 759, 765
Offset: 1

Views

Author

Zak Seidov, Sep 09 2002

Keywords

Comments

Interprimes are in A024675, even interprimes are in A072568, odd interprimes are in A072569 n^2 as interprimes are in A075190, n^3 as interprimes are in A075191, n^5 as interprimes are in A075228, n^6 as interprimes are in A075229, n^7 as interprimes are in A075230, n^8 as interprimes are in A075231, n^9 as interprimes are in A075232, n^10 as interprimes are in A075233, a(n) such that a(n)^n = smallest interprime (of the form a^n) are in A075234.

Examples

			3 belongs to this sequence because 3^4 = 81 is the average of two successive primes 79 and 83.
		

Crossrefs

Programs

  • Maple
    s := 4: for n from 2 to 1000 do if prevprime(n^s)+nextprime(n^s)=2*n^s then print(n) else; fi; od;
  • Mathematica
    intprQ[n_]:=Module[{c=n^4},c==Mean[{NextPrime[c],NextPrime[c,-1]}]]; Select[Range[800],intprQ] (* Harvey P. Dale, Dec 01 2013 *)

Extensions

Edited by Robert G. Wilson v Sep 14 2002

A075228 Numbers k such that k^5 is an interprime = average of two successive primes.

Original entry on oeis.org

20, 42, 77, 81, 186, 198, 200, 220, 248, 266, 270, 294, 300, 387, 411, 477, 498, 537, 630, 678, 682, 696, 728, 741, 774, 819, 872, 985, 987, 1001, 1014, 1037, 1060, 1083, 1084, 1087, 1098, 1140, 1155, 1162, 1232, 1245, 1278, 1316, 1370, 1392, 1397, 1402
Offset: 1

Views

Author

Zak Seidov, Sep 09 2002

Keywords

Comments

Interprimes are in A024675, even interprimes are in A072568, odd interprimes are in A072569 n^2 as interprimes are in A075190, n^3 as interprimes are in A075191, n^4 as interprimes are in A075192, n^6 as interprimes are in A075229, n^7 as interprimes are in A075230, n^8 as interprimes are in A075231, n^9 as interprimes are in A075232, n^10 as interprimes are in A075233, a(n) such that a(n)^n = smallest interprime (of the form a^n) are in A075234.

Examples

			20 is a term because 20^5 = 3200000 is the average of two successive primes 3199997 and 3200003.
		

Crossrefs

Programs

  • Maple
    s := 5: for n from 2 to 1000 do if prevprime(n^s)+nextprime(n^s)=2*n^s then print(n) else; fi; od;

Extensions

More terms from Jason Earls, Sep 09 2002
Edited by Robert G. Wilson v Sep 14 2002

A075229 Numbers k such that k^6 is an interprime = average of two successive primes.

Original entry on oeis.org

2, 4, 6, 18, 24, 27, 30, 53, 96, 122, 175, 195, 213, 231, 265, 300, 408, 420, 426, 450, 492, 532, 570, 614, 618, 657, 682, 705, 774, 777, 822, 858, 915, 946, 948, 1001, 1008, 1061, 1073, 1107, 1145, 1186, 1233, 1269, 1323, 1352, 1374, 1406, 1413, 1440, 1480
Offset: 1

Views

Author

Zak Seidov, Sep 09 2002

Keywords

Comments

Interprimes are in A024675, even interprimes are in A072568, odd interprimes are in A072569 n^2 as interprimes are in A075190, n^3 as interprimes are in A075191, n^4 as interprimes are in A075192, n^5 as interprimes are in A075228, n^7 as interprimes are in A075230, n^8 as interprimes are in A075231, n^9 as interprimes are in A075232, n^10 as interprimes are in A075233, a(n) such that a(n)^n = smallest interprime (of the form a^n) are in A075234.

Examples

			2 is a term because 2^6 = 64 is the average of two successive primes 63 and 67.
		

Crossrefs

Programs

  • Maple
    s := 6: for n from 2 to 1000 do if prevprime(n^s)+nextprime(n^s)=2*n^s then print(n) else; fi; od;
  • Mathematica
    Select[Range[1500], 2#^6 == NextPrime[#^6,-1] + NextPrime[#^6] &]

Extensions

Edited by Robert G. Wilson v Sep 14 2002

A075230 Numbers k such that k^7 is an interprime = average of two successive primes.

Original entry on oeis.org

20, 33, 41, 71, 82, 99, 151, 165, 254, 267, 283, 316, 345, 462, 486, 496, 516, 630, 657, 668, 676, 681, 687, 724, 760, 945, 1004, 1050, 1085, 1167, 1305, 1314, 1316, 1326, 1335, 1389, 1414, 1420, 1454, 1456, 1512, 1638, 1644, 1726, 1803, 1874, 1905, 1963
Offset: 1

Views

Author

Zak Seidov, Sep 09 2002

Keywords

Comments

Interprimes are in A024675, even interprimes are in A072568, odd interprimes are in A072569 n^2 as interprimes are in A075190, n^3 as interprimes are in A075191, n^4 as interprimes are in A075192, n^5 as interprimes are in A075228, n^6 as interprimes are in A075229, n^8 as interprimes are in A075231, n^9 as interprimes are in A075232, n^10 as interprimes are in A075233, a(n) such that a(n)^n = smallest interprime (of the form a^n) are in A075234.

Examples

			20 is a term because 20^7 = 1280000000 is the average of two successive primes 1279999997 and 1280000003.
		

Crossrefs

Programs

  • Maple
    s := 7: for n from 2 to 1000 do if prevprime(n^s)+nextprime(n^s)=2*n^s then print(n) else; fi; od;
  • Mathematica
    Select[Range[2000],Mean[{NextPrime[#^7],NextPrime[#^7,-1]}]==#^7&] (* Harvey P. Dale, Aug 09 2013 *)

Extensions

Edited by Robert G. Wilson v Sep 14 2002

A075231 Numbers k such that k^8 is an interprime = average of two successive primes.

Original entry on oeis.org

12, 111, 116, 175, 183, 205, 246, 305, 313, 406, 438, 593, 594, 620, 696, 714, 788, 824, 844, 969, 1014, 1023, 1061, 1080, 1153, 1176, 1204, 1288, 1367, 1456, 1470, 1515, 1533, 1538, 1572, 1626, 1659, 1689, 1692, 1695, 1734, 1759, 1788, 1860, 1928
Offset: 1

Views

Author

Zak Seidov, Sep 09 2002

Keywords

Comments

Interprimes are in A024675, even interprimes are in A072568, odd interprimes are in A072569 n^2 as interprimes are in A075190, n^3 as interprimes are in A075191, n^4 as interprimes are in A075192, n^5 as interprimes are in A075228, n^6 as interprimes are in A075229, n^7 as interprimes are in A075230, n^9 as interprimes are in A075232, n^10 as interprimes are in A075233, a(n) such that a(n)^n = smallest interprime (of the form a^n) are in A075234.

Examples

			12 is a term because 12^8 = 429981696 is the average of two successive primes 429981691 and 429981701.
		

Crossrefs

Programs

  • Maple
    s := 8: for n from 2 to 1000 do if prevprime(n^s)+nextprime(n^s)=2*n^s then print(n) else; fi; od;
  • Mathematica
    Select[Range[2000], 2#^8 == NextPrime[#^8, -1] + NextPrime[#^8] &]

Extensions

Edited by Robert G. Wilson v Sep 14 2002
Showing 1-10 of 15 results. Next