frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Collatz's Ant

https://gbragafibra.github.io/2025/01/08/collatz_ant2.html
102•Fibra•10mo ago

Comments

keepamovin•10mo ago
I love that people are working on this. It's inspiring. Thank you for posting. It's interesting if you post a comment about your process, purpose or idea - and maybe a link to code, etc (even tho it's all linked in the post, HN likes comments & discussion)
pvg•10mo ago
The previous piece previous thread https://news.ycombinator.com/item?id=42479375
cdaringe•10mo ago
I didnt know what i was getting into but i loved it
berlinbrowndev•10mo ago
I love cellular automata projects like this.
1024core•10mo ago
Now if someone could figure out a link between this and Conway's Game of Life...
lapetitejort•10mo ago
I've been fiddling with the Collatz Conjecture off and on for years now. I'm convinced I found a pattern that I haven't been able to find mentioned anywhere. Granted, that could be because I lack the mathematical language needed to search for it.

First, I'm going to use an implicit even step after the odd step, as 3*odd + 1 always equals even. If you look at the path a number takes to its next lowest number, for example 5->8->4, visualize it by just looking at the even and odd steps like so: 5->10, you will see that other numbers follow a similar pattern:

9->10

13->10

17->10

What do these number have in common? They follow the pattern 5 + k(2^n) where n is the number of even steps (with the implicit even step, two in this case).

For another example, look at 7:

7->1110100

Seven even steps, so the next number will be 7 + 2^7 = 135:

135->1110100

I'd love to hear if this has been found and documented somewhere. If not, I have additional ramblings to share.

InfoSecErik•10mo ago
I too have been playing with the conjecture for fun. Your insight is interesting because of the appearance of 2^n, given that that always resolves to 1 for all n.
lapetitejort•10mo ago
I ran some calculations looking to see if there were patterns to the next lowest number (call that number x) and could not quickly find any. So even if 7 + k*2^n follows a predicable path to its next lowest number, that number is not currently predictable.

Of course, if you can identify which n satisfies the equation x = s + k*2^n for some value of n and some "base" value s (7 is the base value in the previous example), you can predict the path of that number.

As an example, take 7 + 4*2*7 = 519. Its next lowest number is 329. 329 = 5 + 81*2^2. So for 329, s=5, k=81, n=2. So we know 329 will only take two steps to reach 247.

kr99x•10mo ago
In my phrasing, 128k + 7 -> 81k + 5 for all positive integers k.

Pick a power of 3 n to be the coefficient for k on the right/reduced side, and then the left side will have at least one valid reducing form with coefficient power of 2 f(n) = ⌊n·log2(3)⌋+1. If there is more than one, they will have different constants. Each multiplication immediately has a division (you already got this part), and there must be a final division which is not immediately preceded by a multiplication because (3x + 1)/2 > x for all positive integers (that is, if you multiply once and then divide once, you will always be larger than just before those two things, so an "extra" division is needed to reduce). This means that there must always be at least one less multiplication than division, so the initial condition is one division and zero multiplications - the even case with n = 0. Then for n = 1 you need 2 divisions, which works because 2^2 > 3^1. Then for n = 2 you need 4 divisions, because 2^3 < 3^2 so 3 divisions is not enough. This is where f(n) comes in, to give you the next power of 2 to use/division count for a given n. When you do skip a power of 2, where f(n) jumps, you get an "extra" division, so at 16k + 3 -> 9k + 2 you are no longer "locked in" to only the one form, because there is now an "extra" division which could occur at any point in the sequence...

Except it can't, because you can't begin a reducing sequence with the complete form of a prior reducing sequence, or else it would "already reduce" before you finish operating on it, and it so happens that there's only one non-repeating option at n=2.

At n = 0, you just get D (division). At n = 1, you have an unsplittable M (multiply) D pair MD and an extra D. The extra D has to go at the end, so your only option is MDD. At n = 2, you appear to have three options for arranging your MD MD D and D: DMDMDD, MDDMDD, and MDMDDD. But DMDMDD starts with D so isn't valid, and MDDMDD starts with MDD so also isn't valid, leaving just MDMDDD.

At n = 3 there are finally 2 valid forms, 32k + 11 -> 27k + 10 and 32k + 23 -> 27k + 20, and you can trace the MD patterns yourself if you like by following from the k = 0 case.

The constants don't even actually matter to the approach. If there are enough 2^x k - > 3^y k forms when n goes off to infinity, which it sure looks like there are though I never proved my infinite sum converged, you have density 1 (which isn't enough to prove all numbers reduce) and this angle can't do any better.

