OFFSET
1,3
COMMENTS
a(n) tells how many natural numbers <= n there are which are not divisible by the square of their largest noncomposite divisor.
The largest noncomposite divisor of 1 is 1 itself, and 1 is divisible by 1^2, thus 1 is not included in the count, and a(1)=0.
The "largest noncomposite divisor" for any integer > 1 means the same thing as the largest prime divisor, and thus we are counting the terms of A102750 (Numbers n such that square of largest prime dividing n does not divide n).
Thus this is the partial sums of the characteric function for A102750.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
For n = 9, there are numbers 2, 3, 5, 6 and 7 which are not divisible by the square of their largest prime factor, while 1 is excluded (no prime factors) and 4 and 8 are divisible both by 2^2 and 9 is divisible by 3^2. Thus a(9) = 5.
MATHEMATICA
ndsQ[n_]:=Mod[n, Max[Select[Divisors[n], !CompositeQ[#]&]]^2]!=0; Accumulate[Table[If[ ndsQ[n], 1, 0], {n, 80}]] (* Harvey P. Dale, Oct 14 2023 *)
PROG
(Python)
from sympy import primefactors
def a243285(n): return 0 if n==1 else sum([1 for k in range(2, n + 1) if k%(primefactors(k)[-1]**2)!=0]) # Indranil Ghosh, Jun 15 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 02 2014
STATUS
approved