login
Number of integers <= n whose largest prime factor is of the form 4*k+1.
2

%I #31 Nov 24 2024 02:08:20

%S 0,0,0,0,1,1,1,1,1,2,2,2,3,3,4,4,5,5,5,6,6,6,6,6,7,8,8,8,9,10,10,10,

%T 10,11,11,11,12,12,13,14,15,15,15,15,16,16,16,16,16,17,18,19,20,20,20,

%U 20,20,21,21,22,23,23,23,23,24,24,24,25,25,25,25,25,26,27,28,28,28,29,29

%N Number of integers <= n whose largest prime factor is of the form 4*k+1.

%C Conjecture : for n > 1000 a(n) - n/2 < - sqrt(n) ( if b(n) denotes the number of x with largest prime factor of the form 4k+3 less than or equal to n, it is conjectured that if n > 1000 b(n)- n/2 > sqrt(n) )

%C Partial sums of the indicator function of A071821. - _Robert Israel_, Nov 05 2024

%H Robert Israel, <a href="/A071824/b071824.txt">Table of n, a(n) for n = 1..10000</a>

%p filter:= n -> max(numtheory:-factorset(n)) mod 4 = 1:

%p R:= NULL: t:= 0:

%p for i from 1 to 100 do

%p if filter(i) then t:= t+1 fi;

%p R:= R,t

%p od:

%p R; # _Robert Israel_, Nov 05 2024

%t Join[{0}, Accumulate[Boole[Divisible[FactorInteger[Range[2, 100]][[All, -1, 1]] - 1, 4]]]] (* _Paolo Xausa_, Nov 23 2024 *)

%o (PARI) a(n)=sum(i=2, n, ((factor(i)[omega(i),1])-1)%4==0)

%o (Python)

%o from sympy import factorint

%o a = lambda n: sum(1 for i in range(2, n + 2) if (max(factorint(i).keys()) - 1) & 3 == 0)

%o print([a(n) for n in range(0, 79)]) # _DarĂ­o Clavijo_, Nov 05 2024

%Y Cf. A071821.

%K easy,nonn

%O 1,10

%A _Benoit Cloitre_, Jun 07 2002

%E Missing a(1)=0 inserted by _Sean A. Irvine_, Aug 15 2024

%E Name edited by _Michel Marcus_, Nov 05 2024