## OEIS Twitterbot based on Raspberry Pi

I was actively finding fascinating afternoon-projects (as defibrillators) since the beginning of this semester, until I came across the @MoMARobot on twitter. This is a script robot spidering artworks from https://www.moma.org/  and then post them to twitter on a 6-hour basis. With the tasty Raspberry Pi 3 in my hand, I felt the urge to create my own twitter bot (on my own desk!) posting random entries from my all-time favorite website: https://oeis.org/.

## The Online Encyclopedia of Integer Sequences

OEIS is an online database of integer sequences, e.g. A000796: {3, 1, 4, 1, 5, 9, 2,...}. The main purpose is to allow mathematicians or other scientists to find out if some sequence that turns up in their research has ever been seen before. Despite the fact that my love of this site is kind of an inner geek thing, it does generate a huge amount of interesting academical uses https://oeis.org/wiki/Works_Citing_OEIS.

Ever wondered the number of distinct $n$ -carbon alkanes? No problem. Just use your high school chemistry to brutal force it for small $n$ 's and dump it to OEIS, it will return you

A000602: Number of n-node unrooted quartic trees; number of n-carbon alkanes C(n)H(2n+2) ignoring stereoisomers.

1, 1, 1, 1, 2, 3, 5, 9, 18, 35, 75, 159, 355, 802, 1858, 4347, 10359, 24894, 60523, 148284, 366319, 910726, 2278658, 5731580, 14490245, 36797588, 93839412, 240215803, 617105614, 1590507121, 4111846763, 10660307791, 27711253769

Look at it. It's just beautiful! Cannot wait to have an hourly feed of it on twitter.

Another good news I forgot to mention is OEIS offers json data interchanging now! Do

url = "https://oeis.org/search?q="+ name +"&fmt=json"
j = requests.get(url).json()

you will get everything about a sequence!

As every major social network, twitter offers well designed APIs for status updating. Since I am a science student who cannot code properly :^, I use python package tweepy. This package contains various utilities you need to deploy a twitterbot. Simply authenticate by

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)

and post using the api handle by

api.update_status(status = text)

Here the consumer_key, consumer_secret, access_token and access_token_secret can be obtained from the application page of you twitter account.

## Schedule a Periodic Task on Raspberry Pi

Although we have got all the ingredients needed for tweeting one post, a while True loop relentlessly tweeting posts will blacklist your IP on the twitter side. However, on unix-like systems, one can schedule periodic tasks using cron. To add a cron task, execute

