# Katabatak Math-An Exploration In Pure Number Theory

142 replies to this topic

### #18 Tormod

Tormod

Hypographer

• Members
• 14353 posts

Posted 15 March 2005 - 10:57 AM

Oooh, I feel bad for not coming back with my composition. I started it, got sick, and since then it's been residing on my harddisk as a rough draft. It will get somewhere eventually, when I get rid of this damned flu!!!

### #19 Buffy

Buffy

Resident Slayer

• 8946 posts

Posted 24 May 2005 - 11:39 AM

He speaketh! And of course on Katabak! What post did you delete to stay at 1111, Turtle?

By the way I have been working on a generalized function to compute K, but I got hung up trying to do it in Python, which I have not quite mastered yet, and I'm trying to get it to handle all bases up to base 60 (why not more? Mesopotamian numerology and the fact that a-z, A-Z and 0-9 as digits gets me up to base 62 at most...).

Watch this space, but it may take a while cuz I've got too much else on the front burner...

Crunching numbers,
Buffy
• Turtle likes this

### #20 Buffy

Buffy

Resident Slayer

• 8946 posts

Posted 27 May 2005 - 12:15 PM

If I get bored during the double header on Sunday (Indy--Go Danica! and CocaCola 600--Go Junior and Michael!), I may work on it....

Be careful to pace yourself this weekend. I don't want to have to be waving my wand and saying "Drizzle, Drazzle, Druzzle, Drome, time for this one to come home!"...

Cheers,
Buffy

### #21 Buffy

Buffy

Resident Slayer

• 8946 posts

Posted 01 June 2005 - 10:10 PM

___Now I have little association with other programmers or their techniques, but I designed my little program around first converting an input number (base ten) into a string. Once in string form, I chop it up & then use the appropriate subtractions to determine place values for the desired output base.

I'm doing it with strings too, partly because the logic is *much* easier given what the Katabatak function does and especially if you're going to do multiple bases, but also because we've got way to much horsepower these days...

Cheers,
Buffy

### #22 CraigD

CraigD

Creating

• 8034 posts

Posted 02 July 2005 - 03:36 PM

I’m a latecomer to this thread/spelunking expedition, but being something of ancient math mariner, find it very homey. In fact, it reminds me of a dusty corner of my own garage of discrete math, where it seems a lifetime ago I scrawled something about “the numerology function” being congruent to n modulo (base-1).

I’m also a member of the improbable intersection of the set of math hobbyists and M programmers. Anybody in this thread is by definition a math hobbyists, but most M programmers are database crunchers, usually in the context of medicine, pharm chemistry, or finance/banking. It’s a pity, I think, that the M and Math so rarely play together, since M is a very nice, terse, interpreted language with which to play with numbers. For example, a one-line program to calculate K(n) in base b is:

s k=n f q:k<b s x=k,k=0 f q:'x s k=x#b+n,x=xb ;returns k given n & b

