%I #56 Mar 16 2023 11:25:31
%S 1,5,13,17,21,29,33,37,41,53,57,61,65,69,73,77,85,89,93,97,101,105,
%T 109,113,129,133,137,141,145,149,157,161,165,173,177,181,185,193,197,
%U 201,205,209,213,217,221,229,233,237,241,249,253,257,265,269
%N Squarefree numbers congruent to 1 (mod 4).
%C The subsequence of primes is A002144.
%C The subsequence of semiprimes (intersection with A001358) begins: 21, 33, 57, 65, 69, 77, 85, 93, 129, 133, 141, 145, 161, 177, 185, 201, 205, 209, 213, 217, 221, 237, 249, 253, 265.
%C The subsequence with more than two prime factors (intersection with A033942) begins: 105 = 3 * 5 * 7, 165 = 3 * 5 * 11, 273, 285, 345, 357, 385, 429, 465. - _Jonathan Vos Post_, Feb 19 2011
%C Except for a(1) = 1 these are the squarefree members of A079896 (i.e., squarefree determinants D of indefinite binary quadratic forms). - _Wolfdieter Lang_, Jun 01 2013
%C The asymptotic density of this sequence is 2/Pi^2 = 0.202642... (A185197). - _Amiram Eldar_, Feb 10 2021
%D Richard A. Mollin, Quadratics, CRC Press, 1996, Tables B1-B3.
%H Reinhard Zumkeller, <a href="/A039955/b039955.txt">Table of n, a(n) for n = 1..10000</a>
%H A. M. Legendre, <a href="https://archive.org/details/essaisurlathor00lege/page/n511">Diviseurs de la formule t^2+a*u^2, a étant de la forme 4 n + 1</a>, Essai sur la Théorie des Nombres An VI, Table IV. See first column. [_Paul Curtz_, Aug 14 2019]
%t fQ[n_] := Max[Last /@ FactorInteger@ n] == 1 && Mod[n, 4] == 1; Select[ Range@ 272, fQ] (* _Robert G. Wilson v_ *)
%t Select[Range[1,300,4],SquareFreeQ[#]&] (* _Harvey P. Dale_, Mar 27 2020 *)
%o (Magma) [4*n+1: n in [0..67] | IsSquarefree(4*n+1)]; // _Bruno Berselli_, Mar 03 2011
%o (Haskell)
%o a039955 n = a039955_list !! (n-1)
%o a039955_list = filter ((== 1) . (`mod` 4)) a005117_list
%o -- _Reinhard Zumkeller_, Aug 15 2011
%o (PARI) list(lim)=my(v=List([1])); forfactored(n=5,lim\1, if(vecmax(n[2][,2])==1 && n[1]%4==1, listput(v,n[1]))); Vec(v) \\ _Charles R Greathouse IV_, Nov 05 2017
%o (PARI) is(n)=n%4==1 && issquarefree(n) \\ _Charles R Greathouse IV_, Nov 05 2017
%Y Cf. A002144, A039956, A039957, A005117, A185197.
%K nonn,easy,nice
%O 1,2
%A _R. K. Guy_