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.

Previous Showing 31-40 of 101 results. Next

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

A075234 Least k such that k^n is the smallest interprime which is an n-th power.

Original entry on oeis.org

4, 2, 4, 3, 20, 2, 20, 12, 9, 9, 24, 2, 23, 26, 20, 66, 10, 3, 16, 3, 92, 13, 18, 48, 230, 129, 78, 181, 315, 33, 231, 19, 14, 152, 78, 39, 39, 4, 144, 9, 143, 55, 106, 25, 10, 91, 17, 7, 107, 91, 35, 44, 426, 81, 380, 97, 265, 237, 611, 1034, 122, 1072, 298, 1213, 18, 51
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, n^10 as interprimes are in A075233.

Examples

			a(1)=4 because 4^1 = 4 is the smallest interprime of the form k^1.
a(2)=2 because 2^2 = 4 is the smallest interprime of the form k^2.
a(3)=4 because 4^3 = 64 is the smallest interprime of the form k^3.
a(5)=20 because 20^5 = 3200000 is the smallest interprime of the form k^5.
a(29)=315 because 315^29 is the smallest interprime of the form k^29.
		

Crossrefs

The first 10 terms in this sequence are the first terms in A024675, A075190, A075191, A075192, A075228, A075229, A075230, A075231, A075232, A075233.

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
    PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = {}; Do[k = 2; While[2k^n != PrevPrim[k^n] + NextPrim[k^n], k++ ]; a = Append[a, k], {n, 1, 67}]; a

Extensions

Edited and extended by Robert G. Wilson v, Sep 14 2002
Typos in EXAMPLE fixed by Zak Seidov, Feb 09 2012

A075540 Integers that are the average of three successive primes.

Original entry on oeis.org

5, 53, 157, 173, 211, 257, 263, 373, 511, 537, 563, 593, 607, 653, 733, 947, 977, 999, 1073, 1103, 1123, 1187, 1223, 1239, 1367, 1461, 1501, 1511, 1541, 1747, 1753, 1763, 1773, 1899, 1907, 1917, 2071, 2181, 2287, 2401, 2409, 2417, 2449, 2677, 2903, 2963
Offset: 1

Views

Author

Zak Seidov, Sep 21 2002

Keywords

Comments

Not every three successive primes have an integer average. The integer averages are in the sequence.
Not all of these 3-averages are prime: the prime 3-averages are in A006562 (balanced primes). There are surprisingly many prime 3-averages: among the first 10000 terms of the sequence there are 2417 primes. Indices i(n) of first prime in sequence of three primes with integer average are in A075541, for prime 3-averages i(n) are in A064113. Interprimes (s-averages with s=2) are all composite, see A024675. (Edited by Zak Seidov, Sep 01 2015 )

Examples

			a(1) = 5 = (1/3)(3+5+7), first integer average of three successive primes; next is: a(2) = 53 = (1/3)(47 + 53 + 59); up to n=8 all terms are prime; while a(9) = 511 = (1/3)( 503 + 509 + 521) is the first nonprime 3-average: 511=7*73.
		

Crossrefs

Programs

  • Haskell
    a075540 n = a075540_list !! (n-1)
    a075540_list = map fst $ filter ((== 0) . snd) $
       zipWith3 (\x y z -> divMod (x + y + z) 3)
                a000040_list (tail a000040_list) (drop 2 a000040_list)
    -- Reinhard Zumkeller, Jan 20 2012
  • Maple
    N:= 10^4: # to get all terms using primes <= N
    Primes:= select(isprime,[2,seq(2*i+1, i=1..(N-1)/2)]):
    select(type,(Primes[1..-3] + Primes[2..-2] + Primes[3..-1])/3,integer); # Robert Israel, Sep 01 2015
  • Mathematica
    Select[MovingAverage[Prime[Range[500]],3],IntegerQ] (* Harvey P. Dale, Aug 10 2012 *)

Formula

a(n) = (1/3) (p(i)+p(i+1)+p(i+2)), for some i(n).

Extensions

Comment and example edited, inefficient Mma removed by Zak Seidov, Sep 01 2015

A130178 Triangular numbers which are the average of two consecutive primes.

Original entry on oeis.org

6, 15, 21, 45, 105, 120, 231, 300, 351, 465, 741, 780, 861, 1176, 1431, 1485, 3081, 3240, 3321, 3828, 4005, 4278, 5460, 6786, 6903, 7140, 7381, 7503, 7875, 8001, 10731, 11175, 11325, 11781, 12246, 12561, 13530, 13695, 14535, 14706, 17205, 17391
Offset: 1

