A154634 Numbers that are the first of two consecutive primes having a sum that is the product of two consecutive numbers.
5, 13, 19, 43, 103, 113, 229, 293, 349, 463, 739, 773, 859, 1171, 1429, 1483, 3079, 3229, 3319, 3823, 4003, 4273, 5449, 6781, 6899, 7129, 7369, 7499, 7873, 7993, 10729, 11173, 11321, 11779, 12241, 12553, 13523, 13693, 14533, 14699, 17203, 17389
Offset: 1
Examples
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
Links
- Klaus Brockhaus, Table of n, a(n) for n=1..1000 [From _Klaus Brockhaus_, Jan 15 2009]
Programs
-
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
-
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 *)
Formula
Extensions
Corrected and extended by several correspondents, Jan 15 2009
Comments