gregschlom•10mo ago
You lost me here: "visualize it by just looking at the even and odd steps like so: 5->10"

Where does the 10 come from?

skulk•10mo ago
5 is odd, so that's where the 1 comes from

8 ((5*3+1)/2) is even, so that's where the 0 comes from

4 (8/2) is the end.

lapetitejort•10mo ago
That is correct. I use pseudo-binary to represent the steps the number takes. Simply counting the number of steps is enough to get n, as all steps will have an implicit or explicit even step.
kr99x•10mo ago
I've been down that road, and it's unfortunately a dead end. You can generate an infinite number of reducing forms, each of which itself covers an infinite number of integers, like 4k + 5 → 3k + 4. Each one covers a fraction of the integers 1/(2^x) where x is the number of division steps in its reducing sequence (and the right hand side is always 3^y where y is the number of multiplying steps). You can't just make 1/2 + 1/4 + 1/8 and so on though (the easy path to full coverage) because sometimes the power of 3 overwhelms the power of 2. There is no 8k → 9k form, because that's not a reduction for all k, so you instead have to go with 16k → 9k. This leaves a "gap" in the coverage, 1/2 + 1/4 + 1/16th. Fortunately, when this happens, you start to be able to make multiple classes for the same x and y pair and "catch up" some, though slower. As an amateur I wrote a whole bunch about this only to eventually discover it doesn't matter - even if you reach 1/1th of the integers by generating these classes out to infinity, it doesn't work. An infinite set of density 1 implies a complementary set of density 0, but a set of density 0 doesn't have to be empty! There can still be finitely many non-reducing numbers which are not in any class, allowing for alternate cycles - you would only eliminate infinite growth as a disproof option.

Mind you, it's almost certain Collatz is true (generating these classes out to 3^20 nets you just over 99% coverage, and by 3^255 you get 99.9999999%) but this approach doesn't work to PROVE it.

prezjordan•10mo ago
Potentially useful to you: https://en.wikipedia.org/wiki/Collatz_conjecture#As_a_parity...
genewitch•10mo ago
If you search sequentially, or start from the highest known failed number, you can also short circuit every even number you start on, as well as any number that goes below the start number. My code it requires copies of huge numbers, but I barely understand why the conjecture is special.

Anyhow I wrote a single-threaded collatz "benchmark" that does this using bigint and its hilarious to run it up around 127 bit numbers, inlet it run for 3 or 4 days and it never finished the first number it was given.

My github has a Java and Python version that should produce identical output. Collatz-gene or so.

standardly•10mo ago
The conjecture holds up through 2^68. Can't we just call it there? Lol I'm obviously being obtuse, but really is there some reason to think there would be an exception at sufficiently large integers? It's hard to even imagine that one wouldn't.

edit: I'm in way over my head. Disregard me :)

WhitneyLand•10mo ago
It’s a fair question. Two things:

1. It does happen. These conjectures can fall apart after seeming like a lock: https://en.m.wikipedia.org/wiki/Mertens_conjecture

2. Even if it is true, the process of proving can yield interesting insights.

standardly•10mo ago
That's pretty mind-blowing. Hey thanks for replying. Mathematics is a tough subject to take interest in as a layman, but I still enjoy it for some reason.

Anthropic Cowork feature creates 10GB VM bundle on macOS without warning

https://github.com/anthropics/claude-code/issues/22543
166•mystcb•1h ago•60 comments

Motorola announces a partnership with GrapheneOS Foundation

https://motorolanews.com/motorola-three-new-b2b-solutions-at-mwc-2026/
1325•km•9h ago•450 comments

Judge finalizes order for Greenpeace to pay $345M in ND oil pipeline case

https://northdakotamonitor.com/2026/02/27/judge-finalizes-order-for-greenpeace-to-pay-345-million...
70•gmays•1h ago•22 comments

/e/OS is a complete "deGoogled", mobile ecosystem

https://e.foundation/e-os/
460•doener•7h ago•257 comments

First-ever in-utero stem cell therapy for fetal spina bifida repair is safe

https://health.ucdavis.edu/news/headlines/first-ever-in-utero-stem-cell-therapy-for-fetal-spina-b...
31•gmays•1h ago•1 comments

