login
Lesser of twin primes (p, p+2) whose average p+1 is not squarefree.
2

%I #24 Sep 08 2022 08:45:03

%S 3,11,17,59,71,107,149,179,191,197,227,239,269,311,347,419,431,521,

%T 599,659,809,827,881,1019,1031,1049,1061,1091,1151,1277,1319,1427,

%U 1451,1487,1607,1619,1667,1787,1871,1931,1949,1997,2027,2087,2111,2141,2267

%N Lesser of twin primes (p, p+2) whose average p+1 is not squarefree.

%H Amiram Eldar, <a href="/A061368/b061368.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Harry J. Smith)

%F Intersection of A014574 and A013929.

%t Select[Select[Partition[Prime[Range[400]],2,1],#[[2]]-#[[1]]==2&][[All,1]],!SquareFreeQ[#+1]&] (* _Harvey P. Dale_, Oct 21 2016 *)

%o (PARI) { n=-1; forprime (p=2, 119099, if (isprime(p+2) && !issquarefree(p+1), write("b061368.txt", n++, " ", p)) ) } \\ _Harry J. Smith_, Jul 22 2009

%o (Magma) [p:p in PrimesUpTo(2500)| IsPrime(p+2) and not IsSquarefree(p+1)]; // _Marius A. Burtea_, Jan 16 2020

%Y Cf. A001359, A005117, A014574, A013929.

%K nonn

%O 1,1

%A _Labos Elemer_, Jun 07 2001

%E Offset corrected by _Amiram Eldar_, Jan 16 2020