pi@raspberrypi:~ $crontab -e then use your favorite text editor to add one new line in the file 0 * * * * \abs\path\to\your\python \abs\path\to\your\twitterbot.py args The 0 * * * * here is the cron schedule expression standing for "every hour at 0 minute". You can get assistance setting this up for your need at https://crontab.guru/. ## Enjoy the Twitterbot Yummy! The Raspberry Pi is tweeting. Follow my implementation here and get your hourly dose of integer sequences! ## Bachelor's Thesis Bachelor's Dissertation 这是我在Prof. Antonino Marciano指导下完成的毕业论文。这只是整个项目相当不成熟的中期快照。欢迎任何建设性的评论。 This is my Bachelor's thesis supervised by Professor Antonino Marciano, nothing but a very premature intermission of this project. Any constructive criticism is welcomed. ## Notes on Vacuum Decay This is the content I presented at the previous group meeting, and I save it here for the record. Please note that the content in this page is not fixed. The main part of this survey is based on V. Mukhanov's Physical Foundations of Cosmology. # Introduction ## True Vacuum, False Vacuum, Phase Transition A vacuum is a minimum on a potential–state diagram. If the minimum is global, the vacuum is called a true vacuum(stable vacuum), else it is called a false vacuum(meta-stable vacuum). A phase transition is a process that the system change from one vacuum state to another. If the state is discrete, the phase transition is called first order, else it is called continuous phase transition. First order phase transition have latent heat. ## Non-Trivial Vacuum Structure 1. If there exist both a true vacuum and a false vacuum in the potential–state diagram, the vacuum structure is called non-trivial. 2. Not all model of electroweak interaction have the feature of non-trivial vacuum structure. Especially, the Standard Model do not have non-trivial vacuum structure. So the probe of vacuum structure is in a sense a probe of possible physics beyond SM. For instance 3. In Quantum Field Theory considering temperature, the model’s coupling with temperature can also lead to the emergence of non-trivial vacuum structure. For instance ## Importance for Cosmology 1. In the process of the Hot Big Bang Theory, the temperature keeps dropping after the Big Bang. This will lead to the emergence of non-trivial vacuum structure, therefore lead to the spontaneous symmetry breaking. 2. If the phase transition is first order, it will be quite strong and altering the energy-momentum tensor. This serves as a possible source for cosmological GW background. ## What to Calculate about Vacuum Decay 1. One of the most important parameter in many phase transitional gravitational wave model is the nucleation rate β, which represent the tunneling probability Γ from the false vacuum to the true vacuum. 2. The main method we use to calculate the tunneling probability is Saddle Point Approximation or in a sense WKB approximation. 3. The decay is obviously classically forbidden. So the nature of the tunneling is quantum fluctuation (instanton) & thermal fluctuation (sphaleron), so we will begin with a Quantum Mechanics situation and use analogy to go into QFT situation. # Quantum Mechanics Analogy ## Decay via Instanton The tunneling probability can be written using the propagator of quantum mechanics where $S[x(t)]$ is the action of the particle defined by Doing the Wick Rotation $t \to \tau=it$ , we have Where the $S_E[x(\tau)]$ is the Euclidean action while the tunneling probability can be written as Now introduce the saddle point approximation. Since $\hbar$ is small, the main contribution of the integration comes from the extreme value of the Euclidean action $\delta S_E[x(\tau)]=0$ , this lead to the classical motion generated by $S_E[x(\tau)]$ , i.e. particle moving $x_\text{cl}(\tau)$ in a inverted potential $-V(x)$ . This motion is called instanton, the corresponding action is called instanton action. Thus we have Note that we absorb the power 2 into the instanton action and change the instanton motion into a cyclic loop, denoted by $x_\text{cl}^\text{cyc}(\tau)$ . ## Decay via Sphaleron If the system is in a hot bath with temperature $T$ , there is another way to decay from false vacuum to true vacuum beside quantum tunneling, that is thermal fluctuation. This way to decay adds another Boltzmann factor to the total tunnelling probability $\omega(E)$ is the energy distribution in thermal equilibrium. The real interest of us, however, lies in the situation where the temperature$T$is extremely high. In such case, we use saddle point approximation to calculate the dominant contribution. The saddle point of the exponent gives It can be easily shown (leave for Ex.) that Thus the saddle point function gives For extreme high temperature, the period of the instanton is approximately zero. That is the instanton motion localized around the minimum of $-V(x)$ , i.e. the maximum of $\max V(x)=V(x_m)$ . the system's motion $x_\text{cl}(\tau)=x_m$ is called a sphaleron (Greek name for "ready to fall"). Thus the tunneling probability is given by substituting the action in the exponent part ## Summary • For instanton: The tunneling probability of a particle with energy$E\$ is calculated by

where $x_{\text{cl},E}^\text{cyc}(\tau)$ is the periodic instanton motion with Euclidean energy $-E$ generated by inverted potential $-V(x)$ , which changes the potential barrier to a potential well.
• For Sphaleron: At temperature $T$ the tunneling probability is given by

The dominant instanton energy $E$ contribution to the tunneling probability at temperature $T$ is given by

At ultra-high temperature, the tunneling probability is given by

# QFT Correspondence

QFT can be treated as Quantum Mechanics with infinite DOF, so the correspondence is

Thus we can get the corresponding EoM of Instanton and Sphaleron:

## Equation of Motion: Bubble Solution

From the instanton and sphaleron EoM in variation form, one can obtain the EoM in its normal PDE form. If Spherical Symmetric solution is assumed (i.e. bubble solution), then $h=h(r)$

and

• for instanton: $\alpha=3$ , $r$ is the distance in Euclidean space $\mathbb{E}^4$
• for instanton: $\alpha=3$ , $r$ is the distance in Euclidean space $\mathbb{E}^4$

For different potential, one can obtain the numerical solution of the bubble profile and use the previous formula to calculate the tunneling probability. Note that the boundary condition for the ODE is strange: one condition at each side of the solution interval. This kind of ODE should be tackled by using overshoot and undershoot method.

再使用