Tax account number
The tax account number is a tax identification number ( English Taxpayer Identification Number , TIN ) and is assigned by the Austrian tax office when a new tax file is created. It is used to clearly identify taxpayers and to make administration efficient. The tax account number is also used as sort criterion referred.
The tax account number is made up of the tax office number and tax number . In everyday language usage , the term tax number is often used as a synonym for the tax account number actually intended.
Since 2012, for example, the term "tax account number (tax office number - tax number)" has been used consistently on the forms provided by the tax office, previously the term "tax number".
General
The tax account number is indicated on all written copies of the tax office (notices, reservations, etc.). The tax account number must always be stated on all receipts (documents, payment coupons, etc.) that are sent to the tax office.
One and the same taxpayer can generally be assigned not just one but also several tax account numbers, each tax account number being intended for a specific purpose. Based on a specific tax account number, the taxpayer can always be clearly identified (by the tax office) to whom this tax account number is assigned.
A tax account number is assigned by the local tax office that is responsible for the taxpayer's place of residence. If the taxpayer changes his place of residence, his tax account number can also change.
Neither the tax account number, the tax office number nor the tax number are listed on official proof of identity . There are also no official cards issued on which the numbers mentioned could be found. On tax assessments, for example, the tax account number is always listed in the upper right corner of the first page.
construction
The tax account number consists of nine digits . It is made up of the tax office number and the tax number together with the check digit . It is structured as follows:
- FA-NNNNNN-P or
- ... as 9- tuple shown
Where:
- FA or and ... tax office number (always 2-digit, possibly with a leading zero )
- NNNNNN or … front part (always 6 digits) of the tax number
- P or … check digit (always 1-digit) as the last digit of the tax number
The tax number always has 7 digits and is structured as follows : NNNNNN-P . It consists of the 6-digit front part NNNNNN with the check digit P attached . The check digit P always relates to the tax account number (from the point of view of the calculation), although it is considered to be associated with the tax number in terms of usage and spelling.
Each of the through F , A , N and P , or , , , , , , , and symbolized digit is a digit from the decimal system and can therefore values from the amount accept.
Note: The hyphen " - " has nothing to do with the spelling, it is only used here to clearly distinguish the individual components from one another and thus to illustrate the structure of the tax account number.
Notation
Different spellings are used for the tax account number: Wherever the best possible legibility is important, especially in paper or document-based processes, separators are usually inserted to make it easier for people to record them as error-free and fatigue-free as possible. For electronic data processing , on the other hand, all separators should preferably be omitted and the nine digits should therefore be written one after the other.
The following notations are common:
- FA-NNN / NNNP ... easy to read (example: 90-123 / 4567 )
- FA NNN / NNNP ... easy to read (example: 90 123/4567 )
- FA NNNNNNP ... poor legibility (example: 90 1234567 )
- FANNNNNNP ... preferred for electronic data processing (example: 901234567 )
Note: The characters " - " ( hyphen ) and " / " ( slash ) as well as the spaces are only separators for the purpose of better readability and in particular not mathematical operators .
Stock of values
While the tax office number FA is fixed for a certain tax office ( see table ) and the check digit P is determined by a calculation rule ( see below ), the six digits NNNNNN in the front part of the tax number are when a (new) tax account number is generated (by the tax office ) basically freely selectable.
This means that a maximum of 10 6 = 1,000,000 different tax account numbers or tax numbers can be assigned per tax office number. A maximum of 10 2 = 100 different tax office numbers are possible, 40 of which are currently in use. In total there can be 10 2 + 6 = 10 8 = 100,000,000 different tax account numbers.
Tax office numbers
Each tax office is assigned a unique, always 2-digit tax office number FA as follows. The tax office number is always the prefix of every tax account number.
FA | Tax office | state | IBAN | "Fictitious" tax account number |
---|---|---|---|---|
03 | Vienna 3/6/7/11/15 Schwechat Gerasdorf | Vienna | AT87 0100 0000 0550 4037 | 03-999 / 9032 |
04 | Vienna 4/5/10 | Vienna | AT92 0100 0000 0550 4044 | 04-999 / 9048 |
06 | Vienna 8/16/17 | Vienna | AT26 0100 0000 0550 4068 | 06-999 / 9068 |
07 | Vienna 9/18/19 Klosterneuburg | Vienna | AT31 0100 0000 0550 4075 | 07-999 / 9074 |
08 | Vienna 12/13/14 Purkersdorf | Vienna | AT36 0100 0000 0550 4082 | 08-999 / 9080 |
09 | Vienna 1/23 | Vienna | AT62 0100 0000 0550 4099 | 09-999 / 9096 |
10 | for fees, transfer taxes and gambling | - | AT83 0100 0000 0550 4109 | 10-999 / 9102 |
12 | Vienna 2/20/21/22 | Vienna | AT93 0100 0000 0550 4123 | 12-999 / 9124 |
15th | Amstetten Melk Scheibbs | Lower Austria | AT32 0100 0000 0550 4154 | 15-999 / 9150 |
16 | Baden Mödling | Lower Austria | AT37 0100 0000 0550 4161 | 16-999 / 9166 |
18th | Gänserndorf Mistelbach | Lower Austria | AT68 0100 0000 0550 4185 | 18-999 / 9188 |
22nd | Hollabrunn Korneuburg Tulln | Lower Austria | AT28 0100 0000 0550 4226 | 22-999 / 9222 |
23 | Waldviertel | Lower Austria | AT33 0100 0000 0550 4233 | 23-999 / 9238 |
29 | Lilienfeld St. Pölten | Lower Austria | AT08 0100 0000 0550 4295 | 29-999 / 9292 |
33 | Neunkirchen Wr. Neustadt | Lower Austria | AT65 0100 0000 0550 4336 | 33-999 / 9336 |
38 | Bruck Eisenstadt Oberwart | Burgenland, Lower Austria | AT14 0100 0000 0550 4381 | 38-999 / 9384 |
41 | Braunau Ried Schärding | Upper Austria | AT54 0100 0000 0552 4419 | 41-999 / 9412 |
46 | Linz | Upper Austria | AT03 0100 0000 0552 4464 | 46-999 / 9460 |
51 | Church village Perg Steyr | Upper Austria | AT65 0100 0000 0552 4512 | 51-999 / 9510 |
52 | Free city of Rohrbach Urfahr | Upper Austria | AT91 0100 0000 0552 4529 | 52-999 / 9526 |
53 | Gmunden Vöcklabruck | Upper Austria | AT96 0100 0000 0552 4536 | 53-999 / 9532 |
54 | Grieskirchen Wels | Upper Austria | AT04 0100 0000 0552 4543 | 54-999 / 9548 |
57 | Klagenfurt | Carinthia | AT92 0100 0000 0556 4572 | 57-999 / 9574 |
59 | St. Veit Wolfsberg | Carinthia | AT26 0100 0000 0556 4596 | 59-999 / 9596 |
61 | Spittal Villach | Carinthia | AT52 0100 0000 0556 4613 | 61-999 / 9618 |
65 | Bruck Leoben Mürzzuschlag | Styria | AT73 0100 0000 0553 4650 | 65-999 / 9650 |
67 | Eastern Styria | Styria | AT07 0100 0000 0553 4674 | 67-999 / 9672 |
68 | Graz city | Styria | AT12 0100 0000 0553 4681 | 68-999 / 9688 |
69 | Graz area | Styria | AT38 0100 0000 0553 4698 | 69-999 / 9694 |
71 | Judenburg Liezen | Styria | AT64 0100 0000 0553 4715 | 71-999 / 9716 |
72 | Deutschlandsberg Leibnitz Voitsberg | Styria | AT69 0100 0000 0553 4722 | 72-999 / 9722 |
81 | innsbruck | Tyrol | AT31 0100 0000 0554 4815 | 81-999 / 9814 |
82 | Kitzbühel Lienz | Tyrol | AT36 0100 0000 0554 4822 | 82-999 / 9820 |
83 | Kufstein Schwaz | Tyrol | AT62 0100 0000 0554 4839 | 83-999 / 9836 |
84 | Landeck Reutte | Tyrol | AT67 0100 0000 0554 4846 | 84-999 / 9842 |
90 | St. Johann Tamsweg Zell am See | Salzburg | AT90 0100 0000 0555 4908 | 90-999 / 9906 |
91 | Salzburg city | Salzburg | AT95 0100 0000 0555 4915 | 91-999 / 9912 |
93 | Salzburg country | Salzburg | AT29 0100 0000 0555 4939 | 93-999 / 9934 |
97 | Bregenz | Vorarlberg | AT37 0100 0000 0557 4971 | 97-999 / 9976 |
98 | Feldkirch | Vorarlberg | AT63 0100 0000 0557 4988 | 98-999 / 9982 |
Remarks:
- The BIC for all tax offices is: BUNDATWW (bank details: BAWAG PSK )
- The tax office number can always be found in the third from last and penultimate digits of the respective tax office IBAN . This relationship can be used for validation purposes. Example: Linz tax office: FA = 46 , IBAN = AT03 0100 0000 0552 4 46 4
"Fictitious" tax account number
In the case of certain legal processes (e.g. complaint fees) it is generally not necessary to state the tax account number assigned to you. In such cases, or if the tax account number has not yet been communicated to you by the tax office, the “fictitious” tax account number provided for this purpose of the respective tax office must be used ( see table in the previous section ).
Check digit
Only a single decimal check digit is used as the checksum for the tax account number .
use cases
There are three situations in which the check digit needs to be calculated:
- When generating new tax account numbers. In this case, and are given for a specific tax office, and the digits are determined (e.g. using a random number generator ). Then you have to calculate in order to get a complete tax account number . (When assigning it, make sure that the newly generated tax account number does not already exist; each tax account number assigned must be unique.) The tax office normally generates it.
- When validating - i.e. when checking for formal validity - existing tax account numbers. In this case, the full tax account number is given, and the check digit is recalculated and compared with the given check digit . Validation is recommended wherever tax account numbers are dealt with that could possibly contain errors (e.g. typing , transferring , scanning errors, etc.).
- When reconstructing existing tax account numbers, for which the check digit has not become unequivocally or not at all legible, while all the other eight digits are unequivocally legible.
purpose
The purpose of the check digit is to intentionally add redundancy to the tax account number in order to be able to identify incorrect tax account numbers as incorrect with the highest possible probability . The check digit can be used to ensure that input errors lead to formal errors, which are then reliably recognizable. (The emphasis here is on "can", that is, it can succeed, but does not always have to succeed.)
Ultimately, the aim is to be able to eliminate incorrect tax account numbers and then only work with correct tax account numbers in order to make administration more efficient.
Calculation of the check digit
The check digit of the tax account number can be calculated as follows - based on the Luhn algorithm :
- With
-
=
(80 - S) % 10
The formula for calculating the check digit is therefore an 8- digit , surjective function with the eight variables :
The following applies here:
- ... cross sum of the number
- with number
-
, ... auxiliary amount
- For
- For
This is the "mathematical" (and not the "symmetrical") variant of the modulo function . For programming, it is advisable here to always call the modulo function with non-negative numbers, since you then no longer have to worry about whether the programming language used implements the "mathematical" or the "symmetrical" variant, because then both variants deliver the same (and here fitting) results. In the above calculation of the check digit, this is achieved by adding to , which results in the program code .
(80 - S) % 10
Details on the cross-sum calculation of the number multiplied by 2:
Digit |
Checksum |
|
---|---|---|
0 | 0 | 0 |
1 | 2 | 2 |
2 | 4th | 4th |
3 | 6th | 6th |
4th | 8th | 8th |
5 | 10 | 1 |
6th | 12 | 3 |
7th | 14th | 5 |
8th | 16 | 7th |
9 | 18th | 9 |
A corresponding calculation example can be found below.
From this it can be seen that the function is or is bijective . This is why there is also its inverse function , which can be used to unambiguously determine the associated digit for a given value . The inverse function is as follows:
- With
This means that the number can be represented as a function of , i.e. the cross sum of the number multiplied by 2.
Example: If is, then must be; see table or inverse function:
This clear reversibility is important so that, for example, the reconstruction of an unknown digit of a tax account number works in all cases.
Validation
Validation based on the structure
A given tax account number is usefully first of all, then to consider whether their building meets the basic requirements of the structure.
Validation based on the check digit
A given tax account number can be checked for formal validity ( data validation , plausibility check ) by comparing its given check digit with the newly calculated check digit for this tax account number . The calculation method is for and the same.
- Agree and agree, the given tax account number is formally valid. (Note: Just because a given tax account number is purely formally valid, it does not necessarily have to be valid before the tax office; it may not have been assigned by the tax office, for example.)
- Agree and do not agree, the given tax account number is certainly invalid.
Two related calculation examples can be found below.
Validation based on the tax office number
To check whether a given tax account number can be valid, the tax office number FA contained in it can be compared with a list of valid tax office numbers (see e.g. the table above or the web links below ).
- If the tax office number FA contained in the tax account number appears in the list of valid tax office numbers, the given tax account number can (but does not have to) be valid before the tax office.
- If, however, the tax office number FA is not included in the list of valid tax office numbers, the given tax account number is not valid in any case.
Error detection
General
Purely formal errors in a tax account number can always be detected with a 100% probability using the check digit. That is, when a charge account number the predetermined formal criteria ( structure not match / structure, in particular check digit), this is seen to be 100%.
The difference is the detection of random input errors , e.g. B. Typing, transmission, scanning errors u. The like. Here, in particular, pressing the wrong key when typing on a keyboard , swapping (adjacent) digits (e.g. 69 instead of 96 ; number rotator ), mixing up digits due to poor legibility (e.g. 8 instead of of 3 ) or poor intelligibility while calling (z. B. 3 instead of 2 ) or the like is meant.
The probability that existing input errors are actually recognizable is 90%. Statistically, random input errors have the effect that in 90% of all possible cases ( ) a tax account number is created which - due to its check digit - is no longer formally valid and can then be reliably (100%) recognized as invalid.
The probability that the error detection fails, i.e. that existing input errors are wrongly not detected, is 10% here. Statistically, random input errors have the effect that in 10% of all possible cases ( ) a tax account number is created that is formally valid despite the input error and despite its check digit and therefore cannot be recognized as invalid.
These two probabilities are due to the fact that only a single decimal check digit is used as the checksum, which can only assume one specific value for a specific tax account number out of ten possible digit values.
If a formal error (based on the check digit) was recognized, then it is 100% clear that the tax account number is formally invalid, i.e. it contains errors. However, it cannot be determined where (with which or which of the nine digits) the error is. The exact number of errors cannot be determined either; it is then only clear that at least one of the nine digits must be wrong. An automatic correction of the input error is not possible. So there is no fault tolerance here , just simple fault detection.
More information on recognizing special input errors can be found in the section of the same name below.
Detection of special input errors
In order to get a better impression of which input errors, under which circumstances and with which probabilities, can be recognized as input errors or not recognized as such, the following special cases should be considered more closely, which can be assumed to occur frequently in everyday practice .
Exactly one single incorrect digit
If exactly one single digit is incorrect for a given tax account number (and all other eight digits are correct), then this can always be recognized with a probability of 100%. If you make a mistake on just one of the nine digits, then this can always be recognized without exception.
If you pick any number out of the total of eight digits from the tax account number and assume all the remaining seven digits of the tax account number (as well as their specific check digit ) as fixed (of the original eight variables only one variable remains, and the remaining original variables become constants), then the (in the general case yes) 8-digit, surjective function, according to which the check digit is calculated, becomes
- ,
Always a new, now-digit function , which for is bijective always. Due to the bijectivity of, it follows that every incorrect value of the digit is reflected in a check digit value in the course of the validation that definitely deviates from the given check digit . A typo alone can therefore always be recognized.
For comparison, the general case: If there are wrong digits in a tax account number , then there is generally no longer any bijectivity of the then -digit function . The probability that existing input errors will actually be recognized is then only 90%. If you wanted to increase this probability, you would have to introduce a multi-digit checksum or expand the base (= 10 in the decimal system ) of the check digit, e.g. B. switch to a hexadecimal check digit.
Exactly an interchange of two immediately adjacent digits
If there is an interchange of two immediately adjacent digits and , then this can not be recognized if the following applies:
- and
The first of the two conditions results from the consideration that two digits can only be swapped (in a potentially result-relevant manner) if they are different from one another; a swap of the two digits at z. B. the number 44 does not change anything. The second condition arises from the consideration that the error detection on the basis of the check digit fails if the check digit value of the non-swapped variant does not differ from the swapped one.
These two conditions are met if and only applies.
That means:
- Whenever the digit sequence 09 or 90 is contained in a tax account number, a number rotated within this number sequence (here called "09-number rotator" for short) cannot be recognized by validation. So if 09 is mistakenly written instead of 90 correctly , or if 90 is mistakenly written instead of 09 correctly , then these “09-number rotators” cannot be recognized by the check digit.
- All other number rotations between two immediately adjacent digits can always be recognized by validation.
If there is only one twisted number in a given tax account number, it can be recognized with a probability of 98%.
If you wanted to be able to recognize a single number rotated in a given tax account number with 100% probability, you would have to do without all those tax account numbers that contain the sequence 09 or 90 ; d. This means that such tax account numbers should never be assigned by the tax office. Specifically, the tax office would have to do without 12,372,894 of the 10 8 = 100,000,000 possible tax account numbers, i.e. almost 12.4% of the value stock . For example, the “fictitious” tax account numbers of the tax offices ( see table ) show that the tax office generally does not use this additional protection option.
Maybe it can help to avoid "09-Zahlendreher" tends to be when you type of tax account numbers, if present, preferably the (usually remote) numeric keypad of the keyboard uses, instead of using the usual numeric keys. In the case of the numeric keypad, the keys for 0and are 9far apart, while in the case of the usual numeric keys on the keyboard they are directly next to each other and can therefore be more prone to accidental mix-ups. The fact that the 0key on the numeric keypad is usually much wider than all other number keys can - due to the resulting tactile feedback - provide additional, so to speak "intuitive" security when typing.
Reconstruction of an unknown digit
If there is a tax account number that has a single digit, regardless of where, that has not become unequivocally or not at all legible, this unknown digit can be clearly reconstructed. The prerequisites for this are, on the one hand, that all other eight digits are legible without any doubt and, on the other hand, that the original tax account number was formally valid.
Attention: Reconstruction is always at your own risk! With such a reconstruction, the property that is normally present (in the case of a completely intact tax account number because of the check digit) that input errors can be recognized is lost. If (random) input errors are made in the course of the reconstruction, then these will not be recognized and the reconstructed digit will generally (more precisely: with a probability of 90%) be wrong. Such a reconstruction should therefore only be carried out with caution and special attention, if at all. From a purely mathematical point of view, however, the reconstructions described here are flawless. In any case, you should first try to obtain the full tax account number (or the unknown number) in other ways. At the end of a reconstruction, it is advisable to subject the completed tax account number to a validation in order to at least identify or exclude any formal errors.
Method 1: direct calculation
The calculation of the unknown number depends on where the number is in the tax account number . The calculation can be done as follows:
structure | unknown digit in place of |
calculation |
---|---|---|
x A-NNN / NNNP |
|
|
F x -NNN / NNNP |
|
|
FA- x NN / NNNP |
|
|
FA-N x N / NNNP |
|
|
FA-NN x / NNNP |
|
|
FA-NNN / x NNP |
|
|
FA-NNN / N x NP |
|
|
FA-NNN / NN x P |
|
|
FA-NNN / NNN x |
|
- ↑ For the sake of completeness and better comparison possibilities, the check digit formula is again given here in compact form. It may well happen that the check digit needs to be reconstructed.
The following applies here:
- with number
- ... cross sum of the number
- With
Two related calculation examples can be found below.
Method 2: iterative calculation
The unknown number can also be calculated using an iterative method . You can proceed as follows:
- If the unknown digit takes the place of the check digit , it can be reconstructed directly, i.e. non-iteratively, using the check digit formula.
- For all other cases: You assign different values from the set to the unknown digit until the newly calculated check digit matches the given check digit . Usually you will assign the values 0, 1, 2,…, 9 one after the other, but you can also choose any other order. In the best case, on the first attempt, generally after an average of five, in any case after a maximum of ten attempts, one has then found the desired value for by trying out the ten different possibilities.
A corresponding calculation example can be found below.
Note: If digits are unknown for a given tax account number , but the check digit itself is known, then the tax account number can no longer be clearly reconstructed purely from the check digit. Under certain circumstances, clarity can still be achieved by using other criteria; however, in general this will not work. For example, potential tax account number candidates can be excluded if their (calculated) tax office number FA does not appear in the list of tax office numbers actually used ( see table ). In any case, by appropriately generalizing the iterative procedure outlined above, i.e. by trying out all possible variations , all those potential candidates can be identified that would result in a formally valid tax account number. In practice, however, this is not recommended.
Examples
Example 1 - Generating a new tax account number
The tax account number for the tax office no. 98 (Feldkirch) should be generated, whereby the first six digits of the tax number should be 123456 .
So the following is given:
The check digit is sought :
-
=
(80 - S) % 10
= (80 - 40)% 10 = 40% 10 = 0
The tax account number is therefore: 98-123 / 4560
Example 2 - Validation of a given tax account number
The tax account number 90-123 / 4567 should be checked for formal validity.
So the following is given:
The check digit is to be calculated , which is then to be compared with :
-
=
(80 - S) % 10
= (80 - 33)% 10 = 47% 10 = 7
The given tax account number 90-123 / 4567 is formally valid because it is here .
Example 3 - Validation of a given tax account number
The tax number 987/6543 , which should be assigned to the tax office “Vienna 02/20/21/22” ( FA = 12 ), should be checked for formal validity. (The tax account number 12-987 / 6543 must therefore be checked for formal validity.)
So the following is given:
The check digit is to be calculated , which is then to be compared with :
-
=
(80 - S) % 10
= (80 - 44)% 10 = 36% 10 = 6
The given tax account number 12-987 / 6543 is formally not valid because it is here .
Example 4 - direct reconstruction of an unknown digit of a tax account number
The tax account number 46-376 / 5 x 21 is to be reconstructed, the penultimate digit x has become unrecognizable.
So the following is given:
Is wanted .
The calculation can be done as follows:
The full tax account number is therefore 46-376 / 5 3 21 . A final validation confirms the correctness of the result.
Example 5 - direct reconstruction of an unknown digit of a tax account number
The tax account number 03-826 / 15 x 4 is to be reconstructed, the penultimate digit x has become unrecognizable.
So the following is given:
Is wanted .
The calculation can be done as follows:
The full tax account number is therefore 03-826 / 15 7 4 . A final validation confirms the correctness of the result.
Example 6 - iterative reconstruction of an unknown digit of a tax account number
The tax account number 54-2 x 7/9451 is to be reconstructed, the fourth digit (counting from the left) of which x has become unrecognizable.
So the following is given:
Is wanted .
The iterative calculation can be carried out as follows:
Run number | selected value for |
temporary tax account number |
calculated check digit |
Validation result (is the same ?) |
---|---|---|---|---|
1 | 0 | 54-2 0 7/945 1 | 4th | No |
2 | 1 | 54-2 1 7/945 1 | 2 | No |
3 | 2 | 54-2 2 7/945 1 | 0 | No |
4th | 3 | 54-2 3 7/945 1 | 8th | No |
5 | 4th | 54-2 4 7/945 1 | 6th | No |
6th | 5 | 54-2 5 7/945 1 | 3 | No |
7th | 6th | 54-2 6 7/945 1 | 1 | Yes |
In this example, in the seventh iteration step, the digit was found which results in a successful validation of the temporary tax account number. The number found completes the given tax account number. The full tax account number is therefore 54-2 6 7/9451 . A final validation confirms the correctness of the result.
See also
Web links
- TIN on-the-Web - Online test module for tax identification numbers (Taxpayer Identification Numbers, TIN) of the European Commission
Individual evidence
- ↑ a b c BMF - tax payments (tax office payment). In: bmf.gv.at. Retrieved December 12, 2016 .
- ↑ a b c BMF - Other organizational measures. In: bmf.gv.at. Retrieved December 12, 2016 .
- ^ BMF - Tax & Customs Forms. In: service.bmf.gv.at. Retrieved December 12, 2016 .
- ↑ a b c Tax identification numbers (Austria). (PDF; 196 kB) European Commission, January 19, 2017, accessed December 9, 2017 .
- ↑ a b Tax office payment in MBS / XML. (PDF; 217 kB) STUZZA GesmbH, December 12, 2016, accessed on December 9, 2017 .
- ^ BMF - Offices & Authorities. In: service.bmf.gv.at. Retrieved December 12, 2016 .
- ↑ List of tax offices. (CSV; approx. 30 kB) Federal Ministry of Finance, accessed on December 22, 2016 (the list is regenerated by the tax office every time it is accessed to ensure that it is up to date).
- ↑ BMF - tax payments (information on the tax account number). In: bmf.gv.at. Retrieved December 12, 2016 .
-
↑ simple program for counting the "09-number rotators"; it returns 12372894 as the result
Source code of a computer program in the Java programming language for counting the "09-number rotators"
import java.lang.Math; public class Count_09_Pairs { public static void main(String[] args) { long from = 0; long to = 99999999; if ((from > to) || (from < 0) || (to > 99999999)) { System.out.println("falsche Intervall-Angaben"); System.exit(0); } int lg_to = (int)(Math.log10((double)(to + 1))); long number; long z0, z1, z2, z3, z4, z5, z6, z7, z8; long count = 0; for (number = from; number <= to; ++number) { z0 = number % 10; z1 = ((long)(number / 10)) % 10; z2 = ((long)(number / 100)) % 10; z3 = ((long)(number / 1000)) % 10; z4 = ((long)(number / 10000)) % 10; z5 = ((long)(number / 100000)) % 10; z6 = ((long)(number / 1000000)) % 10; z7 = ((long)(number / 10000000)) % 10; z8 = ((long)(number / 100000000)) % 10; if ( ( (lg_to >= 2) && ( ((z0 == 0) && (z1 == 9)) || ((z0 == 9) && (z1 == 0)) ) ) || ( (lg_to >= 3) && ( ((z1 == 0) && (z2 == 9)) || ((z1 == 9) && (z2 == 0)) ) ) || ( (lg_to >= 4) && ( ((z2 == 0) && (z3 == 9)) || ((z2 == 9) && (z3 == 0)) ) ) || ( (lg_to >= 5) && ( ((z3 == 0) && (z4 == 9)) || ((z3 == 9) && (z4 == 0)) ) ) || ( (lg_to >= 6) && ( ((z4 == 0) && (z5 == 9)) || ((z4 == 9) && (z5 == 0)) ) ) || ( (lg_to >= 7) && ( ((z5 == 0) && (z6 == 9)) || ((z5 == 9) && (z6 == 0)) ) ) || ( (lg_to >= 8) && ( ((z6 == 0) && (z7 == 9)) || ((z6 == 9) && (z7 == 0)) ) ) || ( (lg_to >= 9) && ( ((z7 == 0) && (z8 == 9)) || ((z7 == 9) && (z8 == 0)) ) ) ) { count++; /* System.out.println("" + ((lg_to >= 9) ? z8 : "") + ((lg_to >= 8) ? z7 : "") + ((lg_to >= 7) ? z6 : "") + ((lg_to >= 6) ? z5 : "") + ((lg_to >= 5) ? z4 : "") + ((lg_to >= 4) ? z3 : "") + ((lg_to >= 3) ? z2 : "") + ((lg_to >= 2) ? z1 : "") + ((lg_to >= 1) ? z0 : "") + " (" + number + ")" + " => 09-/90-Paar gefunden: " + count); */ } } System.out.println("Gesamtanzahl an 09-/90-Paaren in [" + from + ".." + to + "]: " + count); } }