OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Interprime
Eric Weisstein's World of Mathematics, Pronic Number
EXAMPLE
342 is in this sequence because 342 = 18*19 is oblong, and 342 = (337 + 347)/2, with 337 and 347 consecutive primes.
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 *)
PROG
(PARI) {for(i=1, 500, n=i*(i+1); if(n==(precprime(n-1)+nextprime(n+1))/2, print1(n, ", ")))}
CROSSREFS
Lesser of consecutive primes is in the sequence A242383.
KEYWORD
nonn,easy
AUTHOR
Antonio Roldán, Oct 23 2015
STATUS
approved