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 24 results. Next

A101593 a(n) is the number of m <= 2^n which are in A075190, i.e., such that m^2 is exactly at the center between two consecutive primes, or in other words A056929(m) = 0.

Original entry on oeis.org

1, 2, 3, 6, 9, 14, 19, 34, 62, 109, 202, 336, 587, 1100, 2003, 3630, 6784, 12607, 23647, 44206, 83510, 157851, 299810, 571264, 1090986, 2088445, 4004347, 7687694, 14788984, 28496850, 54955214, 106159961
Offset: 1

Views

Author

Zak Seidov and M. F. Hasler, Dec 27 2007

Keywords

Comments

A056929(m) = 0 iff m^2 is an interprime <=> m^2 = (A007491(m^2) + A053001(m^2))/2 = average of the next higher and next lower primes.
From M. F. Hasler, Oct 18 2022: (Start)
The ratio a(n+1)/a(n) oscillates between 1.5 and 2 for the first few values, but then seems to converge to a limit between 1.9 and 2; from n = 19 on these ratios appear to be strictly increasing (from 1.87 at n = 19 to 1.92 at n = 27).
At first sight it seems natural that there are twice as many interprimes of the form f(m) when the upper limit on m is increased by a factor of 2, but this might depend on the function f.
If instead of m^2 we consider the same for m^3, then we find the sequence 0, 1, 1, 3, 5, 8, 18, 29, 52, 86, 136, 223, 421, 758, 1376, 2517, 4616, 8714, 16173, 30414, 57583, 109539, ... which follows roughly the same asymptotic behavior. (End)

Crossrefs

Programs

  • PARI
    a(n)=sum(i=2,2^n,!A056929(i))
    
  • PARI
    a(n)=sum(i=2,2^n,nextprime(i^2)+precprime(i^2)==2*i^2)
    
  • PARI
    t=0;vector(15,n,t+=sum(i=1/2<M. F. Hasler, Oct 18 2022] */
    for(n=16, 30, print1("/* a("n") = */ ", t += sum(i=2^(n-1)+1,2^n, nextprime(i^2)+precprime(i^2)==2*i^2),", "))

Formula

a(1) counts the squares m^2 with m <= 2^n = 2 which are interprimes. The squares 0^2 = 0 and 1^2 = 1 obviously aren't interprimes, so the only such square in that range is m^2 = 2^2 = 4 = (nextprime + precprime)/2 = (3 + 5)/2, so a(1) = 1.
Then for n = 2, up to m <= 2^n = 4 we have the additional squares m^2 = 3^2 = 9 = (7 + 11)/2 (an interprime) and m^2 = 4^2 = 16 <> (13 + 17)/2 = 15, so this m^2 is not an interprime, and a(2) = a(1) + 1 = 2.

Extensions

a(23)-a(25) from Kevin P. Thompson, Nov 26 2021
a(26)-a(28) from M. F. Hasler, Oct 18 2022
a(29)-a(32) from Bill McEachen, Dec 14 2022

A069495 Squares which are the arithmetic mean of two consecutive primes.

Original entry on oeis.org

4, 9, 64, 81, 144, 225, 324, 441, 625, 1089, 1681, 2601, 3600, 4096, 5184, 6084, 8464, 12544, 13689, 16641, 19044, 19600, 25281, 27225, 28224, 29584, 36864, 38025, 39204, 45369, 46656, 47524, 51984, 56169, 74529, 87025, 88804, 91809, 92416, 95481, 103684
Offset: 1

Views

Author

Amarnath Murthy, Mar 30 2002

Keywords

Examples

			144 = (139 + 149)/2 is a member.
		

Crossrefs

Intersection of A000290 and A024675.

Programs

  • Maple
    a:= proc(n) option remember; local k, kk, p, q;
          for k from 1 +`if`(n=1, 1, iroot(a(n-1), 2))
          do kk:= k^2; p, q:= prevprime(kk), nextprime(kk);
             if (p+q)/2=kk then return kk fi
          od
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Dec 21 2013
  • Mathematica
    p = -1; Do[q = Prime[n]; If[ IntegerQ[ Sqrt[(p + q)/2]], Print[(p + q)/2]]; p = q, {n, 1, 10000} ]
    Select[Mean/@Partition[Prime[Range[11000]],2,1],IntegerQ[Sqrt[#]]&] (* Harvey P. Dale, Jan 23 2019 *)

Formula

a(n) = (A075190(n))^2. - Zak Seidov

Extensions

Edited and extended by Robert G. Wilson v, Apr 01 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

A075232 Numbers k such that k^9 is an interprime = average of two successive primes.

Original entry on oeis.org

9, 74, 110, 141, 340, 370, 411, 423, 546, 687, 720, 723, 725, 744, 813, 834, 966, 1033, 1054, 1137, 1178, 1233, 1264, 1284, 1287, 1320, 1335, 1460, 1636, 1642, 1768, 1934, 2046, 2053, 2064, 2103, 2214, 2397, 2447, 2465, 2486, 2496, 2510, 2716, 2741, 2775
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^8 as interprimes are in A075231, 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

			9 is a term because 9^9 = 387420489 is the average of two successive primes 387420479 and 387420499.
		

Crossrefs

Programs

  • Maple
    s := 9: 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[2869], 2#^9 == NextPrime[#^9, -1] + NextPrime[#^9] &]

Extensions

Edited by Robert G. Wilson v Sep 14 2002

A075233 Numbers k such that k^10 is an interprime = average of two successive primes.

Original entry on oeis.org

9, 42, 87, 105, 108, 141, 144, 166, 215, 250, 381, 387, 482, 490, 500, 645, 748, 792, 831, 860, 876, 968, 990, 1377, 1448, 1468, 1526, 1769, 1780, 1922, 1968, 2084, 2118, 2228, 2245, 2252, 2373, 2381, 2478, 2565, 2672, 2781, 2883, 2915, 2972, 2988, 3008
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^8 as interprimes are in A075231, n^9 as interprimes are in A075232, a(n) such that a(n)^n = smallest interprime (of the form a^n) are in A075234.

Examples

			9 is a term because 9^10 = 3486784401 is the average of two successive primes 3486784393 and 3486784409.
		

Crossrefs

Programs

  • Maple
    s := 10: 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[3087], 2#^10 == NextPrime[#^10, -1] + NextPrime[#^10] &]
    Select[Range[3100],With[{c=#^10},c==Mean[{NextPrime[c],NextPrime[c,-1]}]]&] (* Harvey P. Dale, May 21 2025 *)

Extensions

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