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

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

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

A248785 Numbers n with the property that p = n^2 - 13 and q = n^2 + 13 are consecutive primes.

Original entry on oeis.org

948, 1134, 1500, 2058, 2856, 3192, 3846, 3906, 4842, 5190, 5502, 6744, 6888, 7266, 7392, 7698, 8586, 8778, 8850, 9198, 9558, 10272, 10500, 10782, 11658, 11730, 11760, 12456, 12738, 13062, 13578, 14130, 14262, 14658, 14808, 15306, 15552, 15720, 16104, 16242
Offset: 1

Views

Author

Zak Seidov, Oct 13 2014

Keywords

Comments

All terms are == 0 (mod 6).

Examples

			n = 948, p = 898691 = prime(71194), q = 898717 = prime(71195);
n = 1134, p = 1285943 = prime(99033), q = 1285969 = prime(99034).
		

Crossrefs

Subsequence of A177833 and of A075190.
E.g., a(1) = 948 = A075190(103) = A177833(15).

Programs

  • Maple
    with(numtheory): A248785:=n->`if`(isprime(n^2-13) and isprime(n^2+13) and pi(n^2+13) = pi(n^2-13)+1,n,NULL): seq(A248785(n), n=1..2*10^4); # Wesley Ivan Hurt, Oct 13 2014
  • Mathematica
    Select[Range[17000],PrimeQ[#^2-13]&&NextPrime[#^2-13]==#^2+13&] (* Harvey P. Dale, Aug 14 2020 *)
  • PARI
    isok(n) = isprime(p=n^2-13) && isprime(q=n^2+13) && (q==nextprime(p+1)); \\ Michel Marcus, Oct 14 2014

Extensions

More terms from Michel Marcus, Oct 14 2014

A263674 Double interprimes: a(n) = (q+r)/2 = (p+s)/2 with p

Original entry on oeis.org

9, 12, 15, 18, 30, 42, 60, 81, 102, 105, 108, 120, 144, 165, 186, 195, 228, 260, 270, 312, 363, 381, 399, 420, 426, 441, 462, 489, 495, 552, 570, 582, 600, 696, 705, 714, 765, 816, 825, 858, 870, 882, 897, 924, 987, 1026, 1050, 1056, 1092, 1113, 1167, 1230
Offset: 1

Views

Author

Antonio Roldán, Oct 23 2015

Keywords

Comments

Values of p (lesser of consecutive primes) are in the sequence A022885.

Examples

			600 is in this sequence because 593, 599, 601 and 607 are consecutive primes, and 600 = (599+601)/2 = (593+607)/2.
		

Crossrefs

Programs

  • Mathematica
    (Prime@ # + Prime[# + 3])/2 & /@ Select[Range@ 240, (First@ # + Last@ #)/2 == (#[[2]] + #[[3]])/2 &@ Prime@ Range[#, # + 3] &] (* Michael De Vlieger, Nov 18 2015 *)
    Mean/@Select[Partition[Prime[Range[300]],4,1],(#[[2]]+#[[3]])/2==(#[[1]]+#[[4]])/2&] (* Harvey P. Dale, Aug 18 2024 *)
  • PARI
    {forprime(q=3,2000,p=precprime(q-1); r=nextprime(q+1); s=nextprime(r+1);m=(q+r)/2;if(m==(p+s)/2,print1(m,", ")))}

A263676 Numbers that are both interprime and oblong.

Original entry on oeis.org

6, 12, 30, 42, 56, 72, 240, 342, 420, 462, 506, 552, 600, 650, 870, 1056, 1190, 1482, 1722, 1806, 2550, 2652, 2970, 3540, 4422, 6320, 7140, 8010, 10302, 12656, 13572, 14042, 17292, 18360, 19182, 19460, 20022, 22952, 23562, 24180, 27060, 29070, 29756, 31152, 33306, 35156, 35532, 39006
Offset: 1

Views

Author

Antonio Roldán, Oct 23 2015

Keywords

Examples

			342 is in this sequence because 342 = 18*19 is oblong, and 342 = (337 + 347)/2, with 337 and 347 consecutive primes.
		

Crossrefs

Intersection of A024675 and A002378. - Omar E. Pol, Oct 24 2015
Lesser of consecutive primes is in the sequence A242383.

Programs

  • Mathematica
    lim = 40000; Intersection[Plus @@@ Partition[Table[Prime@ n, {n, 2, PrimePi@ lim}], 2, 1]/2, Table[n (n + 1), {n, 0, lim}]] (* Michael De Vlieger, Nov 18 2015, after Clark Kimberling at A024675 and Robert G. Wilson v at A002378 *)
    obQ[n_]:=With[{divs=Partition[Divisors[n],2,1]},Length[Select[divs,#[[2]]-#[[1]]== 1 && Times@@#==n&]]>0]; Select[Mean/@Partition[Prime[ Range[ 2,40000]],2,1],obQ] (* Harvey P. Dale, Nov 01 2022 *)
  • PARI
    {for(i=1,500,n=i*(i+1);if(n==(precprime(n-1)+nextprime(n+1))/2, print1(n,", ")))}

A263675 Numbers that are both averages of consecutive primes and nontrivial prime powers.

Original entry on oeis.org

4, 9, 64, 81, 625, 1681, 4096, 822649, 1324801, 2411809, 2588881, 2778889, 3243601, 3636649, 3736489, 5527201, 6115729, 6405961, 8720209, 9006001, 12752041, 16056049, 16589329, 18088009, 21743569, 25230529, 29343889, 34586161, 37736449, 39150049
Offset: 1

Views

Author

Antonio Roldán, Oct 23 2015

Keywords

Comments

Intersection of A024675 and A025475.
Lesser of consecutive primes is in the sequence A084289.

Examples

			625 is in this sequence because 625 = 5^4, nontrivial prime power, and 625 = (619+631)/2, with 619 and 631 consecutive primes.
		

Crossrefs

Programs

  • Maple
    N:= 10^10: # to get all terms <= N
    Primes:= select(isprime, [2,seq(i,i=3..isqrt(N),2)]):
    S:= select(t -> t - prevprime(t) = nextprime(t)-t, {seq(seq(p^j, j=2..floor(log[p](N))),p=Primes)}):
    sort(convert(S,list)); # Robert Israel, Dec 27 2015
  • Mathematica
    (* version >= 6 *)(#/2 + NextPrime[#]/2) & /@
    Select[Prime[Range[5000000]], PrimePowerQ[#/2 + NextPrime[#]/2] &]
    (* Wouter Meeussen, Oct 26 2015 *)
  • PARI
    {for(i=1,10^8,if(isprimepower(i)>1&&i==(precprime(i-1)+nextprime(i+1))/2,print1(i,", ")))}

A109271 Floor of expansion (1+Pi*x)^e.

Original entry on oeis.org

1, 8, 23, 17, -4, 3, -4, 5, -10, 16, -34, 69, -150, 336, -777, 1833, -4422, 10852, -27053, 68354, -174820, 451966, -1179915, 3107551, -8250149, 22063698, -59402336, 160918012, -438405420, 1200699624, -3304583628, 9136432371, -25367772162, 70715532758, -197863773109, 555569907134
Offset: 1

Views

Author

Zak Seidov, Jun 24 2005

Keywords

Examples

			(1+Pi*x)^e = 1 + e*Pi*x + (1/2)*(e-1)*e*Pi^2*x^2 + ...
a(1) = floor(1) = 1.
a(2) = floor(e*Pi) = 8.
a(3) = floor((1/2)*(e-1)*e*Pi^2) = 23.
		

Crossrefs

Programs

  • Mathematica
    ns=Normal[With[{m=50}, s=Series[(1+Pi x)^E, {x, 0, m}]]]; A109271=Floor[ CoefficientList[ns, x]]

A225077 Smaller of the two consecutive primes whose sum is a triangular number.

Original entry on oeis.org

17, 37, 59, 103, 137, 149, 313, 467, 491, 883, 911, 1277, 1423, 1619, 1783, 2137, 2473, 2729, 4127, 4933, 5437, 5507, 6043, 6359, 10039, 10453, 11717, 13397, 15809, 17489, 20807, 21821, 23027, 27631, 28307, 28813, 29669, 33029, 36947, 39103, 44203, 48281
Offset: 1

Views

Author

Alex Ratushnyak, May 28 2013

Keywords

Crossrefs

Cf. A175132 (numbers n such that sum of two consecutive primes is triangular(n)).
Cf. A181902 and A154634 (average of two consecutive primes is a triangular number).
Cf. A075190 and A225195 (average of two consecutive primes is a square).
Cf. A074924 and A061275 (sum of two consecutive primes is a square).

Programs

  • Maple
    f:= proc(n) local m,p,q;
      m:= n*(n+1)/2;
      p:= prevprime(ceil(m/2));
      q:= nextprime(p);
      if p+q=m then p fi
    end proc:
    map(f, [$3..500]); # Robert Israel, May 04 2020
  • Mathematica
    tri[n_] := IntegerQ[Sqrt[1 + 8 n]]; t = {}; p1 = 2; While[Length[t] < 50, p2 = NextPrime[p1]; If[tri[p1 + p2], AppendTo[t, p1]]; p1 = p2]; t (* T. D. Noe, May 28 2013 *)

Formula

a(n) + nextprime(a(n)) = A000217(A175132(n)).

A109269 Numbers n such that n^2 < (1/2)*(prevprime(n^2)+nextprime(n^2)).

Original entry on oeis.org

5, 7, 13, 19, 23, 27, 29, 32, 34, 35, 37, 42, 43, 44, 46, 47, 49, 53, 55, 58, 61, 63, 68, 69, 71, 75, 77, 80, 82, 83, 86, 88, 89, 93, 98, 101, 102, 103, 107, 108, 113, 118, 119, 121, 127, 128, 131, 132, 133, 135, 136, 139, 142, 143, 144, 145, 149, 152, 155, 161, 164
Offset: 1

Views

Author

Zak Seidov, Jun 24 2005

Keywords

Examples

			7 is in the sequence because 49 is less than (47+53)/2=50,
8 is not in the sequence because 64=(61+67)/2.
		

Crossrefs

Programs

  • Maple
    a:=proc(n) if n^2< (1/2)*(prevprime(n^2)+nextprime(n^2)) then n else fi end: seq(a(n),n=2..200); # Emeric Deutsch, Jun 26 2005

Extensions

More terms from Emeric Deutsch, Jun 26 2005

A109270 Numbers k such that k^2 > (1/2)*(prevprime(k^2) + nextprime(k^2)).

Original entry on oeis.org

4, 6, 10, 11, 14, 16, 17, 20, 22, 24, 26, 28, 30, 31, 36, 38, 39, 40, 45, 48, 50, 52, 54, 56, 57, 59, 62, 65, 66, 67, 70, 73, 74, 76, 79, 81, 84, 85, 87, 90, 91, 94, 95, 96, 97, 99, 100, 104, 105, 106, 109, 110, 111, 114, 115, 116, 120, 122, 123, 124, 125, 126, 130, 134
Offset: 1

Views

Author

Zak Seidov, Jun 24 2005

Keywords

Comments

One may call these k^2 the "strong squares" by analogy with A051634 (strong primes).

Examples

			4^2=16>(13+17)/2 so 4 is a term;
5^2 < (23+29)/2=26, so 5 is not a term;
6^2=36>(31+37)/2 so 6 is a term, etc.
		

Crossrefs

Programs

  • Maple
    a:=proc(n) if n^2 > (1/2)*(prevprime(n^2)+nextprime(n^2)) then n else fi end: seq(a(n),n=2..150); # Emeric Deutsch, Jun 26 2005
  • Mathematica
    prQ[n_]:=Module[{n2=n^2},n2>(NextPrime[n2]+NextPrime[n2,-1])/2]; Select[ Range[2,150],prQ] (* Harvey P. Dale, Feb 19 2012 *)

Extensions

More terms from Emeric Deutsch, Jun 26 2005
Previous Showing 11-20 of 24 results. Next