How many more reports can you generate? How many sales figures do you have to tally, how many charts, how many databases, how many sql queries, how many 'design' pattern to follow, how many bugs to fix etc. etc.. because you get paid for it.. Fatigue sets in , purpose of living is being questioned, and just when you are about to yell '.. to hell with all this..', your mortgage comes due, and don't look for that escape vacation because we are in a corona virus shutdown.. Well. Python to the rescue! You can do a lot with Python, and let us do some Radix arithmetic.. Why? Because this is the birth week of the elegant mathematician Ramanujan. 'Numbers were his personal friends!'. He played with his friends all life-long, and arranged them in patterns which he thought beautiful. Most of you will think the same, and yet they seem so easy, that you will say 'Why did'nt I think of that?' There is more.. Once you see the pattern, it will enter your head, and never leave until you find some truth about! Don't worry.. Python to the rescue.. Here is one such pattern: x + = x + = x + = x + = x + = x + = x + = x + = x + = 1 8 1 9 12 8 2 98 123 8 3 987 1234 8 4 9876 12345 8 5 98765 123456 8 6 987654 1234567 8 7 9876543 12345678 8 8 98765432 123456789 8 9 987654321 I have no idea what you see in this pattern, but what I see this: a. All the digits of the radix 10 (or base 10) except 0 are represented. b. The second number 8 is 10 - 2 c. The third number is a digit in the sequence of all digits in base 10, except 0. The follow-up question is, is this pattern valid for number system in a different radix? The answer to this question is to use Python. Search google, and here are some useful links: https://stackoverflow.com/questions/2267362/how-to-convert-an-integer-to-a-string-in-any-base Using the ideas in these links and knowledge of the number base from high school, you can create a python class to answer the question. First, here is the output of my program: $ python ramjam.py x + = => x + = x + = => x + = $ python ramjam.py x + = => x + = x + = => x + = x + = => x + = $ python ramjam.py x + = => x + = x + = => x + = x + = => x + = x + = => x + = $ python ramjam.py x + = => x + = x + = => x + = x + = => x + = x + = => x + = x + = => x + = $ python ramjam.py x + = => x + = x + = => x + = x + = => x + = x + = => x + = x + = => x + = x + = => x + = $ python ramjam.py x + = => x + = x + = => x + = x + = => x + = x + = => x + = x + = => x + = x + = => x + = x + = => x + = $ python ramjam.py x + = => x + = x + = => x + = x + = => x + = x + = => x + = x + = => x + = x + = => x + = x + = => x + = x + = => x + = 3 1 1 1 2 1 1 1 2 12 1 2 21 5 1 2 7 4 1 2 1 3 1 2 1 3 12 2 2 32 6 2 2 14 123 2 3 321 27 2 3 57 5 1 3 1 4 1 3 1 4 12 3 2 43 7 3 2 23 123 3 3 432 38 3 3 117 1234 3 4 4321 194 3 4 586 6 1 4 1 5 1 4 1 5 12 4 2 54 8 4 2 34 123 4 3 543 51 4 3 207 1234 4 4 5432 310 4 4 1244 12345 4 5 54321 1865 4 5 7465 7 1 5 1 6 1 5 1 6 12 5 2 65 9 5 2 47 123 5 3 654 66 5 3 333 1234 5 4 6543 466 5 4 2334 12345 5 5 65432 3267 5 5 16340 123456 5 6 654321 22875 5 6 114381 8 1 6 1 7 1 6 1 7 12 6 2 76 10 6 2 62 123 6 3 765 83 6 3 501 1234 6 4 7654 668 6 4 4012 12345 6 5 76543 5349 6 5 32099 123456 6 6 765432 42798 6 6 256794 1234567 6 7 7654321 342391 6 7 2054353 9 1 7 1 8 1 7 1 8 12 7 2 87 11 7 2 79 123 7 3 876 102 7 3 717 1234 7 4 8765 922 7 4 6458 12345 7 5 87654 8303 7 5 58126 123456 7 6 876543 74733 7 6 523137 1234567 7 7 8765432 672604 7 7 4708235 12345678 7 8 87654321 6053444 7 8 42374116 This output shows the pattern for bases 3 thru 9. The pattern is shown on the left followed by => and the familiar base 10 calculation on the right. So yes, it is true for - the pattern is valid for bases other than 10! Here is the code (written using Python 3.8): self.b=N s = n=self.b M> : s = str(M % n) + s M = int(M/n) int(s) d= s=str(s) l=len(s) i,c enumerate(s): d += int(c)*self.b**(l-i ) d i range( ,self.b): j=self.b**(i ) p1= j range( ,i): p1 *=self.b p1 +=j+ p2=self.tb(self.b ) p3=i p4=p1*p2+p3 print( ) bN=baseN(b) bN.printPattern() sys __name__ == : msg= ; err= len(sys.argv) != : err= b=sys.argv[ ] b.isnumeric(): err= b=int(b) (b>= b<= ): err= err: print(msg) : test(b) #program to generate some patterns in base N : class baseN : def __init__ (self,N) : def tb (self,M) #to base (returns number in that base) "" #b=base while 0 return : def fb (self,s) #from base (returns number) 0 for in #print(f'd={d}; c={int(c)}; l-i: {l-i-1}') -1 return : def printPattern (self) for in 1 -1 #should be a pattern 1 for in 1 1 -2 f' x + = => x + = ' {self.tb(p1)} {self.tb(p2)} {self.tb(p3)} {self.tb(p4)} {p1} {p2} {p3} {p4} : def test (b) import if '__main__' 'usage: python ramjam.py <x> where <x> is between 3 and 9' False if 2 True 1 if not True if not 3 and 9 True if else Go find your own pattern! Python at Home to the rescue.. Ramanujan can help: https://en.wikipedia.org/wiki/Srinivasa_Ramanujan