login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A152786 Integers k such that (k^2)/2 is the arithmetic mean of a pair of twin primes. 6

%I #36 Jan 02 2023 12:30:47

%S 6,12,42,48,72,84,90,174,204,264,306,372,408,456,474,546,594,600,642,

%T 750,852,882,936,972,978,1038,1140,1212,1272,1386,1470,1512,1518,1584,

%U 1770,1836,1902,1980,1986,2130,2196,2256,2262,2316,2382,2652,2688,2718

%N Integers k such that (k^2)/2 is the arithmetic mean of a pair of twin primes.

%C Square roots of A054735 where these are integer.

%H Amiram Eldar, <a href="/A152786/b152786.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..4288 from Zak Seidov)

%H Zak Seidov, <a href="http://list.seqfan.eu/oldermail/seqfan/2010-August/005687.html">A152786 = 6*A037073: near-duplicates?</a>, seqfan list, Aug 20 2010.

%F {n: n^2 = A054735(i), any i}. - _R. J. Mathar_, Dec 12 2008

%F a(n) = 6*A037073(n). [_Zak Seidov_, seqfan list, Aug 20 2010] [From _R. J. Mathar_, Sep 07 2010]

%e 6 is a term since (6^2)/2 = 18 = mean(17, 19).

%e 12 is a term since (12^2)/2 = 72 = mean(71,73).

%e 42 is a term since (42^2)/2 = 882 = mean(881,883).

%p isa := n -> isprime(n) and isprime(n+2) and issqr(2*n+2):

%p select(isa, [$4..1000000]): map(n -> sqrt(2*n+2), %); # _Peter Luschny_, Jan 05 2020

%t lst={};Do[p1=Prime[n];p2=Prime[n+1];If[p2-p1==2,e=(2*(p1+1))^(1/2);i=Floor[e]; If[e==i,AppendTo[lst,i]]],{n,3*9!}];lst

%t (* Second program: *)

%t Select[Map[Sqrt[2 #] &, Mean /@ Select[Partition[Prime@ Range[10^6], 2, 1], Subtract @@ # == -2 &]], IntegerQ] (* _Michael De Vlieger_, Feb 18 2018 *)

%o (PARI) forstep(n=6,1e3,6,if(isprime(n^2/2-1)&&isprime(n^2/2+1),print1(n", "))) \\ _Charles R Greathouse IV_, Feb 01 2013

%o (Magma) [k:k in [2..2800 by 2]| IsPrime(k*k div 2 -1) and IsPrime(k*k div 2 +1)]; // _Marius A. Burtea_, Jan 01 2020

%Y Cf. A014574, A037073, A054735, A152788 (cubic version).

%Y Subsequence of A074924. - _Zak Seidov_, Feb 01 2013

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Dec 12 2008

%E Edited by _R. J. Mathar_, Dec 12 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 28 19:40 EDT 2024. Contains 372092 sequences. (Running on oeis4.)