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

 


Squares of lesser of twin primes.
6

%I #21 Sep 08 2022 08:45:19

%S 9,25,121,289,841,1681,3481,5041,10201,11449,18769,22201,32041,36481,

%T 38809,51529,57121,72361,78961,96721,120409,175561,185761,212521,

%U 271441,323761,358801,380689,410881,434281,654481,674041,683929,734449,776161

%N Squares of lesser of twin primes.

%C Squares of the form prime(n)*prime(n+1) - 2*prime(n).

%H Vincenzo Librandi, <a href="/A108570/b108570.txt">Table of n, a(n) for n = 1..1000</a>

%p ZL:=[]:for p from 1 to 950 do if (isprime(p) and isprime(p+2)) then ZL:=[op(ZL),(p^2)]; fi; od; print(ZL); # _Zerinvary Lajos_, Mar 08 2007

%t Select[First[#]Last[#]-2First[#]&/@Partition[Prime[Range[500]],2,1],IntegerQ[ Sqrt[#]]&] (* _Harvey P. Dale_, May 24 2011 *)

%o (PARI) p=2;forprime(q=3,, if(q-p==2, print1(p^2", ")); p=q) \\ _Charles R Greathouse IV_, Dec 16 2019

%o (Magma) [p^2 : p in PrimesUpTo(1100)| IsPrime(p+2)]; // _Vincenzo Librandi_, Dec 23 2019

%Y Subsequence of A330477.

%Y Cf. A001359, A108604.

%K easy,nonn

%O 1,1

%A _Giovanni Teofilatto_, Jul 05 2005

%E Extended by _Ray Chandler_, Jul 10 2005

%E Name and comment swapped by _Charles R Greathouse IV_, Dec 16 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 22 16:18 EDT 2024. Contains 376119 sequences. (Running on oeis4.)