# Euler problem 12.2

```primes :: [Integer]
primes = 2 : filter (null . tail . primeFactors) [3, 5 ..]

primeFactors :: Integer -> [Integer]
primeFactors n = factor n primes
where
factor n (p : ps)
| p * p > n = [n]
| n `mod` p == 0 = p : factor (n `div` p) (p : ps)
| otherwise = factor n ps

groupFactors :: [Integer] -> [[Integer]]
groupFactors = gf []
where
gf acc lst
| null lst = reverse acc
| null acc = gf [[p,1]] ps
--
--
| otherwise = gf ([p,1]:acc) ps
where
ps = tail lst

nDiv :: Integer -> Integer
nDiv n = product (map ((1+) . head . tail)
(groupFactors (primeFactors n)))

fm :: Integer -> Integer -> Integer
fm m n
| triDiv n > m = n*(n+1) `div` 2
| otherwise = fm m (n+1)
where
triDiv n
| even n = nDiv (n `div` 2)*nDiv (n+1)
| otherwise = nDiv n*nDiv ((n+1) `div` 2)
```

```λ> :set +s
λ> fm 500 1
76576500
(0.20 secs, 199,313,728 bytes)
λ> ```

— Me@2023-05-04 09:51:19 AM

.

.

# Powermaster Optimus Prime

```
18[.]06[.]2003

Diary: [W]hen I teach taught [E]rg maths, I have had new
ideas[. B]ut I have no new ideas in research now.

09[.]07[.]2003

Yesterday, I went to Shatin [T]oys[R][U]s to buy a
[robot] model for brother. But finally, I saw a
[PowerMaster] Opimus [P]rime which I wanted to buy when
I was small.

Consider [whether to buy or not] for several some
moment. [And then bought it.]

[.]

At home, we discovered that the small person-robot had
been stolen.

[So s]uddenly, I gave up my happiness.

Luckily, after playing the robot with brother, instead
of blaming me for not buying a model for him to
construct, he loved the robot. I was very happy too as
I discussed "the Transformers generation one" with him.

```

.

.

# Constructicons, 2

For a combiner transformer, whose mind (of the component robots) is it?

~ Whose mind is a group of people, such as a company?

Not a fixed one, depending on what the consensus of that group (at that time) is, who the speaker (at that time) is, etc.

.

In reverse, one person is also a multi-mind.

— Me@2016-06-16 09:07:46 PM

.

.

# Fall of Cybertron

Transformers: Fall of Cybertron is a third-person shooter video game based on the Transformers franchise, developed by High Moon Studios and published by Activision. It is the sequel to the 2010 video game Transformers: War for Cybertron, and directly follows the events of that game, as the Autobots struggle to defeat their Decepticon foes in a civil war for their home planet of Cybertron.

The game tells the story of the Transformers, fictional robotic life forms, and the final days of conflict on their home planet of Cybertron. An origins subplot for the Dinobots is also told, reimagined from the Transformers: Generation 1 continuity. Other subplots also tell an adapted story for several characters. Some of the voice cast from the 1984 series The Transformers return to reprise their roles, including Peter Cullen as Autobot leader Optimus Prime and Gregg Berger as Grimlock. Other actors return to reprise their roles from Transformers: War for Cybertron.

— Wikipedia on Transformers: Fall of Cybertron

.

.

2022.01.12 Wednesday ACHK

# Spinister

~ 1988 – 1990

The Transformers of this size were sold 37 HKD each at the Watsons near my home. That was much more expensive than an ordinary size one, which costed only around 25 HKD.

One time, mom brought me to ToyRUs. I found that the Transformers there were much cheaper. This one costed only about 29 HKD.

I did not mind buying a Decepticon.

A much more beautiful one was released last year.

— Me@2021-02-25 12:38:38 PM

.

.

# Optimus Prime

— Me@2014-07-04 11:44:42 PM

# Transformers: War for Cybertron

Transformers: War for Cybertron is a third-person shooter video game developed by High Moon Studios and published by Activision.

The game takes place on the planet Cybertron, prior to the Transformers arrival on Earth. The Autobots and Decepticons are engaged in a civil war. The game can be played starting from either faction’s perspective, but begins chronologically with the Decepticon campaign. The game revolves around the use of a substance known as Dark Energon, which the Decepticon leader Megatron believes will allow him to return the planet to what he refers to as a golden age.

— Wikipedia on Transformers: War for Cybertron

2012.05.18 Friday ACHK

# Constructicons

Devastator

The team’s combined form of Devastator is brutality in its purest form — his sole purpose is to destroy anything and everything that gets in his way. It is ironic that the suitably intelligent Constructicons should sacrifice their thinking ability in their combined form, but simple-mindedness is a common limitation of the assorted other first-generation combining Transformers, because Devastator’s thoughts and actions are limited to what his six components can agree upon at any given time. Consequently, Devastator seems like a being of instinct, lashing out at everything around him before contemplating the consequences, but he is also slow and lumbering and very easy to trip up.

— Wikipedia on Constructicons

2012.04.12 Thursday ACHK

Binary-bonding

When connected with each other, the human or Nebulan and the Transformer essentially share a single mind and can work together seamlessly, but when separated from each other, both retain their individual minds and bodies. This allows for greater cooperation, and with twice the experience, a better understanding of possible combat or other dangerous situations. The binary-bonding process does not damage the body of either party, and both parties are able to carry on with their normal lives, but it does generate a permanent, irreversible bond between their minds. However, the Headmaster component can find themselves with increased strength.

The process does have a few weaknesses. Some partnerships on both sides suffer from issues partners have with one another. For example, Vorath is a scientist while his Decepticon partner, Mindwipe is a believer in the supernatural, leading the two to bicker over conflicting ideologies. Also, headless Transformers can be stuck in vehicle mode when the Headmaster component is separated.

— 2011.06.30

2012.04.10 Tuesday ACHK

— Me@2011.05.26

— inspired by Seth Godin

2011.05.26 Thursday ACHK

# Connection between Logic and Programming

Programming is experimental logic.

Programs are logic in action.

Robots are programs in action.

— Me@2010.01.28

.

.

.

$langle langle$變形金剛

.

.

$langle langle$變壓器

.

.

— Me

.

.

.

2009.07.05 Sunday $copyright ACHK$

# 變形金剛

.

.

.

.

.

.

— Me

.

.

.

2009.07.04 Saturday $copyright ACHK$

# Three Laws of Robotics

.

1. A robot may not injure a human being or, through inaction, allow a human being to come to harm.

2. A robot must obey orders given to it by human beings, except where such orders would conflict with the First Law.

3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.

.

— Isaac Asimov

.

.

.

2008.11.25 Tuesday $CHK_2$

# Random walk

Whenever I am bored, I

1. go to Wikipedia;
2. go to the Physics page;