Views

Author

Zak Seidov, May 14 2007

Keywords

Comments

Intersection of A000217 (triangular numbers) and A024675 (average of two consecutive primes).

Examples

			6-/+1, 15-/+2,..., 300-/+7 are pairs of consecutive primes.
		

Crossrefs

A205153 Least k such that n divides s(k)-s(j) for some j

Original entry on oeis.org

2, 2, 3, 4, 3, 4, 6, 4, 5, 8, 5, 6, 9, 6, 7, 10, 7, 9, 10, 8, 9, 8, 14, 9, 10, 9, 11, 10, 14, 10, 20, 14, 11, 16, 11, 12, 20, 12, 13, 22, 13, 16, 17, 14, 16, 14, 15, 16, 17, 15, 16, 15, 30, 16, 17, 16, 18, 17, 23, 17, 20, 31, 18, 20, 18, 19, 20, 19, 21, 20, 22, 20, 24
Offset: 1

Views

Author

Clark Kimberling, Jan 26 2012

Keywords

Comments

See A204892 for a discussion and guide to related sequences.

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = (Prime[n + 1] + Prime[n + 2])/2; z1 = 1100; z2 = 80;
    Table[s[n], {n, 1, 30}]     (* A024675 *)
    u[m_] := u[m] = Flatten[Table[s[k] - s[j], {k, 2, z1}, {j, 1, k - 1}]][[m]]
    Table[u[m], {m, 1, z1}]     (* A204980 *)
    v[n_, h_] := v[n, h] = If[IntegerQ[u[h]/n], h, 0]
    w[n_] := w[n] = Table[v[n, h], {h, 1, z1}]
    d[n_] := d[n] = First[Delete[w[n], Position[w[n], 0]]]
    Table[d[n], {n, 1, z2}]     (* A205152 *)
    k[n_] := k[n] = Floor[(3 + Sqrt[8 d[n] - 1])/2]
    m[n_] := m[n] = Floor[(-1 + Sqrt[8 n - 7])/2]
    j[n_] := j[n] = d[n] - m[d[n]] (m[d[n]] + 1)/2
    Table[k[n], {n, 1, z2}]       (* A205153 *)
    Table[j[n], {n, 1, z2}]       (* A205154 *)
    Table[s[k[n]], {n, 1, z2}]    (* A205372 *)
    Table[s[j[n]], {n, 1, z2}]    (* A205373 *)
    Table[s[k[n]] - s[j[n]], {n, 1, z2}]      (* A205374 *)
    Table[(s[k[n]] - s[j[n]])/n, {n, 1, z2}]  (* A205375 *)

A162345 Length of n-th edge in the graph of the zig-zag function for prime numbers.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jul 04 2009

Keywords

Comments

Also, first differences of A162800.
Also {2, 2, } together with the numbers A052288.
Note that the graph of the zig-zag function for prime numbers is similar to the graph of the mountain path function for prime numbers but with exactly a vertex between consecutive odd noncomposite numbers (A006005).
This is the same as A115061 if n>1 (and also essentially equal to A052288). Proof: Because this is the first differences of A162800, which is {0,2} together with A024675, this sequence (for n>=3) is given by a(n) = (prime(n+1) - prime(n-1))/2. Similarly, because half the numbers between prime(n-1) and prime(n+1) are closer to prime(n) than any other prime, A115061(n) = (prime(n+1) - prime(n-1))/2 for n>=3 as well. - Nathaniel Johnston, Jun 25 2011

Examples

			Array begins:
=====
x, y
=====
2, 2;
2, 3;
3, 3;
3, 3;
5, 4;
		

Crossrefs

Programs

  • Magma
    [2,2] cat[(NthPrime(n+1)-NthPrime(n-1))/2: n in [3..80]]; // Vincenzo Librandi, Dec 19 2016
  • Maple
    A162345 := proc(n) if(n<=2)then return 2: fi: return (ithprime(n+1) - ithprime(n-1))/2: end: seq(A162345(n),n=1..100); # Nathaniel Johnston, Jun 25 2011
  • Mathematica
    Join[{2, 2}, Table[(Prime[n+1] - Prime[n-1])/2, {n, 3, 100}]] (* Vincenzo Librandi, Dec 19 2016 *)

Formula

a(n) = (prime(n+1) - prime(n-1))/2 for n>=3. - Nathaniel Johnston, Jun 25 2011

Extensions

Edited by Omar E. Pol, Jul 16 2009
Previous Showing 31-40 of 101 results. Next