login
Numbers that are both interprime and oblong.
4

%I #37 Feb 16 2025 08:33:27

%S 6,12,30,42,56,72,240,342,420,462,506,552,600,650,870,1056,1190,1482,

%T 1722,1806,2550,2652,2970,3540,4422,6320,7140,8010,10302,12656,13572,

%U 14042,17292,18360,19182,19460,20022,22952,23562,24180,27060,29070,29756,31152,33306,35156,35532,39006

%N Numbers that are both interprime and oblong.

%H Amiram Eldar, <a href="/A263676/b263676.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Interprime.html">Interprime</a>

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PronicNumber.html">Pronic Number</a>

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

%t 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 *)

%t 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 *)

%o (PARI) {for(i=1,500,n=i*(i+1);if(n==(precprime(n-1)+nextprime(n+1))/2, print1(n,", ")))}

%Y Intersection of A024675 and A002378. - _Omar E. Pol_, Oct 24 2015

%Y Lesser of consecutive primes is in the sequence A242383.

%Y Cf. A075190, A075277, A075296, A078443, A130178, A263674, A263675.

%K nonn,easy,changed

%O 1,1

%A _Antonio Roldán_, Oct 23 2015