Free Software
The problem is that you are running into one of the four essential freedoms of free software. These are laid out by the GNU project on their website:
A program is free software if the program's users have the four essential freedoms:
- The freedom to run the program as you wish, for any purpose (freedom 0).
- The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.
- The freedom to redistribute copies so you can help others (freedom 2).
- The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.
— What is Free Software? (Emphasis mine)
They go on to explain
The freedom to run the program means the freedom for any kind of person or organization to use it on any kind of computer system, for any kind of overall job and purpose, without being required to communicate about it with the developer or any other specific entity. In this freedom, it is the user's purpose that matters, not the developer's purpose; you as a user are free to run the program for your purposes, and if you distribute it to someone else, she is then free to run it for her purposes, but you are not entitled to impose your purposes on her.
— Ibid. (Italics theirs, but bold mind.)
Your desire to have the output of your program attributed is your purpose — that is, the developer's purpose. Your users' desire to freely reproduce the output of the program is their purpose. And as this has only to do with how the program is run, and has nothing to do with the program source code, it is covered by freedom 0. Thus, if you wish for your software to be free software by GNU's definition, you must not restrict in any way how your users run your software.
It's worth noting that this is purely philosophical — these words have no weight of law and are not a license. This is just an essay laying out GNU's idea of what it means for software to be “free.” It's also presumably the Free Software Foundation's opinion, because the FSF's page on free software links to the GNU page quoted above.
That said, this is the definition of free software that the authors of the GPL and other free software licenses had in mind when writing their licenses. GNU maintains a non-exhaustive list of licenses that it considers to be consistent with its definition of free software.
Open Source Software
Similar to GNU, the Open Source Initiative has a definition of “open source software.” It is similar but not identical to GNU's definition of free software. Criteria 5 and 6 are the most direct correspondence to GNU's freedom 0.
5. No Discrimination Against Persons or Groups
The license must not discriminate against any person or group of persons.
6. No Discrimination Against Fields of Endeavor
The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.
— The Open Source Definition
This is not identical to GNU's freedom 0 — OSI's criteria are more limited and specific. It's not exactly clear to me if what you're suggesting clashes with these criteria, but I think potentially not, as long as your license required everyone to give attribution for output. (There is still the challenge of enforcing that in a license, but I'll talk about that later.)
Like with GNU, this is just philosophy and not a license in itself, but also like GNU, OSI maintains a list of approved licenses that it considers to be consistent with its definition of open source software.
Licensing
You can certainly look through the lists of licenses maintained by GNU and OSI to try to find a license that does what you want. I haven't looked, but I kind of doubt you'll find one. My own impression is that your goal is explicitly contrary to GNU's definition of free software, and implicitly contrary to the spirit of OSI's definition of open source software — but I'm definitely not a lawyer or expert on licensing!
You can also look around for a non-free, non-open-source software license to use, but you'll be on shakier ground there. Software licenses are themselves creative works and are protected by copyright. Free and open source software licenses permit (and usually require) you to distribute them. Other licenses are going to be case-by-case.
If you can't find an existing license you can use, you'll have to write your own. As described above, it won't be considered a free software license, and even if it meets the criteria of an open source license, it won't be an OSI approved open source license unless you go through their review process.
I'm not really knowledgeable to discuss the intricacies of how you would go about that, or the differences between copyright-based licenses and contract-based licenses, or non-US copyright law. I do feel safe in saying it would be non-trivial. You should probably consult a lawyer, as you'll essentially be drafting your own proprietary software license — if you get it wrong, it will be unenforceable.
Potential License Complications
Your goal may be particularly tricky because, as others have pointed out, your copyright over the program likely doesn't extend to the output that users produce using the program. It's my understanding that most software licenses use copyright as the basis to enforce their terms, which would make it difficult for such a license to have terms restricting use of the program's output.
There's also the intricacy of to whom the output should be attributed, assuming your license allows redistribution of the source code as with free and open source software. Would downstream contributors be able to add additional attribution requirements? Alternate attribution requirements?
This is why I recommend that, if you decide to pursue this, you do it with the help of a lawyer. Your goal is to restrict how businesses can use your software, and those businesses will have lawyers. If you use a DIY license, they will find the holes if it's at all worth it to them.