Answer: 617.
To begin with, let's give an example of 616 numbers from 1 to 1000, among which there are no prime squares and no two of which are divisible by the square of a prime. To do this, take 8 numbers of the form 2p2 not exceeding 500, where p is a prime number:
2⋅22, 2⋅32, 2⋅52, 2⋅72, 2⋅112, 2⋅132, 2⋅172, 2⋅192
and also all natural numbers from 1 to 1000, free from squares (that is, not divisible by the square of any prime number). There are only 608 of them. To make sure of this, use the inclusion-exclusion formula:
1000−1≤i≤11∑⌊pi21000⌋+1≤i<j≤11∑⌊pi2pj21000⌋−1≤i<j<k≤11∑⌊pi2pj2pk21000⌋,
where p1=2, p2=3, p3=5, p4=7, p5=11, p6=13, p7=17, p8=19, p9=23, p10=29, p11=31. We get
1000−(250+111+40+20+8+5+3+2+1+1+1)+(⌊22321000⌋+⌊22521000⌋+⌊22721000⌋+⌊221121000⌋+⌊221321000⌋+⌊32521000⌋+⌊32721000⌋)−⌊2232521000⌋=1000−442+(27+10+5+2+1+4+2)−1=558+51−1=608.
Now let's say there are 617 numbers from 1 to 1000, among which there are no squares of prime numbers. Let us show that there are two of them that are divisible by the square of the same prime. Indeed, since there are only 608 natural numbers not exceeding 1000 and free from squares, then at least nine of these numbers are divisible by squares of prime numbers. Let us denote these numbers by a1,a2,…,a9, and for each 1≤i≤9 let qi2 be the square of a prime dividing ai. If all qi2 are different, then some of them, say qk2, is not less than 232=529. But since ak=qk2, then ak≥2qk2=1048. Contradiction. Therefore, there are two numbers divisible by the square of the same prime.