Notes on Lagrange Interpolating Polynomials

https://eli.thegreenplace.net/2026/notes-on-lagrange-interpolating-polynomials/
5•ibobev•13m ago•0 comments

AMD Am386 released March 2, 1991

https://dfarq.homeip.net/amd-am386-released-march-2-1991/
50•jnord•3h ago•9 comments

An Interesting Find: STM32 RDP1 Decryptor

https://carlossless.io/stm32-rdp1-decryptor/
43•carlossless•2h ago•5 comments

OpenClaw Surpasses React to Become the Most-Starred Software Project on GitHub

https://www.star-history.com/blog/openclaw-surpasses-react-most-starred-software
140•whit537•2h ago•132 comments

Inside the M4 Apple Neural Engine, Part 1: Reverse Engineering

https://maderix.substack.com/p/inside-the-m4-apple-neural-engine
84•zdw•23h ago•21 comments

How to talk to anyone and why you should

https://www.theguardian.com/lifeandstyle/2026/feb/24/stranger-secret-how-to-talk-to-anyone-why-yo...
312•Looky1173•8h ago•413 comments

Use the Mikado Method to do safe changes in a complex codebase

https://understandlegacycode.com/blog/a-process-to-do-safe-changes-in-a-complex-codebase/
34•foenix•4d ago•14 comments

Why Objective-C

https://inessential.com/2026/02/27/why-objective-c.html
27•ingve•2d ago•9 comments

Microsoft bans the word "Microslop" on its Discord, then locks the server

https://www.windowslatest.com/2026/03/02/microsoft-gets-tired-of-microslop-bans-the-word-on-its-d...
598•robtherobber•5h ago•226 comments

Making Video Games in 2025 (without an engine)

https://www.noelberry.ca/posts/making_games_in_2025/
296•alvivar•3d ago•136 comments

Apple introduces the new iPad Air, powered by M4

https://www.apple.com/newsroom/2026/03/apple-introduces-the-new-ipad-air-powered-by-m4/
88•Garbage•2h ago•87 comments

Show HN: Omni – Open-source workplace search and chat, built on Postgres

https://github.com/getomnico/omni
107•prvnsmpth•7h ago•29 comments

If AI writes code, should the session be part of the commit?

https://github.com/mandel-macaque/memento
393•mandel_x•15h ago•337 comments

Parallel coding agents with tmux and Markdown specs

https://schipper.ai/posts/parallel-coding-agents/
4•schipperai•1h ago•0 comments

Jolla phone – a full-stack European alternative

https://commerce.jolla.com/products/jolla-phone-sept-26
334•spinningslate•5h ago•136 comments

Mondrian Entered the Public Domain. The Estate Disagrees

https://copyrightlately.com/mondrian-public-domain-controversy/
118•Tomte•3d ago•53 comments

U.S. science agency moves to restrict foreign scientists from its labs

https://www.science.org/content/article/nist-moves-restrict-foreign-scientists-its-labs
258•JeanKage•6h ago•205 comments

A bit of fluid mechanics from scratch not from scratch

https://tsvibt.blogspot.com/2026/02/a-bit-of-fluid-mechanics-from-scratch.html
5•surprisetalk•1h ago•0 comments

Show HN: Web Audio Studio – A Visual Debugger for Web Audio API Graphs

https://webaudio.studio/
30•alexgriss•4h ago•2 comments

Plastic is made from milk and it vanishes in 13 weeks

https://www.sciencedaily.com/releases/2026/02/260227071922.htm
32•JeanKage•1h ago•15 comments

Neocaml – Rubocop Creator's New OCaml Mode for Emacs

https://github.com/bbatsov/neocaml
64•TheWiggles•2d ago•10 comments

Go-Native Durable Execution

https://www.dbos.dev/blog/how-we-built-golang-native-durable-execution
42•hmaxdml•4d ago•8 comments

Computer-generated dream world: Virtual reality for a 286 processor

https://deadlime.hu/en/2026/02/22/computer-generated-dream-world/
133•MBCook•11h ago•25 comments

An interactive intro to Elliptic Curve Cryptography

https://growingswe.com/blog/elliptic-curve-cryptography
98•vismit2000•10h ago•15 comments

How to record and retrieve anything you've ever had to look up twice

https://ellanew.com/2026/03/02/ptpl-197-record-retrieve-from-a-personal-knowledgebase
125•Curiositry•11h ago•39 comments