It works better if you put a /7 in the code:

select trunc(to_number(to_char(sysdate,'DDD'))/7)+1 from dual;