(In M, keywords can be abbreviated, usually with a single letter. In the above, s=SET, the assignment command, f=FOR, M’s only looping command, and q=QUIT, its only loop terminating command. Most of the operators are familiar, except ‘=does NOT evaluate to 0, #=MODULO, and =integer DIVISION. ;=rest of line is a comment. A free, never-expires implementation of M, known as Cache, can be had at http://titanium.inte...p=cachedownload, though you must give the vender an email address to get it. Install, start, and open its “terminal” app, and you can do everything I describe.)

Here’s one to display the K=patterns of the powers in base 10:

s b=10 f e=2:1:15 w !,e f n=1:1:b-1 w " ",n**e#(b-1)

Its output:

2 1 4 0 7 7 0 4 1 0
3 1 8 0 1 8 0 1 8 0
4 1 7 0 4 4 0 7 1 0
5 1 5 0 7 2 0 4 8 0
6 1 1 0 1 1 0 1 1 0
7 1 2 0 4 5 0 7 8 0
8 1 4 0 7 7 0 4 1 0
9 1 8 0 1 8 0 1 8 0
10 1 7 0 4 4 0 7 1 0
11 1 5 0 7 2 0 4 8 0
12 1 1 0 1 1 0 1 1 0
13 1 2 0 4 5 0 7 8 0
14 1 4 0 7 7 0 4 1 0
15 1 8 0 1 8 0 1 8 0

Notice the familiar “1 4 0 7 7 0 4 1 0” for the pattern of squares, except that, since the modulo-9 function being used in place of K(), “0”s appear in place of “9”.

This brings me up to post #27, where it’s revealed that the pattern for each power in base 10 repeats every 6 powers – that is the one for n^2 is the same as n^8, n^e the same as n^(e+6).

I wonder if this “6” rule depends on the base?

s b=4 f e=2:1:6 w !,e f n=1:1:b-1 w " ",n**e#(b-1)

Shows:

2 1 1 0
3 1 2 0
4 1 1 0
5 1 2 0
6 1 1 0

Yup. For base 4, it becomes the “2” rule.

I wonder if there’s some obvious pattern relating “the modularity (divisor) of the K pattern of powers” to the base? A 2-line program, this time:

k y f b=3:1:84 w b," " x "k x f e=2:1 x ""s a="""""""" f n=1:1:b x """"s v=n f i=2:1:e s v=v*n#(b-1)"""" s a=a_"""" """"_v"" s i=$g(x(a)) q:i s x(a)=e" w e-i,! s y(e-i,="" ;builds sparse array y(modularity,base) - I had to limit myself to base 84, since this simple program is limited by the M implementation's maximum subscript length s (i,j)="" f s i=$o(y(i)) q:'$l(i) w !,i," " f s j=$o(y(i,j)) q:'\$l(j) w " ",j ;output’s it

Outputs (the first number in each row is the modularity of the K pattern for the bases that follow):

1 3
2 4 5 7 9 13 25
4 6 11 16 17 21 31 41 49 61 81
6 8 10 15 19 22 29 37 43 57 64 73 85
8 33
10 12 23 34 45 67
12 14 27 36 40 46 53 66 71 79
16 18 35 52 65 69 86
18 20 28 39 55 58 77
20 26 51 56 76
22 24 47 70
28 30 59 88
30 32 63 78
36 38 75
40 42 83
42 44 50 87
46 48
52 54
54 82
58 60
60 62
66 68
70 72
72 74
78 80
82 84

Well, we have the familiar modularity of 6 for base 10 and 2 for base 2, but otherwise, this ancient mariner is mystified.
What’s the pattern for the sequence of bases “8 10 15 19 22 29 37 43 57 64 73 85”?
Each modularity M appears to apply to base M+2, but how to predict which modularities exist?

Will any Hypographographer show charity to me, and explain this mystery of modular arithmetic?

### #23 CraigD

CraigD

Creating

• 8034 posts

Posted 02 July 2005 - 11:42 PM

___In the first line quoted above, I think the phrase "2 for base 2" is in error; the base two pattern of poweers is length one & "modularity" of one.

You’re correct. It should have read “2 for base 4”

___Did you coin the term "modularity"?

Yes. The conventional term for the 2nd operand of the modulo operator is “divisor”, but I thought it was confusing.

I don't quite follow which "pattern" for the sequence of bases “8 10 15 19 22 29 37 43 57 64 73 85”?

I mean that the K pattern for n^m is the same as the one for n^(m+ in base 8, base 10, base 15, etc. For base 6, 11, 16, etc, KPattern(n^m)= KPattern(n^(m+4))

There doesn’t appear to be a base system where KPattern(n^m)= KPattern(n^(m+d)) for d=3, 5, 7, 9, 11, 13, 15, 19, 21, 23-27, 29, 31-25, etc. I believe this is due to something like the sieve of Eratosthenese (these pops up a lot in number theory), but haven’t dug into the details, yet.

Among the bases up to 84, and modularities up to 82, several stand out.
The modularities 8, 20, and 54 violate my claim that “Each modularity M appears to apply to base M+2”
Modularity 8 base 33 stand out especially. Unlike the other bases, where only the sequence for n^2 is unique, the sequence for n^2, n^3, and n^4 are unique in base 33.

Since chances are slim that the number theory cavalry will appear in time to give me the charity I begged, It seems I’ll be hooked on/lost in the caves of Katabatak Math for a while. I can’t resist playing with modular arithmetic. Like every ancient mariner, I’m on a doomed voyage, and have an albatross around my neck. In my case, the voyage is in search of an easy way to prime factor integers, and the albatross is my suspicion that there’s a way to determine the factors of the sum of 2 numbers (N), given their factorizations, in less than N/log(N) time. It’s an wild trip, with many treasures found and to be found, and some interesting wildlife (turtles, etc.).

### #24 CraigD

CraigD

Creating

• 8034 posts

Posted 05 July 2005 - 01:45 PM

... in base 29 the pattern of n^2 is identical to n^8, n^14, n^20 etc. EXCEPT for one element, 17^2. Likewise the pattern for n^3 is identical save for 17^3.

I don’t find this strangeness. My arithmetic shows 17^2 mod 28 = 17^8 mod 28 = 17^(6*X+2) mode 28 = 9, and 17^3 mod 28 = 17^(6*x+3) = 13 for all the nonnegative values of X I tried.

My quick & dirty checking M code:
s e=3,n=17 f e=e:6 s a=n x "f i=2:1:e s a=a*n#28" w " ",a

I'll try de-mystifying this fundamentally – that is, account for it as a property of sets of modular numbers under exponentiation. My playtime will be in short supply ‘til next weekend, though, so this may be a while in coming.

PS: I recoded to avoid the limitation that was limiting me to bases up to 88, and produced the “pattern modularity to base” map up to about base 500, where my program became impractically slow.

Some of the missing modularities appeared in higher bases, and modularity 8 is revealed to no longer be unique to base 33. I suspect that continuing to look at higher bases would banish all of the missing and unique modularities (except 1).

Here it is:
1: 3
2: 4 5 7 9 13 25
4: 6 11 16 17 21 31 41 49 61 81 121 241
6: 8 10 15 19 22 29 37 43 57 64 73 85 127 169 253 505
8: 33 97 161 481
10: 12 23 34 45 67 89 133 265
12: 14 27 36 40 46 53 66 71 79 91 92 105 106 113 118 131 141 145 157 181 183 196 209 211 235 261 274 281 313 316 337 361 365 391 421 456 469
16: 18 35 52 65 69 86 103 137 171 193 205 256 273 321 341 409
18: 20 28 39 55 58 77 109 115 134 153 172 190 217 229 267 343 379 400 457
20: 26 51 56 76 101 111 151 166 177 201 221 276 301 331 401 441
22: 24 47 70 93 139 185 277
24: 225 289 417
28: 30 59 88 117 146 175 233 291 349 436 465
30: 32 63 78 94 100 125 155 187 199 218 232 249 280 309 342 373 397 435 463
32: 129 385
36: 38 75 96 112 136 149 186 191 223 248 260 271 286 297 305 334 352 371 381 433 445 482 495
40: 42 83 124 165 206 247 329 353 411 452 493
42: 44 50 87 99 130 148 173 197 259 295 302 345 388 393 442
44: 116 231 346 369 461
46: 48 95 142 189 283 377
48: 120 154 222 239 307 358 443 449 477
52: 54 107 160 213 266 319 425
54: 82 163 325
58: 60 119 178 237 355 473
60: 62 123 144 156 176 184 226 245 287 306 311 326 351 367 386 404 428 430 451 466 489 496 497
64: 257
66: 68 135 162 202 208 269 323 403 415 470 484
70: 72 143 214 285 427
72: 74 147 220 293 366 439
78: 80 159 238 317 475
80: 188 375 426
82: 84 167 250 333 499
84: 204 216 246 262 378 407 431 491
88: 90 179 268 357 446
90: 210 298 419
92: 236 471
96: 98 195 292 389 486

### #25 CraigD

CraigD

Creating

• 8034 posts

Posted 19 August 2005 - 08:25 AM

... n^8 {1 6 1 6 5 6 1 6 1 0}
... do you see how the table is generated? ...

Looks like n^m modulo 10 to me.

The first clue is that unknown_function(10^m) = 0, just as with 10^m modulo 10.

I really must catch up with your posts in this thread – Between my own numeric obsessions and job demands, I’ve just not had the minutes in the day. I’m not even keeping up with thread’s I started - I’ve a number of interesting observations in the “generating primes without division” vein, but have neglected to post any to this thread!

Need longer days!!

### #26 CraigD

CraigD

Creating

• 8034 posts

Posted 20 August 2005 - 10:37 AM

___You have stood me on my head CraigD; again. I knew asking this time before saying might pop something up. To whit, I made the list by taking the last digit of each bast ten power; I did not see a single tree for the forest. It is non-trivialy trivial (or visa versa) that the last digit of any power written in base b notation is n^m modulo b.

There is indeed a strong connection between how modern (sometime after 400BC to 400AD in India, shortly after in Persia, but not ‘til around the time of Fibonacci ca. 1200AD in the Europe) people represent numbers, and modular arithmetic – the modern “Arabic” positional number representation of a counting (Natural) number is actually an arrays/lists/string of modular numbers of the form {n modulo b^m, n modulo b^(m-1),… n modulo b^0}

The difference between the representation of a number and the number itself is philosophically profound, especially for people like me (and more obscure folk like Kurt Godel and Doug Hofstadter ) who embrace the idea of formalism as the proposition that all Math can be described as a collection of rules for manipulating the representation of numbers and arithmetic operations on them. This particular rabbit hole is very deep, so by your leave, I’ll step back from it now.

___So how does this reflect perhaps CraigD on your list in post #89? I went there to see the tree for myself.

1: 3
2: 4 5 7 9 13 25
4: 6 11 16 17 21 31 41 49 61 81 121 241
6: 8 10 15 19 22 29 37 43 57 64 73 85 127 169 253 505
8: 33 97 161 481...

___I bolded the entries, modularity 4, base eleven, & also modularity 6 base ten. Does this draw our attention to the trees of mystery here? Don't think I know, just think I think.

I don’t believe there’s a strong connection between my 2 posts. The table in post #89 seems to result is some fashion I’ve yet to fathom from the Prime Number Theorem, where #114 and this one have more to do with the systems for representing numbers.

I’m failing to follow the significance of the bolded numbers in your post. Can you explain, please?

### #27 IrishEyes

IrishEyes

Reminiscing

• Members
• 2710 posts

Posted 25 October 2005 - 09:04 PM

I know this is off-topic, but I just wanted to say... *( in light of Turtle's current post count)*

"My Turtle, what beautiful numbers you have..."

I'm wondering how long it will take you to respond. I'm a bit torn on what I want. On the one hand, it would be such a shame to mess with such a beautiful sequence of 2's. On the other hand, I really don't want for you to be absent from posting in order not to mess up your pretty numbers. In any case, I really think you ought to get some schtuff fer hangin' out at such a kewl spot (even though yer hidin the greenie squares from the rest of us!), so here's to you, Turtle George!!

### #28 Dark Mind

Dark Mind

Resident White Hat

• Members
• 2404 posts

Posted 25 October 2005 - 09:12 PM

I wonder if he's waiting for me to join him... It was my initial proposal of wanting to get there and see how long I could keep it there that I think made him to decide to reside at this position for so long. Am I right, Turtle?

As for hiding his rep boxes... did he make it to 11 finally?

Thinking

• Members
• 15 posts

Posted 02 November 2005 - 01:11 PM

I think I need some java...aaaggghhh

Yes, I am trying to follow you but could you let me know if I get a little glazed.

Thinking

• Members
• 15 posts

Posted 06 November 2005 - 12:57 PM

Rather peculiar but I say that alot and the people who know me look at me and are surprised I think it odd...synchronicity seems to rear its head alot in my cube.

As you have pointed out...they abound for some and without trying to. Last year at this time I had a triangle flyover-SILENTLY right overhead-it materialised, then de-materialised then re materialised and de-materialised for good. I sensed something overhead and had taken my old dog out for a break. It was 333am and I was standing next to a 3 story apartment building...I have never seen anything like it and I have been to many air shows and military ones, it was not a stealth. I am familiar with TR-38 and it did not sound like that nor act like I have seen on videotapes. I do not think it was government...and the thoughts that went through my head...well, fodder for another thread...

The 333 or 3333 or 3:33 33 has occurred alot for me as well-I look at it as a blessing...certain combinations occur more often than others, but I have alot of 3's that surround me often...

Take care Turtle

Namaste

### #31 infamous

infamous

Visions of grandeur

• Members
• 3962 posts

Posted 09 December 2005 - 05:36 PM

As you see already this junket is not what it seems.
Addendum interludinally: A six fold path is rooted in powers of seven.

http://hypography.co....c=3&userid=796

&

http://hypography.co...&c=3&userid=796

Temporary cargo storage; do not open:
http://www.its.calte...class/class.htm

I just love the way the snow flake seems to demonstrate it's desire to search out the six degrees of freedom...................cool................Infy

### #32 Queso

Queso

Synesthetic

• Members
• 7281 posts

Posted 11 January 2006 - 02:33 AM

i hope this is the appropriate place to tell you that i discovered your key,
and now all of your artwork makes sense to me.

Purely in the artistic sense, my brain is not nearly trained enough to really hear what you are trying to say with all of those dynamic colors, lines, and shapes.

The basics are where im at, trailing along your trail, turtle.

### #33 Queso

Queso

Synesthetic

• Members
• 7281 posts

Posted 11 January 2006 - 02:35 AM

oh and p.s. do you ever use Prismacolors for your drawings?

Theyre amazingly vibrant for being in pencil form,
also expensive.
almost 2 bucks a pencil!!
I consider art tools of this manner free, but thats just me and off topic.

### #34 TheBigDog

TheBigDog

Doing the Impossible

• Members
• 4095 posts

Posted 18 January 2006 - 07:17 PM

I am writing this offline as I sit in a waiting room…

Excuse me Mr. Turtle. I have been quietly following your guided tour through this digitized cavern. And as you speak of number patterns I am reminded of a pattern I have kept in my pocket for some 25 years. It is a collection of right triangles. Specifically, integer right triangles. I am curious about them, and am wondering if this cave might tell us more about their nature.

I remember when I first found them while sitting in a math class in the 6th grade. We were learning about the Pythagorean Theorem. I was quickly struck by a repeating pattern in the triangles that populated our tests and instructions.

We all know that the theorem is a^2 + b^2 = c^2 where c is the hypotenuse of the triangle. Common right triangles are 3x4x5, 6x8x10, 8x15x17, 5x12x13.

In my obsession over patterns it struck me that every odd number was the short side of a unique integer right triangle. Thus 3x4x5, 5x12x13, 7x24x25, 9x40x41.

Upon closer examination you see that the second two legs equal the square of the first leg. Thus the three legs of an integer right triangle can be expressed as a^2 = b + c where c = b + 1 and a is odd. Spotting this shortcut saved me tons of really complicated mathematics because teachers love problems with whole numbers for the answers.

This worked fine for me for a few weeks, but I was bothered by the 8x15x17 triangle. But I was to be rescued by algebra. Once that door was opened to my growing mind I soon deducted the true formula for integer right triangles was a^2 = 2b + 1, where a is a positive integer greater than 1. There is a slight modification for even numbers, that you must multiply all three values by 2 to find the integer triangle. So…

2 = 2x1.5x2.5 doubled = 4,3,5
3 = 3x4x5
4 = 4x7.5x8.5 doubled = 8x15x17
5 = 5x12x13
6 = 6x17.5x18.5 doubled = 12x35x37
7 = 7x24x25
8 = 8x31.5x32.5 doubled = 16x63x65
9 = 9x40x41
10 = 10x49.5x50.5 doubled = 20x99x101
11 = 11x60x61
12 = 12x71.5x72 doubled = 24x143x145

One of the other patters that I found is the increment from one root triangle to the next. The a leg always increases by 1, while the b and c legs increase by average of the consecutive a legs.
2 to 3 = +2.5
3 to 4 = +3.5
4 to 5 = +4.5
5 to 6 = +5.5

I guess the formula works beginning with 0, with the first integer right triangle resulting as 0x0x0. The next is 1x0x1. While these are technically not triangles, they fit in with the progression of the sums of the sides. Note that each sum of sides is 2 * a bigger than the previous sum of sides.
0 + 0 + 0 = 0 = 0 + (2 * 0)
1 + 0 + 1 = 2 = 0 + (2 * 1)
2 + 1.5 + 2.5 = 6 = 2 + (2 * 2)
3 + 4 + 5 = 12 = 6 + (2 * 3)
4 + 7.5 + 8.5 = 20 = 12 + (2 * 4)
5 + 12 + 13 = 30 = 20 + (2 * 5)

When I apply the k(n) to the sum of the sides of the base triangles in the formula I get a repeating series of numbers!
2,6,3,2,3,6,2,9,9 This repeats over and over on the sums of the sides of the triangles. When you double all the triangles the pattern is still there, just the 2’s turn into 4’s.

When you double the even number triangles to deal just with the sum of the sides of smallest unique integer right triangles you get the same four numbers in a new longer pattern. 2,3,3,4,3,3,2,9,9,4,6,6,2,6,6,4,9,9. When you apply different multiples to the triangles, the effect is that the overall pattern is modified in an interesting fashion. The nines never change. The 3s and 6s flip flop, but stay in two pairs on either side of the string, and the 2 and 4 become various other pairs of numbers, but retain the same positions and pattern. 5x minimum integer triangles = 1,6,6,2,6,6,1,9,9,2,3,3,1,3,3,2,9,9. 7x = 5,3,3,1,3,3,5,9,9,1,6,6,5,6,6,1,9,9 I wonder what the pattern is if I sequence through the multiples and just look at the two numbers that change. So far those pairs always k(n) to 3 or 6, I wonder if that holds up, and what the larger sequence looks like?

Will we find anything of interest about these numbers in this cave?
Are all integer right triangles found by this formula?

Ah… my wait is over. When I get home I will post this.

Thanks for letting me comoe along Turtle!

Bill