OFFSET
1,1
COMMENTS
Is the sequence mostly uniformly distributed or do clusters occur for the products? One could also find sums of 2n consecutive primes equaling the product of 2n numbers.
LINKS
Klaus Brockhaus, Table of n, a(n) for n=1..1000 [From Klaus Brockhaus, Jan 15 2009]
FORMULA
EXAMPLE
For the pair of consecutive primes 1429 and 1433, their sum is 2862=53*54.
773 and 787 are consecutive primes. 773+787 = 1560 = 39*40, hence 773 is in the sequence. - Klaus Brockhaus, Jan 15 2009
MAPLE
isA002378 := proc(n) local a; a := floor(sqrt(n)) ; RETURN( a*(a+1) = n ) ; end: for i from 1 to 5000 do p := ithprime(i) ; a001043 := p+nextprime(p) ; if isA002378(a001043) then printf("%d, ", p) ; fi; od: # R. J. Mathar, Jan 15 2009
a := proc (n) local p, s: p := ithprime(n): s := p+nextprime(p): if type((1/2)*sqrt(1+4*s)-1/2, integer) = true then p else end if end proc: seq(a(n), n = 1 .. 3000); # Emeric Deutsch, Jan 15 2009
MATHEMATICA
sp2Q[{a_, b_}]:=Module[{s=Floor[Sqrt[a+b]]}, a+b==s(s+1)]; Select[Partition[ Prime[ Range[2100]], 2, 1], sp2Q][[All, 1]] (* Harvey P. Dale, Jun 28 2020 *)
PROG
(Magma) [ p: p in PrimesUpTo(18000) | r*(r+1) eq s where r is Iroot(s, 2) where s is p+NextPrime(p) ]; // Klaus Brockhaus, Jan 15 2009
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
J. M. Bergot, Jan 13 2009
EXTENSIONS
Corrected and extended by several correspondents, Jan 15 2009
STATUS
approved