login
List of odd values of k for which k^2+4 has a factor that is a square number larger than 1.
1

%I #36 Oct 28 2024 18:54:12

%S 11,29,39,61,89,111,139,161,189,199,211,213,239,261,289,309,311,339,

%T 361,365,367,389,393,411,439,461,489,511,521,539,561,589,611,639,647,

%U 661,689,705,711,739,759,761,789,791,811,839,861,889,911,923,925,939,943,961,985,989

%N List of odd values of k for which k^2+4 has a factor that is a square number larger than 1.

%C Or, (odd integers n such that) n^2 + 4 is not squarefree. - _Zak Seidov_, Feb 03 2013

%H Ruskin Harding, <a href="/A211191/b211191.txt">Table of n, a(n) for n = 1..5258</a>

%e The first odd value of k for which k^2+4 has a square factor is 11: 11^2+4 = 125 = 5^2*5.

%t Select[Range[11, 1000, 2], ! SquareFreeQ[#^2 + 4] &] (* _Zak Seidov_, Feb 03 2013 *)

%o (Python)

%o b=1

%o x=1

%o for i in range(1, 100000, 2):

%o for j in range(2, i):

%o if ((i**2)+4)%(j**2)==0:

%o a=i

%o if a!=b:

%o b=a

%o print(x, i)

%o x=x+1

%o (PARI)

%o is_term(n) = !issquarefree(n^2+4);

%o forstep (n=1,10^3,2, if (is_term(n), print1(n,", ")));

%o /* _Joerg Arndt_, Feb 05 2013 */

%o (Magma) [k: k in [1..1000 by 2] | not IsSquarefree(k^2+4)]; // _Bruno Berselli_, Feb 06 2013

%Y Cf. A000290, A005117, A005408, A087475.

%K nonn

%O 1,1

%A _Ruskin Harding_, Feb 03 2013