cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A049232 Primes p such that p+2 is divisible by a square.

This page as a plain text file.
%I A049232 #28 Aug 10 2024 22:34:00
%S A049232 2,7,23,43,47,61,73,79,97,151,167,173,223,241,277,313,331,349,359,367,
%T A049232 373,421,439,457,523,547,601,619,673,691,709,727,733,773,823,839,853,
%U A049232 907,929,997,1033,1051,1069,1087,1123,1181,1213,1223,1231,1249,1303
%N A049232 Primes p such that p+2 is divisible by a square.
%C A049232 This sequence is infinite and its relative density in the sequence of the primes is equal to 1 - 2 * Product_{p prime} (1-1/(p*(p-1))) = 1 - 2 * A005596 = 0.252088... - _Amiram Eldar_, Feb 27 2021
%F A049232 Primes p such that mu(p+2) = 0.
%e A049232 47 is a term since 47+2 = 49 = 7^2 is a square.
%e A049232 523 is a term since 523+2 = 525 = 5^2*21 is divisible by a square.
%t A049232 Select[Prime[Range[100]], ! SquareFreeQ[ # + 2] &] (* _Zak Seidov_, Oct 28 2008 *)
%o A049232 (PARI) powerfreep3(n,p,k) = { c=0; pc=0; forprime(x=2,n, pc++; if(ispowerfree(x+k,p)==0, c++; print1(x","); ) ); print(); print(c","pc","c/pc+.0) }
%o A049232 ispowerfree(m,p1) = { flag=1; y=component(factor(m),2); for(i=1,length(y), if(y[i] >= p1,flag=0;break); ); return(flag) }
%Y A049232 A091880 gives prime indices.
%Y A049232 Cf. A005596, A013929, A049229, A049233.
%K A049232 nonn
%O A049232 1,1
%A A049232 _Labos Elemer_
%E A049232 Corrected by _Cino Hilliard_ and _Ray Chandler_, Dec 08 2003
%E A049232 Edited by _N. J. A. Sloane_, Oct 27 2008 at the suggestion of _R. J. Mathar_