A071824 Number of integers <= n whose largest prime factor is of the form 4*k+1.
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, 10, 11, 11, 11, 12, 12, 13, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 18, 19, 20, 20, 20, 20, 20, 21, 21, 22, 23, 23, 23, 23, 24, 24, 24, 25, 25, 25, 25, 25, 26, 27, 28, 28, 28, 29, 29
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A071821.
Programs
-
Maple
filter:= n -> max(numtheory:-factorset(n)) mod 4 = 1: R:= NULL: t:= 0: for i from 1 to 100 do if filter(i) then t:= t+1 fi; R:= R,t od: R; # Robert Israel, Nov 05 2024
-
Mathematica
Join[{0}, Accumulate[Boole[Divisible[FactorInteger[Range[2, 100]][[All, -1, 1]] - 1, 4]]]] (* Paolo Xausa, Nov 23 2024 *)
-
PARI
a(n)=sum(i=2, n, ((factor(i)[omega(i),1])-1)%4==0)
-
Python
from sympy import factorint a = lambda n: sum(1 for i in range(2, n + 2) if (max(factorint(i).keys()) - 1) & 3 == 0) print([a(n) for n in range(0, 79)]) # DarĂo Clavijo, Nov 05 2024
Extensions
Missing a(1)=0 inserted by Sean A. Irvine, Aug 15 2024
Name edited by Michel Marcus, Nov 05 2024
Comments