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-2 of 2 results.

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,", ")))}
Showing 1-2 of 2 results.