Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
$\begingroup$Calculate any defined problem, hardcoded for oprimisation purposes, run and wait for results. Calculate Pi or other expansions. Yes, if a program always return the same result it can be just stored as the file. Sorry I am not sure how this is the Computer Science (maybe I an wrong and it is perfectly ok). And the usefulness is a subjective term. Someone may want to perform heating test on hardware so the program producing random numbers that doesn't bother to print them anywhere becomes useful.$\endgroup$
$\begingroup$A program that wakes you up every day at 8 a.m. takes input, namely the current time and the time you wish to be woken up. Just because the task is repetitive and requires minimal input does not make it inputless. I think you will find that, at the very least, any program or algorithm that does not take some form of input does not produce meaningful output (and therefore is useless or redundant as the OP puts it).$\endgroup$
$\begingroup$Emm, poor software design skills guys. My program takes no input. It just runs a lot of nops and then signals the alarm. The number of nops is calibrated to be equal exactly 24 hours on my machine.$\endgroup$
for i = 1 to infty { print i-th prime }
qualify? $\endgroup$