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

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

A234240 Cubes which are arithmetic mean of two consecutive primes.

Original entry on oeis.org

64, 1728, 4096, 17576, 21952, 46656, 110592, 195112, 287496, 314432, 405224, 474552, 1061208, 1191016, 1404928, 1601613, 1906624, 2000376, 2146689, 2197000, 3241792, 3511808, 4913000, 5268024, 6229504, 6751269, 6859000, 7077888, 11239424, 20346417, 21952000
Offset: 1

Views

Author

K. D. Bajpai, Dec 21 2013

Keywords

Examples

			64 is in the sequence because cube 64 = 4^3 = (61+67)/2 is arithmetic mean of two consecutive primes.
1728 is in the sequence because 1728 = 12^3 = (1723+1733)/2.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k, kk, p, q;
          for k from 1 +`if`(n=1, 1, iroot(a(n-1), 3))
          do kk:= k^3; 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
    Select[Mean/@Partition[Prime[Range[1500000]],2,1],IntegerQ[Surd[#,3]]&] (* Harvey P. Dale, Oct 08 2014 *)
    Select[Range[300]^3,#==Mean[{NextPrime[#],NextPrime[#,-1]}]&] (* Harvey P. Dale, Sep 02 2015 *)
  • PARI
    is(n)=nextprime(n)+precprime(n)==2*n && ispower(n,3)
    for(n=8,1e4,if(is(n^3), print1(n^3", "))) \\ Charles R Greathouse IV, Aug 25 2014

Formula

a(n) = A075191(n)^3.

A225195 Primes p such that (p+nextprime(p))/2 is a perfect square.

Original entry on oeis.org

3, 7, 61, 79, 139, 223, 317, 439, 619, 1087, 1669, 2593, 3593, 4093, 5179, 6079, 8461, 12541, 13687, 16633, 19037, 19597, 25261, 27211, 28219, 29581, 36857, 38011, 39199, 45361, 46649, 47521, 51977, 56167, 74527, 87013, 88801, 91807, 92413, 95479, 103681
Offset: 1

Views

Author

Jayanta Basu, May 09 2013

Keywords

Comments

Primes for which average of two consecutive primes is a perfect square.

Examples

			61 is in the list since (61+67)/2=64=8^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[10000]],IntegerQ[Sqrt[(# + NextPrime[#])/2]] &]
    Select[Partition[Prime[Range[10000]],2,1],IntegerQ[Sqrt[Mean[#]]]&][[All,1]] (* Harvey P. Dale, Jan 12 2019 *)
  • PARI
    p=2;forprime(q=3,1e9,if(issquare((p+q)/2),print1(p", "));p=q) \\ Charles R Greathouse IV, May 09 2013

A234297 Squares t^2 = (p+q+r)/3 which are the arithmetic mean of three consecutive primes such that p < t^2 < q < r.

Original entry on oeis.org

47961, 123201, 131769, 826281, 870489, 2486929, 3294225, 5239521, 5294601, 5774409, 6215049, 6335289, 6848689, 9308601, 10634121, 16072081, 17164449, 17732521, 18896409, 19298449, 22667121, 24413481, 25391521, 25836889, 30769209, 32569849, 33535681
Offset: 1

Views

Author

K. D. Bajpai, Dec 22 2013

Keywords

Examples

			47961 is in the sequence because 47961 = 219^2 = (47951+47963+47969)/3, the arithmetic mean of three consecutive primes.
131769 is in the sequence because 131769 = 363^2 = (131759+131771+131777)/3, the arithmetic mean of three consecutive primes.
		

Crossrefs

Cf. A000290 (squares: a(n) = n^2).
Cf. A062703 (squares: sum of two consecutive primes).
Cf. A069495 (squares: arithmetic mean of two consecutive primes).
Cf. A234240 (cubes: arithmetic mean of three consecutive primes).

Programs

  • Maple
    with(numtheory):KD := proc() local a,b,d,e,f; a:=n^2; b:=prevprime(a); d:=nextprime(a); e:=nextprime(d); f:=(b+d+e)/3; if a=f then RETURN (a); fi; end: seq(KD(), n=2..10000);
  • Mathematica
    amQ[{a_,b_,c_}]:=Module[{m=Mean[{a,b,c}]},IntegerQ[Sqrt[m]]&&aHarvey P. Dale, Mar 14 2014 *)
  • PARI
    list(lim)=my(v=List(),p=2,q=3,t); forprime(r=5, nextprime(nextprime(lim+1)+1), t=(p+q+r)/3; if(denominator(t)==1 && issquare(t) && t < q, listput(v, t)); p=q;q=r); Vec(v) \\ Charles R Greathouse IV, Jan 03 2014

Extensions

Definition corrected by Michel Marcus and Charles R Greathouse IV, Jan 03 2014

A234358 Cubes t^3 = (p+q+r+s)/4 which are the arithmetic mean of four consecutive primes such that p < t^3 < q < r < s.

Original entry on oeis.org

25934336, 194104539, 320013504, 332812557, 428661064, 8072216216, 8640364608, 11239424000, 16290480375, 17738739712, 26730899000, 44136677304, 46850670125, 68117264704, 114366627864, 119168121961
Offset: 1

Views

Author

K. D. Bajpai, Dec 24 2013

Keywords

Examples

			25934336 is in the sequence because 25934336 = 296^3 = (25934303+25934341+25934347+25934353)/4, the arithmetic mean of four consecutive primes.
320013504 is in the sequence because 320013504 = 684^3 = (320013479+320013509+320013511+320013517)/4, the arithmetic mean of four consecutive primes.
		

Crossrefs

Cf. A000578 (cubes: a(n) = n^3).
Cf. A062703 (squares: sum of two consecutive primes).
Cf. A069495 (squares: arithmetic mean of two consecutive primes).
Cf. A234240 (cubes: arithmetic mean of two consecutive primes).
Cf. A234256 (cubes: arithmetic mean of three consecutive primes).

Programs

  • Maple
    KD := proc() local a,b,d,e,f,g; a:=n^3; b:=prevprime(a); d:=nextprime(a); e:=nextprime(d); f:=nextprime(e); g:=(b+d+e+f)/4;  if a=g then RETURN (a);  fi; end: seq(KD(), n=2..10000);

Extensions

Definition corrected by K. D. Bajpai, Jan 07 2014

A234256 Cubes t^3 = (p+q+r)/3 which are the arithmetic mean of three consecutive primes such that p < t^3 < q < r.

Original entry on oeis.org

5735339, 10503459, 73560059, 253636137, 393832837, 761048497, 791453125, 1064332261, 1829276567, 2014698447, 2487813875, 2893640625, 4533086375, 7845011803, 14437662875, 45998156287, 55611739513, 62429032063, 63378025803, 72877493233, 87115050737, 104154702625
Offset: 1

Views

Author

K. D. Bajpai, Dec 22 2013

Keywords

Examples

			5735339 is in the sequence because 5735339 = 179^3 = (5735291+5735357+5735369)/3, the arithmetic mean of three consecutive primes.
10503459 is in the sequence because 10503459 = 219^3 = (10503443+10503461+10503473)/3, the arithmetic mean of three consecutive primes.
		

Crossrefs

Cf. A000578 (cubes: n^3).
Cf. A062703 (squares: sum of two consecutive primes).
Cf. A069495 (squares: arithmetic mean of two consecutive primes).
Cf. A234240 (cubes: arithmetic mean of two consecutive primes).

Programs

  • Maple
    with(numtheory):KD := proc() local a,b,d,e,f; a:=n^3; b:=prevprime(a); d:=nextprime(a); e:=nextprime(d);  f:=(b+d+e)/3; if  a=f then RETURN (a);  fi;  end: seq(KD(), n=2..10000);
  • PARI
    list(lim)=my(v=List(), p=2, q=3, t); forprime(r=5, nextprime(nextprime(lim\3+1)+1), t=(p+q+r)/3; if(denominator(t)==1 && ispower(t,3) && t < q, listput(v, t)); p=q; q=r); Vec(v) \\ Charles R Greathouse IV, Jan 03 2014

Extensions

Definition corrected by Michel Marcus and Charles R Greathouse IV, Jan 03 2014

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

A234318 Squares t^2 = (p+q+r+s)/4 which are the arithmetic mean of four consecutive primes such that p < t^2 < q < r < s.

Original entry on oeis.org

15876, 35721, 59049, 65025, 488601, 828100, 1144900, 3857296, 4822416, 4901796, 5107600, 5322249, 5856400, 6100900, 6760000, 10536516, 11716929, 12503296, 13468900, 14197824, 14638276, 15163236, 18748900, 21455424, 22127616, 22638564, 24049216, 24098281, 24108100
Offset: 1

Views

Author

K. D. Bajpai, Dec 23 2013

Keywords

Examples

			15876 is in the sequence because 15876 = 126^2 = (15859+15877+15881+15887)/4, the arithmetic mean of four consecutive primes.
35721 is in the sequence because 35721 = 189^2 = (35677+35729+35731+35747)/4, the arithmetic mean of four consecutive primes.
		

Crossrefs

Cf. A000290 (squares: a(n) = n^2).
Cf. A062703 (squares: sum of two consecutive primes).
Cf. A069495 (squares: arithmetic mean of two consecutive primes).
Cf. A234240 (cubes: arithmetic mean of three consecutive primes).
Cf. A234297 (squares: arithmetic mean of three consecutive primes).

Programs

  • Maple
    KD := proc() local a,b,d,e,f,g; a:=n^2;b:=prevprime(a); d:=nextprime(a); e:=nextprime(d); f:=nextprime(e); g:=(b+d+e+f)/4; if a=g then RETURN (a); fi; end: seq(KD(), n=2..10000);
  • Mathematica
    fcpQ[{a_,b_,c_,d_}]:=Module[{m=Mean[{a,b,c,d}]},IntegerQ[ Sqrt[ m]] && a< m< b]; Mean/@Select[Partition[Prime[Range[1600000]],4,1],fcpQ] (* Harvey P. Dale, Apr 24 2017 *)
  • PARI
    list(lim)=my(v=List(), p=2, q=3, r=5, t); forprime(s=7, nextprime(nextprime(lim+1)+1), t=(p+q+r+s)/4; if(denominator(t)==1 && issquare(t) && t < q, listput(v, t)); p=q; q=r; r=s); Vec(v) \\ Charles R Greathouse IV, Jan 03 2014

Extensions

Definition corrected by Michel Marcus and Charles R Greathouse IV, Jan 03 2014

A234531 Pentagonal numbers which are the arithmetic mean of two consecutive primes.

Original entry on oeis.org

12, 176, 376, 532, 590, 3015, 4510, 4676, 7315, 7526, 7957, 8855, 12650, 15555, 17120, 19437, 20126, 22265, 25676, 29330, 30175, 40755, 48510, 54626, 78547, 82017, 91390, 97410, 101270, 102051, 102835, 105205
Offset: 1

Views

Author

K. D. Bajpai, Dec 27 2013

Keywords

Comments

The n-th pentagonal number is (3*n^2 - n)/2 = n*(3*n - 1)/2.

Examples

			376 is in the sequence because 376 = 16*(3*16 - 1)/2 = (373 + 379)/2, the arithmetic mean of two consecutive primes.
532 is in the sequence because 532 = 19*(3*19 - 1)/2 = (523 + 541)/2, the arithmetic mean of two consecutive primes.
		

Crossrefs

Cf. A000326 (pentagonal numbers: n * (3 * n - 1 ) / 2).
Cf. A069495 (squares: arithmetic mean of two consecutive primes).
Cf. A234240 (cubes: arithmetic mean of three consecutive primes).

Programs

  • Maple
    KD := proc() local a,b,d,g;  a:= n*(3*n-1)/2; b:=prevprime(a); d:=nextprime(b); g:=(b+d)/2;  if a=g then RETURN (a);  fi; end: seq(KD(), n = 2..500);
  • Mathematica
    Select[PolygonalNumber[5,Range[300]],!PrimeQ[#]&&#==(NextPrime[ #]+ NextPrime[ #,-1])/2&] (* Harvey P. Dale, Dec 26 2022 *)
  • PARI
    lista(nn) = for (n=1, nn, pn = n*(3*n-1)/2; if (pn > 2, precp = precprime(pn-1); if (pn == (precp + nextprime(precp+1))/2, print1(pn, ", ")))) \\ Michel Marcus, Dec 30 2013

Extensions

Erroneous term 5 removed by Michel Marcus, Dec 30 2013

A234532 Pentagonal numbers penta(n) = (p + q + r)/3 which are the arithmetic mean of three consecutive primes such that p < penta(n) < q < r.

Original entry on oeis.org

9087, 29751, 291501, 602617, 1505505, 1778337, 1941997, 2137857, 3032415, 4629695, 5016947, 5038917, 7837551, 8030737, 9328807, 11935651, 19158427, 35616757, 40964001, 41073817, 42594697, 44289817, 56141827, 59267551
Offset: 1

Views

Author

K. D. Bajpai, Dec 27 2013

Keywords

Comments

The n-th pentagonal number is (3*n^2 - n)/2 = n*(3*n - 1)/2.

Examples

			9087 is in the sequence because 9087 = 78 *(3*78 - 1)/2 = (9067 + 9091 + 9103)/3, the arithmetic mean of three consecutive primes.
29751 is in the sequence because 29751 = 141*(3*141 - 1)/2 = (29741 + 29753 + 29759)/3, the arithmetic mean of three consecutive primes.
		

Crossrefs

Cf. A000326 (pentagonal numbers: n * (3*n - 1)/2).
Cf. A069495 (squares: arithmetic mean of two consecutive primes).
Cf. A234240 (cubes: arithmetic mean of three consecutive primes).

Programs

  • Maple
    KD := proc() local a,b,d,e,g; a:= n*(3*n-1)/2; b:=prevprime(a); d:=nextprime(a); e:=nextprime(d); g:=(b+d+e)/3;  if a=g then RETURN (a); fi; end: seq(KD(), n=2..10000);
Showing 1-10 of 11 results. Next