Notes on Number Theory and Discrete Mathematics
Print ISSN 1310–5132, Online ISSN 2367–8275
XXXX, Volume XX, Number X, XXX–XXX
DOI: 10.7546/nntdm.XXXX

Distance between consecutive elements of
the multiplicative group of integers modulo $n$

Steven Brown1

1 41 Boulevard du Roi, 78000 Versailles

e-mail<EMAIL_ADDRESS>
Received: 02 October 2023 Revised: DD Month XXXX
Accepted: DD Month XXXX Online First: DD Month XXXX
Abstract: For a prime number $p$, we consider its primorial $P:=p\\#$ and
$U(P):={\left(\mathbb{Z}/P\mathbb{Z}\right)}^{\times}$ the set of elements of
the multiplicative group of integers modulo $P$ which we represent as points
anticlockwise on a circle of perimeter $P$. These points considered with wrap
around modulo $P$ are those not marked by the Eratosthenes sieve algorithm
applied to all primes less than or equal to $p$.

In this paper, we are concerned with providing formulas to count the number of
gaps of a given even length $D$ in $U(P)$ which we note $K(D,P)$. This work,
presented with different notations is closely related to [4]. We prove the
formulas in three steps. Although only the last step relates to the problem of
gaps in the Eratosthenes sieve (see section 3.2.2 page 3.2.2 ) the previous
formulas may be of interest to study occurrences of defined gaps sequences.

  * •

For a positive integer $n$, we prove a general formula based on the inclusion-
exclusion principle to count the number of occurrences of configurations***A
defined sequence of gaps between the elements of the subset; this is referred
to as a constellation in [4] in any subset of $\mathbb{Z}/n\mathbb{Z}$. (see
equation 7 in theorem 2.1)

  * •

For a a square-free integer $P$, we particularize this formula when the subset
of interest is $U(P)$. (see equation 11 in theorem 3.2)

  * •

For a prime $p$ and its primorial $P:=p\\#$, we particularize the formula
again to study gaps in $U(P)$. Given a positive integer $D$ representing a
distance on the circle, we give formulas to count $K(D,P)$ the number of gaps
of length $D$ between elements of $U(P)$. (see equation 15 and section 4.1)

Keywords: Sieves, Sieve of Eratosthenes, Modular arithmetic, Multiplicative
group of integers modulo, Chinese remainder theorem, Inclusion-exclusion
principle, Euler’s phi function, Nagell’s totient function, Prime numbers,
Jacobsthal function, Primorial.
2020 Mathematics Subject Classification: 11A07, 11A41, 11B99, 11N05, 11N35,
11N99, 03E99.

## Acknowledgement

I would like to thank my wife Natallia for her support and patience and to
thank William Gasarch for his numerous proofreadings of the paper that greatly
improved its readability. Thanks to Martin Raab for giving counterexamples to
some of the conjectures that I initially made and have now been removed.

##  1 Introduction

###  1.1 Notations

This section details some of the notations used in this paper.

  * •

We denote the set of prime numbers by $\mathbb{P}$.

  * •

For a prime number $p$, we write $P:=p\\#$ its primorial which is the product
of all prime numbers less than or equal to $p$.

  * •

For $x\in\mathbb{Z}/n\mathbb{Z}$, we note $r(x)$ the only integer that
represents $x$ in $\\{0,\ldots,n-1\\}$.

  * •

To facilitate reading, for an integer $n$ we write $U(n)$ the set of elements
of the multiplicative group of $\mathbb{Z}/n\mathbb{Z}$.

$U(n):=(\mathbb{Z}/n\mathbb{Z})^{\times}$

  * •

For an integer $n$ and a set of integers $A$ we write $A/n\mathbb{Z}$ the
subset of $\mathbb{Z}/n\mathbb{Z}$ composed of all the elements from $A$ taken
modulo $n$.

$A/n\mathbb{Z}:=\left\\{a\mod n\;\mid\;a\in A\right\\}$

  * •

For an integer $n$ and $A$ and $B$ two subsets of $\mathbb{Z}/n\mathbb{Z}$ we
note

$\displaystyle A+B:=\left\\{a+b\;\mid\;a\in A\;\text{ and }b\in B\right\\}$
$\displaystyle A-B:=\left\\{a-b\;\mid\;a\in A\;\text{ and }b\in B\right\\}$

  * •

For an integer $n$, we write $\mathcal{S}(n)$ and we call support the set of
all its prime divisors.

$\mathcal{S}(n)=\left\\{q\quad|\quad q\in\mathbb{P}\text{ and }q\mid
n\right\\}$

  * •

With a finite set $X$ we note $\mathcal{P}(X)$ the set composed of the
$2^{\textbf{card}\left(X\right)}$ subsets of $X$.

###  1.2 Description of the problem

#####

The objective of this section is to give a short introduction†††This will be
formalized in the following sections. , with some examples, of the problem
that we are trying to resolve. The integer $n$ is considered as being square-
free and most of the time it will be the primorial of a given prime $p$. When
$n$ is not square-free the results presented here may be extended with no
difficulty‡‡‡If $Q$ is is the largest square-free divisor of $n$,
$\mathbb{Z}/n\mathbb{Z}$ can be seen as $\frac{n}{Q}$ repeated occurrences of
$\mathbb{Z}/Q\mathbb{Z}$.

##### Representation

In this paper, we work in $\mathbb{Z}/n\mathbb{Z}$ and we represent its
elements counterclockwise on a circle of circumference $n$. Let $p=5$ and
$P=5\\#=30$ then

$U(P)=\left\\{1,7,11,13,17,19,23,29\right\\}$

We represent the elements of $U(P)$ on a circle modulo $P$ as in figure 1. We
should use this example in order to illustrate the definitions to follow
regarding _distance_ and _consecutiveness_.

Figure 1: A representation of $U(30)$

##### Distance on $\mathbb{Z}/n\mathbb{Z}$

The shortest distance between two points on the circle, either clockwise or
counterclockwise, noted $d$, is a distance§§§The proof either geometric or
algebraic yields no difficulty on $\mathbb{Z}/n\mathbb{Z}$. With the example
of figure 1, we have $d(1,7)=6$ and $d(1,29)=2$.

##### Consecutiveness

For any sets $A$ and $E$ such that $A\subset E\subset\mathbb{Z}/n\mathbb{Z}$
we define a consecutiveness property consistent with the intuition: if we
represent the elements of $E$ as points marked on a circle of perimeter $n$
(see for example the pink points in figure 1 representing $E=U(30)$ in
$\mathbb{Z}/30\mathbb{Z}$) then $A$, a subset of $E$, is deemed consecutive in
$E$ if an only if there exist an arc on the circle such that:

  * •

All the elements of $A$ are on that arc

  * •

$A$ and $E$ coincide exactly on that arc (this arc does not contain an element
of $E$ which is not in $A$)

######  Example 1.1.

(see figure 1) The set $A=\\{1,7,11\\}$ is consecutive in $E$ because on the
arc $\overset{\frown}{1,11}$ the set of elements of $E$ is exactly $A$.

######  Example 1.2.

(see figure 1) The set $A=\\{1,7,13\\}$ is not consecutive in $E$. It is
obvious when we look at figure 1 and here is a way to see this: an arc that
contains $A$ will either contain one of these three oriented arcs
$\overset{\frown}{1,13}$, $\overset{\frown}{7,1}$ or $\overset{\frown}{13,7}$.
If this arc contains $\overset{\frown}{1,13}$ it contains $11$ which is in $E$
but not in $A$. If this arc contains $\overset{\frown}{7,1}$ it contains $11$,
$17$, $19$, $23$ and $29$ which are in $E$ but not in $A$. If this arc
contains $\overset{\frown}{13,7}$ it contains $17$, $19$, $23$ and $29$ which
are in $E$ but not in $A$. Therefore there is no arc satisfying the two
conditions (to contain $A$ and no element of $E\setminus A$)

##### Counting configurations

Now going into the subject matter, with $A\subset
E\subset\mathbb{Z}/n\mathbb{Z}$ as above, we try in this paper to answer the
following questions:

  1. 1.

_Question 1_ How many rotations move $A$ onto another subset included in $E$?
We shall write this number $\nu(A,E,n)$.

  2. 2.

_Question 2_ How many rotations move $A$ onto another subset included in $E$
that is also consecutive in $E$? We shall write this number $\kappa(A,E,n)$.

For simplicity we can impose $A$ to contain 0 and we shall call this a
_configuration_.

######  Example 1.3.

(see figure 1)

  * •

Answering question 1 with $A=\\{0,2\\}$ is being able to count the number of
pairs, 2 apart, in $E$. there are 3 such pairs: $\\{11,13\\}$, $\\{17,19\\}$
and $\\{29,1\\}$ therefore $\nu(A,E,n)=3$.

  * •

Answering question 1 with $A=\\{0,2,4\\}$ is trying to find 3 elements in $E$
such that there exists a rotation that moves them onto $A$. One finds no
suitable rotation which means that $\nu(A,E,n)=0$.

  * •

Answering question 2 with $A=\\{0,6\\}$ is trying to find pairs, 6 apart and
consecutive. There are 2 such pairs $\\{1,7\\}$ and $\\{23,29\\}$. The other 4
pairs that are 6 apart are not consecutive. That means $\kappa(A,E,n)=2$ and
$\nu(A,E,n)=6$

###  1.3 Consecutiveness in a subset of $\mathbb{Z}/n\mathbb{Z}$

######  Definition 1.1 (Set of $E$-consecutive elements).

Let $n$ be an integer, $A$ and $E$ two sets such that $A\subset
E\subset\mathbb{Z}/n\mathbb{Z}$. We say that $A$ is a set of $E$-consecutive
elements or that A is $E$-consecutive if and only if there exist two integers
$x$ and $y$, $x\leq y$ such that

$A=E\bigcap\left({[x;y[}/n\mathbb{Z}\right)$ (1)

In other words $A$ is exactly the intersection of $E$ and at least one
interval of $\mathbb{Z}$ taken modulo $n$. When there is no ambiguity
regarding the subset $E$ that we consider we shall say that $A$ is a set of
consecutive elements or even that $A$ is a consecutive set.

See for instance examples 1.1 and 1.2. In the first example take for instance
$x=1$ and $y=12$. Regarding the second example there exists no suitable
combination of $x$ and $y$.

######  Definition 1.2 (consecutive elements).

Let $E$ be a subset of $\mathbb{Z}/n\mathbb{Z}$. We say that two distinct
elements $x$ and $y$ in $E$ are consecutive if and only if
$\left\\{x,y\right\\}$ is an $E$-consecutive set.

######  Definition 1.3 (gap).

Let $E$ be a subset of $\mathbb{Z}/n\mathbb{Z}$. When $x$ and $y$ in $E$ are
consecutive we say that they define a gap of length $d(x,y)$.

######  Example 1.4.

(see figure 1) 1 and 7 are consecutive whereas 1 and 11 are not.

##  2 General configuration counting functions

###  2.1 Configuration counting functions

In this section $n$ is an integer greater than 2 and $E$ a subset of
$\mathbb{Z}/P\mathbb{Z}$. The definitions to follow are most of the time
dependent on the choice of $n$ and $E$ or $n$ alone. We give the definitions
mentioning this explicit dependency but, in order to simplify equations, we
may not always write these arguments when the context is clear, i.e. the
choice of $n$ and $E$ is clear.

######  Definition 2.1 (Configuration $\mathcal{T}$).

We define a configuration $\mathcal{T}$ as any subset of
$\mathbb{Z}/n\mathbb{Z}$ that contains 0.

######  Definition 2.2 (Configuration induced by $F$ and $x$,
$\mathcal{T}(F,x)$).

Let $F$ be a subset of $\mathbb{Z}/n\mathbb{Z}$, any $x$ in $F$ defines a
configuration $\mathcal{T}(F,x)$ with the subset
$\mathcal{T}(F,x):=F-\left\\{x\right\\}$. We say that the the configuration
$\mathcal{T}(F,x)$ is the configuration induced by $F$ and $x$.

######  Example 2.1.

With $n=30$ and $F=\\{1,7,17\\}$ we can create three configurations
$\\{0,6,16\\}$, $\\{0,10,24\\}$ and $\\{0,14,20\\}$ by setting $x$ to
respectively 1, 7 and 17.

######  Definition 2.3 (Length of a configuration $L(\mathcal{T},n)$).

Let $n$ be an integer and $\mathcal{T}$ a configuration of
$\mathbb{Z}/n\mathbb{Z}$. We define $L(\mathcal{T},n)$ the length of the
configuration $\mathcal{T}$ as

$L(\mathcal{T},n):=\max_{t\in\mathcal{T}}r(t)$ (2)

With $r$ as defined in section 1.1. We may write $L(\mathcal{T})$ when the
context is clear.

######  Definition 2.4 (Configuration core $\mathcal{C}(\mathcal{T},E,n)$ and
its cardinal $\nu(\mathcal{T},E,n)$).

Let $n$ be an integer, $\mathcal{T}$ a configuration of
$\mathbb{Z}/n\mathbb{Z}$ and $E$ a subset of $\mathbb{Z}/n\mathbb{Z}$. We
define $\mathcal{C}(\mathcal{T},E,n)$, the core of the configuration
$\mathcal{T}$, as the subset of $\mathbb{Z}/n\mathbb{Z}$ composed of all the
elements $x$ such that for any $t$ in $\mathcal{T}$, $x+t$ is in $E$.

$\mathcal{C}(\mathcal{T},E,n):=\left\\{x\in\mathbb{Z}/n\mathbb{Z}\;\mid\;\left\\{x\right\\}+\mathcal{T}\subset
E\right\\}$ (3)

We also define $\nu(\mathcal{T},E,n)$ as the cardinal of
$\mathcal{C}(\mathcal{T},E,n)$.

$\nu(\mathcal{T},E,n):=\textbf{card}\left(\mathcal{C}(\mathcal{T},E,n)\right)$
(4)

We may write $\mathcal{C}(\mathcal{T})$ and $\nu(\mathcal{T})$ when the
context is clear. $\nu(\mathcal{T})$ counts the number of subsets $F$ of $E$
such that there exists $x\in F$ such that $\mathcal{T}=\mathcal{T}(F,x)$. In
other words it counts the number of times the configuration $\mathcal{T}$ can
be seen in $E$.

######  Example 2.2.

Let’s take the example of figure 1 with $n=30$. Let’s take the configuration
$\mathcal{T}=\left\\{0,2,6\right\\}$ and $E=U(n)$. then
$\mathcal{C}(\mathcal{T})=\left\\{11,17\right\\}$. $11$ is in
$\mathcal{C}(\mathcal{T})$ because $\left\\{11,13,17\right\\}\subset U(n)$.
$17$ is in $\mathcal{C}(\mathcal{T})$ because
$\left\\{17,19,23\right\\}\subset U(n)$

######  Proposition 2.1.

Let $\mathcal{T}$ be a configuration and $\mathcal{C}(\mathcal{T})$ its core.
We have $\mathcal{C}(\mathcal{T})\subset E$

###### Proof.

Because $\mathcal{T}$ is a configuration, it contains $0$. By definition of
$\mathcal{C}(\mathcal{T})$, any $x\in\mathcal{C}(\mathcal{T})$ must in
particular satisfy $x+0\in E$ ∎

######  Proposition 2.2.

Let $n$ be an integer, $E$ a subset of $\mathbb{Z}/n\mathbb{Z}$ and
$\mathcal{T}_{1}$ and $\mathcal{T}_{2}$ two configurations, then

$\mathcal{T}_{1}\subset\mathcal{T}_{2}\quad\Rightarrow\quad\mathcal{C}(\mathcal{T}_{2})\subset\mathcal{C}(\mathcal{T}_{1})$

###### Proof.

Let $x\in\mathcal{C}(\mathcal{T}_{2})$, then

$\forall t\in\mathcal{T}_{2}\quad x+t\in E$

Because $\mathcal{T}_{1}\subset\mathcal{T}_{2}$ the above implies

$\forall t\in\mathcal{T}_{1}\quad x+t\in E$

which shows that $x\in\mathcal{C}(\mathcal{T}_{1})$ ∎

######  Definition 2.5 (Configuration consecutive core
$\mathcal{K}(\mathcal{T},E,n)$ and its cardinal $\kappa(\mathcal{T},E,n)$).

Let $n$ be an integer, $E$ a subset of $\mathbb{Z}/n\mathbb{Z}$, $\mathcal{T}$
a configuration of $\mathbb{Z}/n\mathbb{Z}$. We define
$\mathcal{K}(\mathcal{T},E,n)$, the consecutive core of the configuration
$\mathcal{T}$, as the subset of $\mathbb{Z}/n\mathbb{Z}$ composed of all the
elements $x$ such that $\left\\{x\right\\}+\mathcal{T}$ is $E$-consecutive.

$\mathcal{K}(\mathcal{T},E,n):=\left\\{x\in\mathbb{Z}/n\mathbb{Z}\;\mid\;\left\\{x\right\\}+\mathcal{T}\;is\;E-consecutive\right\\}$
(5)

We define $\kappa(\mathcal{T},E,n)$ as the cardinal of
$\mathcal{K}(\mathcal{T},E,n)$.

$\kappa(\mathcal{T},E,n):=\textbf{card}\left(\mathcal{K}(\mathcal{T},E,n)\right)$
(6)

We may write $\mathcal{K}(\mathcal{T})$ or $\kappa(\mathcal{T})$ when the
context is clear. $\kappa(\mathcal{T})$ counts the number of $E$-consecutive
subsets $F$ of $E$ such that there exists $x\in F$ such that
$\mathcal{T}=\mathcal{T}(F,x)$.

######  Example 2.3.

Let’s take the example of figure 1 with $n=30$. Let’s take the configuration
$\mathcal{T}=\left\\{0,6\right\\}$ and $E=U(n)$. then
$\mathcal{K}(\mathcal{T})=\left\\{1,23\right\\}$. Although $7+0$ and $7+6=13$
are both in $U(n)$, 7 is not in $\mathcal{K}(\mathcal{T})$ because
$\\{7,13\\}$ is not $U(30)$-consecutive. The same applies to $11$, $13$ and
$17$ which are not in $\mathcal{K}(\mathcal{T})$ because in breach of the
consecutiveness condition.

######  Proposition 2.3.

Let $\mathcal{T}$ be a configuration, $\mathcal{C}(\mathcal{T})$ its core and
$\mathcal{K}(\mathcal{T})$ its consecutive core. We have
$\mathcal{K}(\mathcal{T})\subset\mathcal{C}(\mathcal{T})$

###### Proof.

If the set $\left\\{x\right\\}+\mathcal{T}$ is $E$-consecutive it must satisfy
$\left\\{x\right\\}+\mathcal{T}\subset E$ ∎

######  Definition 2.6 (Configuration complement $\Delta(\mathcal{T},n)$).

Let $n$ be an integer and $\mathcal{T}$ a configuration of
$\mathbb{Z}/n\mathbb{Z}$, we call configuration complement and we write
$\Delta(\mathcal{T},P)$, the subset of elements $x$ in
$\mathbb{Z}/n\mathbb{Z}$ which satisfy the following two conditions,
$x\notin\mathcal{T}$ and $r(x)<L(\mathcal{T})$. we may write
$\Delta(\mathcal{T})$ when the context is clear.

######  Remark 2.1.

The configuration complement is not a configuration because it does not
contain 0.

###  2.2 General consecutive core cardinal formula

######  Theorem 2.1 (Consecutive core cardinal formula).

Let $\mathcal{T}$ be a configuration and $\Delta(\mathcal{T})$ its complement.
The following equation holds true:

$\kappa(\mathcal{T})=\sum_{X\in\mathcal{P}(\Delta(\mathcal{T}))}(-1)^{\textbf{card}\left(X\right)}\nu(\mathcal{T}\cup
X)$ (7)

###### Proof.

$\kappa(\mathcal{T})$ counts the number of $E$-consecutive sets $F$ that
contain an $x$ such that $\mathcal{T}$ is the configuration induced by $F$ and
$x$. Also, $\nu(\mathcal{T})$ counts the number of sets $F\subset E$ that
contain an $x$ such that $\mathcal{T}$ is the configuration induced by $F$ and
$x$; irrespective of the consecutiveness condition. The idea of the proof is
to say that $\kappa(\mathcal{T})$ must be equal to $\nu(\mathcal{T})$ less the
number of times the set $F$ is not $E$-consecutive.

Let $\delta\in\Delta(\mathcal{T})$ and let us consider the configuration
$\mathcal{T}\bigcup\left\\{\delta\right\\}$. We have
$\mathcal{T}\subset\mathcal{T}\bigcup\left\\{\delta\right\\}$ and from
proposition 2.2 we have
$\mathcal{C}(\mathcal{T}\bigcup\left\\{\delta\right\\})\subset\mathcal{C}(\mathcal{T})$.
In addition
$\mathcal{C}(\mathcal{T}\bigcup\left\\{\delta\right\\})\bigcap\mathcal{K}(\mathcal{T})=\emptyset$.
If $x\in\mathcal{C}(\mathcal{T}\bigcup\left\\{\delta\right\\})$ then
$x+\delta\in E$. By definition $\delta\notin\mathcal{T}$ and
$r(\delta)<L(\mathcal{T})$ which means that $\left\\{x\right\\}+\mathcal{T}$
is not an $E$-consecutive set because $x+\delta$ breaches the consecutiveness
condition on $\left\\{x\right\\}+\mathcal{T}$. Therefore
$x\notin\mathcal{K}(\mathcal{T})$.

This allows us write

$\kappa(\mathcal{T})=\nu(\mathcal{T})-\textbf{card}\left(\bigcup_{\delta\in\Delta(\mathcal{T})}\mathcal{C}\left(\mathcal{T}\cup\left\\{\delta\right\\}\right)\right)$

To calculate
$\textbf{card}\left(\bigcup_{\delta\in\Delta(\mathcal{T})}\mathcal{C}\left(\mathcal{T}\cup\left\\{\delta\right\\}\right)\right)$,
we use the inclusion-exclusion principle (see [1])

$\textbf{card}\left(\bigcup_{\delta\in\Delta(\mathcal{T})}\mathcal{C}\left(\mathcal{T}\cup\left\\{\delta\right\\}\right)\right)=\sum_{X\in\mathcal{P}(\Delta(\mathcal{T}))\setminus\emptyset}(-1)^{\textbf{card}\left(X\right)-1}\textbf{card}\left(\bigcap_{\delta\in
X}\mathcal{C}\left(\mathcal{T}\cup\left\\{\delta\right\\}\right)\right)$

Also we have

$\bigcap_{\delta\in
X}\mathcal{C}\left(\mathcal{T}\cup\left\\{\delta\right\\}\right)=\mathcal{C}\left(\mathcal{T}\cup
X\right)$

Then we can write

$\textbf{card}\left(\bigcap_{\delta\in
X}\mathcal{C}\left(\mathcal{T}\cup\left\\{\delta\right\\}\right)\right)=\nu\left(\mathcal{T}\cup
X\right)$

Finally, coming back to the expression of $\kappa\left(\mathcal{T}\right)$

$\displaystyle\kappa(\mathcal{T})$
$\displaystyle=\nu(\mathcal{T})-\sum_{X\in\mathcal{P}(\Delta(\mathcal{T}))\setminus\emptyset}(-1)^{\textbf{card}\left(X\right)-1}\nu\left(\mathcal{T}\cup
X\right)$
$\displaystyle=\nu(\mathcal{T})+\sum_{X\in\mathcal{P}(\Delta(\mathcal{T}))\setminus\emptyset}(-1)^{\textbf{card}\left(X\right)}\nu\left(\mathcal{T}\cup
X\right)$
$\displaystyle=\sum_{X\in\mathcal{P}(\Delta(\mathcal{T}))}(-1)^{\textbf{card}\left(X\right)}\nu\left(\mathcal{T}\cup
X\right)$

∎

######  Example 2.4.

With $E:=U(30)$ as a subset of $\mathbb{Z}/30\mathbb{Z}$ as in the example of
figure 1. Let $\mathcal{T}$ be the configuration $\left\\{0,6\right\\}$ then
$\nu(\mathcal{T})=6$ because there are only 6 elements $x$ of
$\mathbb{Z}/30\mathbb{Z}$ such that $x+0$ and $x+6$ are both in $E$, namely
$1$, $7$, $11$, $13$, $17$ and $23$. However, $\kappa(\mathcal{T})=2$ because
one should exclude the following 4 non $U(30)$-consecutive sets
$\left\\{7,13\right\\}$, $\left\\{11,17\right\\}$, $\left\\{13,19\right\\}$
and $\left\\{17,23\right\\}$. There are only two $U(30)$-consecutive sets with
the configuration $\mathcal{T}$ which are $\left\\{1,7\right\\}$ and
$\left\\{23,29\right\\}$.

##  3 A formula when $E$ is $U(P)$ for a square-free integer $P$

In this section we consider a square-free integer $P$. We consider
$\mathbb{Z}/P\mathbb{Z}$ and its subset $E:=U(P)$. Let $\mathcal{T}$ be a
configuration of $\mathbb{Z}/P\mathbb{Z}$.

######  Definition 3.1 (Configuration modulo a divisor).

Let $P$ be an integer and $\mathcal{T}$ be a configuration of
$\mathbb{Z}/P\mathbb{Z}$. For any integer $q$ that divides $P$, and for any
$t$ an integer modulo $P$ of $\mathcal{T}$ we define $t\mod q$ as being
$r(t)\mod q$ since this number modulo $q$ is independent from the
representative of $t$ that we choose.

$\forall k\in\mathbb{Z}\quad r(t)+kP\equiv r(t)\mod q$

For this reason (and only because $q$ divides $P$) we can define
$\mathcal{T}/q\mathbb{Z}$ as if we were working with integers (see
introduction). We define

$\mathcal{T}/q\mathbb{Z}:=\left\\{r(t)\mod q\quad\mid\quad
t\in\mathcal{T}\right\\}$

Then $\mathcal{T}/q\mathbb{Z}$ is a configuration of $\mathbb{Z}/q\mathbb{Z}$
since it is a subset of $\mathbb{Z}/q\mathbb{Z}$ that contains 0.

###  3.1 A formula for $\nu(\mathcal{T},U(P),P)$

######  Theorem 3.1.

Let $P$ be a square-free integer. We consider $\mathbb{Z}/P\mathbb{Z}$ and its
subset $E:=U(P)$. Let $\mathcal{T}$ be a configuration of
$\mathbb{Z}/P\mathbb{Z}$.

$\nu(\mathcal{T})=\prod_{p\in\mathcal{S}(P)}\left(p-\textbf{card}\left(\mathcal{T}/p\mathbb{Z}\right)\right)$
(8)

###### Proof.

let $q$ be a prime ¶¶¶We write this prime $q$ and not $p$ to avoid confusions
with $P$ that divides $P$. From 3.1 it is possible to define
$\mathcal{T}/q\mathbb{Z}$ a configuration of $\mathbb{Z}/q\mathbb{Z}$. Now
according to the definition 2.4 for $\mathcal{T}/q\mathbb{Z}$ in
$\mathbb{Z}/q\mathbb{Z}$ with the subset $E=U(q)$ we have

$\displaystyle\nu(\mathcal{T}/q\mathbb{Z},U(q),q)$
$\displaystyle=\textbf{card}\left(\left\\{x\in\mathbb{Z}/q\mathbb{Z}\;\mid\;\left\\{x\right\\}+\mathcal{T}/q\mathbb{Z}\subset
U(q)\right\\}\right)$
$\displaystyle=\textbf{card}\left(\left\\{x\in\mathbb{Z}/q\mathbb{Z}\;\mid\;\forall
t\in\mathcal{T}/q\mathbb{Z}\quad x\neq-t\right\\}\right)$
$\displaystyle=q-\textbf{card}\left(\mathcal{T}/q\mathbb{Z}\right)$

Let’s write

$X(q)=\left\\{x\in\mathbb{Z}/q\mathbb{Z}\;\mid\;\left\\{x\right\\}+\mathcal{T}/q\mathbb{Z}\subset
U(q)\right\\}$

Referring to the Chinese remainder theorem (see [1]), knowing an integer
$(x\mod q)$ for all its components $q$ (all primes that divide $P$) is
tantamount to knowing $(x\mod P)$. Therefore we have

$\left(x\mod P\right)\in X(P)\quad\Leftrightarrow\quad\forall
q\in\mathcal{S}(P)\quad\left(x\mod q\right)\in X(q)$

And therefore

$\displaystyle\nu(\mathcal{T},U(P),P)$
$\displaystyle=\textbf{card}\left(X(P)\right)$
$\displaystyle=\prod_{q\in\mathcal{S}(P)}\textbf{card}\left(X(q)\right)$
$\displaystyle=\prod_{q\in\mathcal{S}(P)}\nu(\mathcal{T},U(q),q)$
$\displaystyle=\prod_{q\in\mathcal{S}(P)}\left(q-\textbf{card}\left(\mathcal{T}/q\mathbb{Z}\right)\right)$

∎

####  3.1.1 A generalization of Euler and Nagell’s totient functions

##### Euler $\phi$ function

Euler $\phi$ function is linked to $\nu$ via

$\phi(n)=\nu(\left\\{0\right\\},U(P),P)$ (9)

##### Nagell’s totient function

Nagell’s totient function $\theta(n,P)$ counts the number of solutions of the
congruence

$n\equiv x+y\mod P$

under the restriction $(x,P)=(y,P)=1$ (see [3] and [2])

######  Proposition 3.1.

Nagell’s totient function can be expressed via $\nu$ through the following
identity

$\theta(n,P)=\nu(\left\\{0,n\right\\},U(P),P)$ (10)

###### Proof.

The expression $\nu(\left\\{0,n\right\\},U(P),P)$ counts the number of numbers
$u$ in $\mathbb{Z}/P\mathbb{Z}$ such that $u+0$ and $u+n$ are both in $U(P)$.
For $u$ in $\mathcal{C}(\left\\{0,n\right\\},U(P),P)$, we write $v=u+n$. We
have $v-u=n$. Say $v=x$ and $-u=y$ and we get to $x+y=n\mod P$ and the
restriction conditions are satisfied because $x$ is in $U(P)$ and is therefore
coprime to $P$. And $u$ in $U(P)$ implies $y=-u$ is in $U(P)$ and therefore
$(y,P)=1$. Conversly the equation $x+y\equiv n\mod P$ can be rewritten

$x-(-y)\equiv n\mod P$

Because of the property $u\in U(P)\;\Leftrightarrow\;-u\in U(P)$ the above
equation is simply

$u-v\equiv n\mod P$

with $x=u$ and $v=-y$

##### A generalized totient function

With $\mathcal{T}$ being a configuration of
$\mathbb{Z}/P\mathbb{Z}$∥∥∥Although it does not contain 0, we say that
$\emptyset$ is a configuration for an integer $P$ we have seen that

  * •

$P$ when $\mathcal{T}$ is $\emptyset$

  * •

$\phi(P)$ when $\mathcal{T}$ is $\left\\{0\right\\}$

  * •

$\theta(n,P)$ when $\mathcal{T}$ is $\left\\{0,n\right\\}$

For any other $\mathcal{T}$ we can consider $\nu(\mathcal{T},U(P),P)$ as some
sort of generalized totient function. It seems to be a generalization of
another kind than those exposed in [7]

∎

###  3.2 Consecutive core formula when $E=U(P)$

######  Theorem 3.2 (main formula in $U(P)$).

Let $P$ be a square-free integer and $\mathcal{T}$ a configuration of
$\mathbb{Z}/P\mathbb{Z}$

$\kappa(\mathcal{T},U(P),P)=\sum_{X\in\mathcal{P}(\Delta(\mathcal{T}))}(-1)^{\textbf{card}\left(X\right)}\prod_{p\in\mathcal{S}(P)}\left(p-\textbf{card}\left(\left(\mathcal{T}\cup
X\right)/p\mathbb{Z}\right)\right)$ (11)

###### Proof.

Application of theorems 2.1 and 3.1. ∎

####  3.2.1 Another expression of formula 11

In this section we rewrite 11 using the following lemma:

######  Lemma 3.1.

Let $a$ be a positive integer and
$S_{a}=\left\\{0,2,4,\ldots,2a-2,2a\right\\}$ the set of all non negative even
numbers less than or equal to $2a$. For any prime $p$ such that $p>a$ and any
set $Y\subset S_{a}$ we have:

$\textbf{card}\left(Y/p\mathbb{Z}\right)=\textbf{card}\left(Y\right)$

###### Proof.

It is enough to show that the application modulo $p$ from $S_{a}$ to
$S_{a}/p\mathbb{Z}$ is injective. If $x=y\mod p$ then if $x\neq y$ we must
have $\left|x-y\right|=kp$ with $k\geq 2$ because $x-y$ is even. (in
particular $k=1$ is excluded). That means $\left|x-y\right|\geq 2p>2a$ which
contradicts $\left|x-y\right|\leq 2a$ because $x$ and $y$ are in $S_{a}$. ∎

######  Proposition 3.2.

With $P=p\\#$ for some prime $p$ and $\mathcal{T}$ a configuration of
$\mathbb{Z}/P\mathbb{Z}$, if $\mathcal{T}$ contains an element whose
representative is odd then $\nu(\mathcal{T},U(P),P)=0$

###### Proof.

It is clear that 2 divides $P$. Given that $\mathcal{T}$ contains an element
which representative is odd and given definition 3.1 which applies here we
have $\mathcal{T}/2\mathbb{Z}=\left\\{0,1\right\\}$. From theorem 3.1,
$\nu(\mathcal{T},U(P),P)$ is a multiple of

$2-\textbf{card}\left(\mathcal{T}/2\mathbb{Z}\right)=2-2=0$

∎

######  Remark 3.1.

Because of proposition 3.2, when applying theorem 3.2 it is sufficient to only
consider configurations that only contain classes with even representatives.
That is because all other terms will contribute to 0 in equation 11 of theorem
3.2 .

The configuration $\mathcal{T}$ has an even length. Say $L(\mathcal{T})=D=2a$.
The cardinals of the sets that belong to $\mathcal{P}(\Delta(\mathcal{T}))$
range from 0 (for $X=\emptyset$) to
$a+1-\textbf{card}\left(\mathcal{T}\right)$ (for $X=\Delta(\mathcal{T})$). If
we split the sum over sets that have the same cardinal the equation becomes:

$\kappa(\mathcal{T},U(P),P)=\sum_{k=0}^{a+1-\textbf{card}\left(\mathcal{T}\right)}\sum_{\begin{subarray}{c}X\in\mathcal{P}(\Delta(\mathcal{T}))\\\
\textbf{card}\left(X\right)=k\end{subarray}}(-1)^{\textbf{card}\left(X\right)}\prod_{p\in\mathcal{S}(P)}\left(p-\textbf{card}\left(\left(\mathcal{T}\cup
X\right)/p\mathbb{Z}\right)\right)$

In addition we transform the product inside the sum into the product of two
products, one for primes less than or equal to $a$ and another one for primes
strictly greater than $a$.

$\prod_{p\in\mathcal{S}(P)}=\prod_{\begin{subarray}{c}p\in\mathcal{S}(P)\\\
p\leq a\end{subarray}}\prod_{\begin{subarray}{c}p\in\mathcal{S}(P)\\\
a<p\end{subarray}}$

From proposition 3.2, the only terms that are non zero are those where
$\mathcal{T}\cup X\subset S_{a}$ (the representatives in $X$ are all even).
When $p>a$ the application of lemma 3.1 gives:

$\displaystyle\textbf{card}\left(\left(\mathcal{T}\cup
X\right)/p\mathbb{Z}\right)$ $\displaystyle=\textbf{card}\left(\mathcal{T}\cup
X\right)$
$\displaystyle=\textbf{card}\left(\mathcal{T}\right)+\textbf{card}\left(X\right)$
$\displaystyle=\textbf{card}\left(\mathcal{T}\right)+k$

The equation becomes:

$\kappa(\mathcal{T},U(P),P)=\sum_{k=0}^{a+1-\textbf{card}\left(\mathcal{T}\right)}\sum_{\begin{subarray}{c}X\in\mathcal{P}(\Delta(\mathcal{T}))\\\
\textbf{card}\left(X\right)=k\end{subarray}}(-1)^{\textbf{card}\left(X\right)}\\\
\prod_{\begin{subarray}{c}p\in\mathcal{S}(P)\\\ p\leq
a\end{subarray}}\left(p-\textbf{card}\left(\left(\mathcal{T}\cup
X\right)/p\mathbb{Z}\right)\right)\prod_{\begin{subarray}{c}p\in\mathcal{S}(P)\\\
a<p\end{subarray}}(p-k-\textbf{card}\left(\mathcal{T}\right))$

The term $\prod_{\begin{subarray}{c}p\in\mathcal{S}(P)\\\
a<p\end{subarray}}(p-k-\textbf{card}\left(\mathcal{T}\right))$ in the inner
sum does not depend on $X$. The equation can be rewritten:

$\kappa(\mathcal{T},U(P),P)=\sum_{k=0}^{a+1-\textbf{card}\left(\mathcal{T}\right)}\prod_{\begin{subarray}{c}p\in\mathcal{S}(P)\\\
a<p\end{subarray}}(p-k-\textbf{card}\left(\mathcal{T}\right))\\\
\sum_{\begin{subarray}{c}X\in\mathcal{P}(\Delta(\mathcal{T}))\\\
\textbf{card}\left(X\right)=k\end{subarray}}(-1)^{\textbf{card}\left(X\right)}\prod_{\begin{subarray}{c}p\in\mathcal{S}(P)\\\
p\leq a\end{subarray}}\left(p-\textbf{card}\left(\left(\mathcal{T}\cup
X\right)/p\mathbb{Z}\right)\right)$

Let’s write:

$c(a,k,P,\mathcal{T})=\sum_{\begin{subarray}{c}X\in\mathcal{P}(\Delta(\mathcal{T}))\\\
\textbf{card}\left(X\right)=k\end{subarray}}(-1)^{\textbf{card}\left(X\right)}\prod_{\begin{subarray}{c}p\in\mathcal{S}(P)\\\
p\leq a\end{subarray}}\left(p-\textbf{card}\left(\left(\mathcal{T}\cup
X\right)/p\mathbb{Z}\right)\right)$ (12)

Note that because $L(\mathcal{T})=2a$ it is not necessary to write that $c$
depends on $a$ since it already depends on $\mathcal{T}$. However I prefer to
write it this way for readability. The equation becomes:

$\kappa(\mathcal{T},U(P),P)=\sum_{k=0}^{a+1-\textbf{card}\left(\mathcal{T}\right)}c(a,k,P,\mathcal{T})\prod_{\begin{subarray}{c}p\in\mathcal{S}(P)\\\
a<p\end{subarray}}(p-k-\textbf{card}\left(\mathcal{T}\right))$

Which is also

$\kappa(\mathcal{T},U(P),P)=\sum_{k=\textbf{card}\left(\mathcal{T}\right)}^{a+1}c(a,k-\textbf{card}\left(\mathcal{T}\right),P,\mathcal{T})\prod_{\begin{subarray}{c}p\in\mathcal{S}(P)\\\
a<p\end{subarray}}(p-k)$ (13)

####  3.2.2 Particularization of equation 13 when $\mathcal{T}=\\{0,2a\\}$ and
$P=p\\#$

Now, in addition to being square-free, we suppose that $P$ is the primorial of
a prime $p$. For a positive integer $a$, when we set the configuration to
$\mathcal{T}=\\{0,2a\\}$. We essentially get formulas to count the number of
gaps of length $2a$. The gaps among numbers coprime to a primorial have been
studied at length. (see for example [8] (smallest even number which is not a
gap), [4] (asymptotic population of gaps) or [5] (maximum gap))

When $\mathcal{T}=\\{0,D\\}$ we adopt a simpler notation:

$K(D,P):=\kappa(\mathcal{T},U(P),P)$ (14)

When $\mathcal{T}=\\{0,2a\\}$, we have $L(\mathcal{T})=2a$ and
$\textbf{card}\left(\mathcal{T}\right)=2$. Because $P=p\\#$ the equation 13
can be rewritten

$K(D,P)=\sum_{k=2}^{a+1}c(a,k-2,P,\mathcal{T})\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\
a<q\leq p\end{subarray}}(q-k)$ (15)

##  4 Formulas to count the number of consecutive pairs in $U(P)$

###  4.1 Direct application of formula 15 for $D$ even and $D\leq 50$

With a program, according to the equation 15 we calculate

$K(2,P)=\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 3\leq q\leq
p\end{subarray}}(q-2)$ (16)

$K(4,P)=\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 3\leq q\leq
p\end{subarray}}(q-2)$ (17)

$K(6,P)=2\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 5\leq q\leq
p\end{subarray}}(q-2)-2\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 5\leq q\leq
p\end{subarray}}(q-3)$ (18)

$K(8,P)=\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 5\leq q\leq
p\end{subarray}}(q-2)-2\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 5\leq q\leq
p\end{subarray}}(q-3)\\\ +\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 5\leq
q\leq p\end{subarray}}(q-4)$ (19)

$K(10,P)=4\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 7\leq q\leq
p\end{subarray}}(q-2)-6\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 7\leq q\leq
p\end{subarray}}(q-3)\\\ +2\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 7\leq
q\leq p\end{subarray}}(q-4)$ (20)

$K(12,P)=6\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 7\leq q\leq
p\end{subarray}}(q-2)-14\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 7\leq
q\leq p\end{subarray}}(q-3)\\\ +10\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\
7\leq q\leq p\end{subarray}}(q-4)-2\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\
7\leq q\leq p\end{subarray}}(q-5)$ (21)

$K(14,P)=18\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 11\leq q\leq
p\end{subarray}}(q-2)-40\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 11\leq
q\leq p\end{subarray}}(q-3)\\\ +28\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\
11\leq q\leq
p\end{subarray}}(q-4)-6\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\ 11\leq
q\leq p\end{subarray}}(q-5)$ (22)

We have calculated the formulas for $D$ up to 50, they are available page A
expressed as listings.

The application of these formulas give the numbers in table 1. These numbers
have been checked against an exact calculation of $K(D,p\\#)$

###  4.2 A property on the sum of the coefficients

######  Proposition 4.1.

If we write $S$ the sum of the coefficients $c(a,k-2,P,\mathcal{T})$ (see
equation 12) for $k$ ranging from 2 to $a+1$ as in equation 15 and if we
denote by $q$ the greatest prime less than or equal to $a$ (or such that
$2q\leq D$) we have

$S:=\sum_{k=2}^{a+1}c(a,k-2,P,\mathcal{T})=K(D,q\\#)$ (23)

That means $S$ is equal to the number of gaps of length $D$ in $U(q\\#)$.

###### Proof.

$\displaystyle S$ $\displaystyle:=\sum_{k=2}^{a+1}c(a,k-2,P,\mathcal{T})$
$\displaystyle=\sum_{k=0}^{a-1}c(a,k,P,\mathcal{T})$
$\displaystyle=\sum_{k=0}^{a-1}\sum_{\begin{subarray}{c}X\in\mathcal{P}(\Delta(\mathcal{T}))\\\
\textbf{card}\left(X\right)=k\end{subarray}}(-1)^{\textbf{card}\left(X\right)}\prod_{\begin{subarray}{c}p\in\mathbb{P}\\\
p\leq a\end{subarray}}\left(p-\textbf{card}\left(\left(\mathcal{T}\cup
X\right)/p\mathbb{Z}\right)\right)$
$\displaystyle=\sum_{\begin{subarray}{c}X\in\mathcal{P}(\Delta(\mathcal{T}))\end{subarray}}(-1)^{\textbf{card}\left(X\right)}\prod_{\begin{subarray}{c}p\in\mathbb{P}\\\
p\leq a\end{subarray}}\left(p-\textbf{card}\left(\left(\mathcal{T}\cup
X\right)/p\mathbb{Z}\right)\right)$ $\displaystyle=K(D,q\\#)$

∎

In the examples that were given ($p\leq 29$) it is interesting to note that
this sum is always equal to zero. This property should not hold however for
values of $p\geq 43$ as indicated in the sequence $A048670$ from The On-Line
Encyclopedia of Integer Sequences (see [6] (the Jacobsthal function applied to
primorials). Indeed in $U(43\\#)$, the largest gap between consecutive
elements is $90$ which is larger than $2*43=86$. (43 is the smallest prime $p$
such that the longest gap in $U(p\\#)$ is greater than $2p$)

##  5 Conclusion

The paper proposes some formulas to calculate the number of occurrences of gap
patterns in $U(P)$ based on the inclusion-exclusion principle and the Chinese
Remainder Theorem. For single gaps $D=2a$ this happens to provide relatively
simple formulas, at least from a theoretical perspective, to count the number
of gaps in any $U(p\\#)$ for any prime $p$. Unfortunately it becomes
increasingly difficult to verify the formulas given the steep growth of
$p\\#$. Calculating the coefficients to apply in the formulas is also very
challenging since a naive calculation of $K(D,P)$ yields a complexity $2^{a}$.
However once the coefficients are calculated for a certain even gap $D$ the
calculation of $K(D,P)$ becomes possible for very large primes $p$. The
formulas offer some perspectives to calculate $K(D,P)$ when it becomes
impossible from a computation perspective to just count all the gaps in $U(P)$
due to the size of $P$. It may also be interesting to apply the formulas to
some specific gap patterns. There are also possibilities to optimize the
calculation of $K(D,P)$ which leads to interesting algorithmic questions and
would enable the calculation of more of these values.

##  Appendix A Listings for formula 15 for $D$ even and $6\leq D\leq 50$

We give below listings for the formulas of $K(D,P)$ (see section 4.1 and
equation 15) for $D$ even ranging from 6 to 50. The first value is the
smallest prime number $p^{\star}$ strictly greater than $a=\frac{D}{2}$. The
other couples indicate a coefficient $c$ and a value $b$ such that each couple
defines the contribution $c\prod_{\begin{subarray}{c}q\in\mathbb{P}\\\
a<p^{\star}\leq q\leq p\end{subarray}}(q-b)$ in the formula of $K(D,P)$. In
particular, the products should be taken on primes $q$ such that
$a<p^{\star}\leq q\leq p$ and therefore the formulas are only valid for
$p^{\star}\leq p$.

    D =  6:  [5, (2, 2), (-2, 3)]
    D =  8:  [5, (1, 2), (-2, 3), (1, 4)]
    D =  10: [7, (4, 2), (-6, 3), (2, 4)]
    D =  12: [7, (6, 2), (-14, 3), (10, 4), (-2, 5)]
    D =  14: [11, (18, 2), (-40, 3), (28, 4), (-6, 5)]
    D =  16: [11, (15, 2), (-40, 3), (36, 4), (-12, 5), (1, 6)]
    D =  18: [11, (30, 2), (-92, 3), (100, 4), (-44, 5), (6, 6)]
    D =  20: [11, (20, 2), (-78, 3), (116, 4), (-80, 5), (24, 6), (-2, 7)]
    D =  22: [13, (150, 2), (-504, 3), (632, 4), (-350, 5), (72, 6)]
    D =  24: [13, (270, 2), (-1088, 3), (1738, 4), (-1376, 5), (540, 6), (-84, 7)]
    D =  26: [17, (1620, 2), (-6688, 3), (11090, 4), (-9378, 5), (4224, 6), (-952, 7), (84, 8)]
    D =  28: [17, (1782, 2), (-7400, 3), (12312, 4), (-10400, 5), (4634, 6), (-1008, 7), (80, 8)]
    D =  30: [17, (3960, 2), (-19312, 3), (38958, 4), (-41768, 5), (25376, 6), (-8570, 7), (1446, 8), (-90, 9)]
    D =  32: [17, (1485, 2), (-8128, 3), (18833, 4), (-23992, 5), (18255, 6), (-8428, 7), (2287, 8), (-332, 9), (20, 10)]
    D =  34: [19, (23760, 2), (-122400, 3), (265734, 4), (-315120, 5), (220944, 6), (-92466, 7), (22120, 8), (-2700, 9), (128, 10)]
    D =  36: [19, (44550, 2), (-248688, 3), (592204, 4), (-783298, 5), (627720, 6), (-311962, 7), (94618, 8), (-16604, 9),
              (1516, 10), (-56, 11)]
    D =  38: [23, (400950, 2), (-2239104, 3), (5333232, 4), (-7045200, 5), (5612012, 6), (-2737436, 7), (788592, 8), (-120186, 9),
              (7140, 10)]
    D =  40: [23, (504900, 2), (-2915840, 3), (7236810, 4), (-10062640, 5), (8559382, 6), (-4558512, 7), (1490236, 8),
              (-279200, 9), (25632, 10), (-768, 11)]
    D =  42: [23, (908820, 2), (-5777920, 3), (16006998, 4), (-25293628, 5), (25040302, 6), (-16042408, 7), (6621546, 8),
              (-1691666, 9), (243872, 10), (-16210, 11), (294, 12)]
    D =  44: [23, (420750, 2), (-2834496, 3), (8400816, 4), (-14384852, 5), (15706264, 6), (-11377586, 7), (5507072, 8),
              (-1745434, 9), (342926, 10), (-37092, 11), (1632, 12)]
    D =  46: [29, (8330850, 2), (-55372800, 3), (161805900, 4), (-272787560, 5), (292530312, 6), (-207276852, 7), (97483328, 8),
              (-29693850, 9), (5502392, 10), (-541736, 11), (20016, 12)]
    D =  48: [29, (15904350, 2), (-110218240, 3), (337714368, 4), (-601500212, 5), (688462352, 6), (-528267460, 7), (274911048, 8),
              (-95882496, 9), (21589178, 10), (-2909644, 11), (201728, 12), (-4972, 13)]
    D =  50: [29, (10602900, 2), (-78453760, 3), (259208326, 4), (-503845272, 5), (638819850, 6), (-553348174, 7), (333200948, 8),
              (-139061136, 9), (39323050, 10), (-7178822, 11), (771934, 12), (-40444, 13), (600, 14)]

##  Appendix B Table of values of $K(D,p\\#)$

The values of the table below have been calculated with two different methods

  * •

Just counting the consecutive pairs in $U(P)$ with a program (reference
calculation)

  * •

Applying formula 15 page 15

To support the validity of equation 15; it has always returned the exact
number on all calculations from the table.

Table 1: Values of $K(D,p\\#)$, $D$ in rows, $p$ in columns $K(D,p\\#)$ | 2 | 3 | 5 | 7 | 11 | 13 | 17 | 19 | 23 | 29
---|---|---|---|---|---|---|---|---|---|---
2 | 1 | 1 | 3 | 15 | 135 | 1485 | 22275 | 378675 | 7952175 | 214708725
4 | 0 | 1 | 3 | 15 | 135 | 1485 | 22275 | 378675 | 7952175 | 214708725
6 | 0 | 0 | 2 | 14 | 142 | 1690 | 26630 | 470630 | 10169950 | 280323050
8 | 0 | 0 | 0 | 2 | 28 | 394 | 6812 | 128810 | 2918020 | 83120450
10 | 0 | 0 | 0 | 2 | 30 | 438 | 7734 | 148530 | 3401790 | 97648950
12 | 0 | 0 | 0 | 0 | 8 | 188 | 4096 | 90124 | 2255792 | 68713708
14 | 0 | 0 | 0 | 0 | 2 | 58 | 1406 | 33206 | 871318 | 27403082
16 | 0 | 0 | 0 | 0 | 0 | 12 | 432 | 12372 | 362376 | 12199404
18 | 0 | 0 | 0 | 0 | 0 | 8 | 376 | 12424 | 396872 | 14123368
20 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 1440 | 61560 | 2594160
22 | 0 | 0 | 0 | 0 | 0 | 2 | 78 | 2622 | 88614 | 3324402
24 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 1136 | 48868 | 2100872
26 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 142 | 7682 | 386554
28 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 5664 | 324792
30 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 2164 | 154220
32 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 10128
34 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 198 | 15942
36 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 7228
38 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 570
40 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 1464
42 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 272
44 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12
46 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2
48 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
50 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0

A direct application of the formula gave the following numbers of occurrences
of gaps in $U(41\\#)$ (a list of pairs between a gap length and the number of
times this gap length can be seen modulo $41\\#$). These values satisfy $\sum
DK(D,P)=P$ however I couldn’t validate them against an exact enumeration from
$U(41\\#)$.

    [[2;8499244879125],[4;8499244879125],[6;11604850743850],[8;3682730287600],[10;4396116829650],[12;3474628537016],
    [14;1475437583074],[16;741616123248],[18;949982718776],[20;230780018520],[22;252605556450],[24;199070346484],
    [26;47895816494],[28;45885975600],[30;31307108764],[32;3887806536],[34;4391607498],[36;3247427048],[38;606169690],
    [40;756088668],[42;363563276],[44;57663276],[46;32658714],[48;29314704],[50;11018808],[52;1684756],[54;3980340],
    [56;537324],[58;371574],[60;127928],[62;9262],[64;14400],[66;7680],[68;332],[70;360],[72;48],[74;2]]

## References

  * [1] Dorin Andrica, Titu Andreescu, Titu Andreescu, and Dorin Andrica.  Basic principles in number theory.  Number Theory: Structures, Examples, and Problems, pages 1–12, 2009\.
  * [2] Eckford Cohen.  Nagell’s totient function.  Mathematica Scandinavica, 8(1):55–58, 1960.
  * [3] Pentti Haukkanen and R Sivaramakrishnan.  Nagell’s totient revisited.  Notes on Number Theory and Discrete Mathematics, 4(3):93–100, 1998\.
  * [4] Fred B Holt.  Combinatorics of the gaps between primes.  arXiv preprint arXiv:1510.00743, 2015.
  * [5] Henryk Iwaniec.  On the problem of jacobsthal.  Demonstratio Mathematica, 11(1):225–232, 1978.
  * [6] OEIS Foundation Inc.  The On-Line Encyclopedia of Integer Sequences, 2023.  Published electronically at https://oeis.org.
  * [7] Marius Tarnauceanu.  A generalization of the euler’s totient function.  arXiv preprint arXiv:1312.1428, 2013.
  * [8] Mario Ziller.  On differences between consecutive numbers coprime to primorials.  arXiv preprint arXiv:2007.01808, 2020.


290.0290 Scattering; 170.5660 Raman spectroscopy; 170.6510 Spectroscopy,
tissue diagnostics

# Enhanced deep detection of Raman scattered light by wavefront shaping

Alba M. Paniagua-Diaz  University of Exeter, Stocker Road, Exeter EX4 4QL,
United Kingdom  Adrian Ghita  University of Exeter, Stocker Road, Exeter EX4
4QL, United Kingdom  Tom Vettenburg  University of Exeter, Stocker Road,
Exeter EX4 4QL, United Kingdom  Nick Stone  University of Exeter, Stocker
Road, Exeter EX4 4QL, United Kingdom  Jacopo Bertolotti  University of Exeter,
Stocker Road, Exeter EX4 4QL, United Kingdom  Corresponding author:
<EMAIL_ADDRESS>
###### Abstract

Light scattering limits the penetration depth of non-invasive Raman
spectroscopy in biological media. While safe levels of irradiation may be
adequate to analyze superficial tissue, scattering of the pump beam reduces
the Raman signal to undetectable levels deeper within the tissue. Here we
demonstrate how wavefront shaping techniques can significantly increase the
Raman signal at depth, while keeping the total irradiance constant, thus
increasing the amount of Raman signal available for detection.

##  1 Introduction

Raman spectroscopy enables label-free identification of chemical composition
[1, 2]. This is particularly useful for investigating living biological
tissues, where the unique rotational and vibrational modes of organic
molecules allow non-invasive detection of physiologically important and
disease specific bio-analytes [3]. However, since the spontaneous Raman signal
is directly proportional to the pump intensity that decreases rapidly with
depth in diffusive media due to multiple-scattering, this limits how far into
the tissue a specific molecular target can be detected. Innovative
illumination and detection geometries may improve the signal level [4];
however, the amount of light that can reach the target remains a fundamental
limit. This effectively confines Raman spectroscopy to surface studies of
scattering tissue [5, 6, 7].

Although multiple scattering of light in disordered media can appear random,
the underlying physics is completely deterministic and relatively well
understood [8]. In recent years, wavefront shaping techniques have emerged as
a way to manipulate waves, even through strongly scattering media [9, 10]. In
particular, wavefront shaping allows the focusing of light at a specific
target inside a scattering medium [11]. This makes it possible to concentrate
the pump on the Raman active material, even when it is buried deep inside a
tissue [12]. The limit of this approach is that wavefront shaping in an
unknown multiply scattering structure is typically achieved iteratively, using
the signal as a feedback and gradually improving it [13]. As the Raman signal
is generally weak, an adequate signal-to-noise ratio requires long integration
times. The necessity to repeat the measurement many times makes this approach
slow and limits the maximum enhancement achievable. In particular the
pioneering work by Thompson et al. achieved an increase of the detected Raman
signal by approximately $25\%$, but required at least 10-20 times the time of
a single Raman measurement [12]. Additionally, these approaches are only
useful when there is an initial detectable Raman signal, not addressing the
problem of blind sensing in scattering media.

In this article we show that wavefront-shaping the pump beam to maximize its
penetration depth can overcome the two main limitations of techniques based on
light focusing: speed, and compatibility with blind sensing. Given that in
this case the feedback is provided by the pump and not the Raman signal, there
is no need for prior knowledge of Raman elements. At the same time, due to the
much larger intensity of the pump with respect to the Raman signal, the
integration time in the detector can be much shorter. This enables full
optimization on a much shorter timescale than the typical Raman measurement
[14]. We experimentally show an enhancement of approximately $50\%$ through a
scattering layer with optical density of $\sim 48$, and study how the
achievable enhancement in depth depends on the target position and the
wavefront shaping quality.

##  2 Pump energy distribution and Raman signal generation

The propagation of light intensity in a scattering medium can be described by
the diffusion equation:

$\frac{dI}{dt}=D\nabla^{2}I+S,$ (1)

where $S$ is the source term and $D$ is the diffusion coefficient [8]. For a
source not varying in time and a slab geometry, the steady-state solution for
a point source (or Green’s function) is given by:

$g(z,z_{j})=\frac{I_{0}}{D}\left(\frac{(z+z_{e1})(L+z_{e2}-z_{j})}{L+z_{e2}+z_{e1}}+(z_{j}-z)H(z-z_{j})\right),$
(2)

where $I_{0}$ is the total intensity of the pump, $L$ is the thickness of the
slab, $z_{j}$ is the injection length, representing the position of the point
source, typically on the order of the transport mean free path of the
scattering media $\ell_{t}$, and $H$ is the Heaviside step function. In order
to obtain Eq. 2 it is also necessary to set the boundary conditions. By
imposing the conservation of energy fluxes in the medium one obtains Robin
boundary conditions, which can be recast as $I=0$ at a distance from the edge
of the sample (the extrapolation lengths $z_{e1}$ and $z_{e2}$) [15].

The intensity profile $I(z)$ inside the diffusive slab is then given by the
convolution of $g$ with the source $S$. There are two source functions that
are relevant to the problem we are investigating: an exponentially decaying
source $S(z)=e^{-z/z_{j}}$ due to the exponential decay of ballistic intensity
as propagating through the medium (following Lambert-Beer law), and a point
source $S(z)=\delta(z-z_{j})$, representing the diffusion process of an
element originated at a specific position $z_{j}$. The intensity of the pump
is well described by the exponentially decaying source (blue curve in Fig. 1a,
whereas the intensity originated by a point Raman element, is better described
by the point source (Fig. 1b).

As energy conservation must hold under the assumption of non-absorbing media,
a larger $T$ comes from a smaller fraction of reflected light $R$, which
implies an increase in the intensity inside the medium, and therefore a larger
pump penetration depth. This suggests that, if the total amount of transmitted
light can be increased, the amount of pump light reaching the Raman active
material embedded in the medium should increase proportionally, as would the
generated Raman signal.

Interestingly, the diffusion approximation used to describe light propagation
in scattering media does not take into account the fact that light is a wave.
However, the multiply scattered light paths inside a disordered medium can
interfere, giving rise to a large number of effects, from speckle correlations
[16, 17], the coherent backscattering cone [18, 19], to the presence of open
and closed channels [20]. This last effect is particularly important here, as
it means that, with the right incident wavefront, it is possible to transmit
all the incident light through a scattering medium [21]. In contrast to what
one might expect, maximizing the total transmission does not mean that the
light traverses the sample unhindered. On the contrary, the mode with the
highest transmission is also one that accumulates a large amount of energy
inside the sample [22, 23], and the energy distribution takes an approximately
cosine shape (green curve in Fig. 1a), with a maximum at the center [24].

As shown in Fig. 1a, the diffusion approximation and the open channels
represent the worst and best case scenarios, respectively. The diffusion
solution in a uniform slab (blue curve) has a maximum at roughly one transport
mean free path of depth, but then decreases rapidly with depth, meaning that
not much light is able to reach the deepest parts of the medium. In contrast,
if one could perform perfect wavefront shaping and couple to an open channel
(green curve), the pump distribution would be symmetric and have a maximum at
the center. This is a particularly interesting feature, given that when the
element to detect is in the central regions of the sample, the pump intensity
is generally minimal, and consequently it becomes much more difficult to
detect Raman signal from there [25]. Realistic or experimental wavefront
shaping will produce an intermediate distribution between the open channel and
diffusive extremes [23].

Once the pump reaches the Raman-active material, the Raman signal is generated
and propagates diffusively to the exit of the sample. For simplicity we assume
that the Raman signal is generated by a point source at position $z_{R}$,
resulting in a distribution of the Raman signal given by Eq. 2 with
$z_{j}=z_{R}$ (Fig. 1b). The total amount of diffused light intensity that
exits the medium is given by its gradient at the interface (Fick’s law [26]),
so we can define $T$ and $R$ as the intensity coming out from the transmission
and reflection side of the slab respectively (normalized to the incident
intensity), as [8, 27]:

$T=-\frac{D}{I_{0}}\left.\frac{dI(z)}{dz}\right|_{z=L}\quad\text{and}\quad
R=\frac{D}{I_{0}}\left.\frac{dI(z)}{dz}\right|_{z=0}.$ (3)

Using Eq. 3 we can then calculate the total amount of diffuse Raman signal
that can be collected in transmission ($R_{T}$) and in reflection ($R_{R}$) as
a function of $z_{R}$ when the different pumps are considered (Fig. 1c-d). As
seen in Fig. 1c-d, if the Raman active material is very close to the surface
of the material there is no real advantage from the wavefront shaping
approach. On the other hand, for depths larger than a few transport mean free
paths, we expect a significantly higher signal if we wavefront-shape the pump
light to maximize transmission, particularly for centered elements.

Figure 1: a) Normalized intensity distribution of the pump light when the beam
is not optimized (blue) and when all the incident energy is optimized and
coupled to the fundamental solution of the diffusion equation (green). b)
Intensity distribution of a point Raman element placed at position $z_{R}=10$.
c) Raman scattered light in transmission of a target at position $z_{R}/\ell$,
when the beam is optimized (orange) and when it is not optimized (purple). d)
Raman scattered light in reflection of a target at position $z_{R}/\ell$, when
the beam is optimized (orange) and when it is not optimized (purple). These
results correspond to the solution to diffusion equation for a scattering
medium with the same parameters than our experimental sample, described in
Section 3.

##  3 Wavefront shaping of the pump for maximal transmission

Despite the great interest and efforts put towards fully transmitting the
incident light through scattering media (or coupling to their open channels),
it has not been possible to experimentally achieve it so far, although
substantial increase in the transmitted light has been reported [28, 29, 27,
30]. The main factor preventing the experimental coupling of light to the open
channels is the limited control of degrees of freedom of the medium [31],
which makes the singular values of the transmission matrix follow the
Marchenko-Pastur distribution, typical of uncorrelated matrix elements.

The total number of degrees of freedom at the entrance of the sample can be
well approximated by the number of diffraction limited spots contained in the
illumination area (A), such that: $N\propto\frac{2\pi A}{\lambda^{2}}$, where
$\lambda$ is the wavelength of the illumination source [30]. In our
experimental case, the radius of the illuminated spot at the entrance of the
sample is $R=$22\text{\,}\mathrm{\SIUnitSymbolMicro m}$$ and
$\lambda=$785\text{\,}\mathrm{nm}$$, which makes $N\approx 15500$. However,
due to the limited degrees of control segments of the spatial light modulator,
the number of controlled degrees of freedom at the entrance of the sample is
$N_{C}=3520$. Following from the Marchenko-Pastur distribution [31] the
optimal enhancement in total transmission that can be achieved is given by
[32]:

$\left\langle\frac{T_{op}}{T_{in}}\right\rangle=\left(1+\sqrt{\frac{N_{C}}{M}}\right)^{2}$
(4)

where $M$ is the number of degrees of freedom at the output of the sample (in
the output illuminated area). Assuming light diffusion at approximately
$45^{\circ}$, the number of modes $M$ for our sample (see Section 4), is
approximately $80000$ at the output of the sample. We can thus expect to
increase the total transmission by a factor of $1.46$.

##  4 Materials and Methods

The experimental apparatus is shown in Fig. 2. The pump laser
($1\text{\,}\mathrm{W}$ MOPA, Innovative Photonic Solutions) has its central
wavelength in the near infrared $\lambda=$785\text{\,}\mathrm{nm}$$, to
achieve larger penetration depth in biological tissue. The wavelength region
that allows maximal penetration in the optical regime is roughly between
$700\text{\,}\mathrm{a}$nd $900\text{\,}\mathrm{nm}$ [33, 34] where the
absorption band of water has a broad dip. The pump laser is incident on a
Digital Micromirror Device (DLP 9500, Texas Instruments) spatial light
modulator (SLM) that iteratively adapts the phase profile of the wavefront.
The modulated wavefront is focused on the sample by a microscope objective
(NA=0.9, 100x, dry, Leica), achieving a spot size of
$44\pm$12\text{\,}\mathrm{\SIUnitSymbolMicro m}$$ in diameter. A photo-diode
collects the total transmitted light (mainly from the pump) and utilizes it as
feedback for an iterative algorithm controlling the SLM (see Supplement 2 for
a detailed description of the algorithm). The backscattered Raman signal is
filtered by a dichroic mirror (LPD02-785RU, Semrock), together with a long
pass filter (LP02-785RU-25, Semrock). After the filtering phase, the Raman
light is directed onto a spectrometer (Holospec 1.8i, Kaiser optical) equipped
with a high dispersion grating ($864\text{\,}\mathrm{mm}$, Kaiser Optical) and
a NIR CCD detector (Andor iDus 420, Oxford Instruments). The estimated
spectral resolution of the system is $1.08\text{\,}\mathrm{c}\mathrm{m}^{-1}$
with a $25\text{\,}\mathrm{\SIUnitSymbolMicro m}$ slit, measured with a
calibration atomic line source.

Figure 2: Schematic of the experimental apparatus used to increase total
transmission through a scattering medium whilst the Raman spectra is collected
in reflection. Red arrows represent the pump light at
$785\text{\,}\mathrm{nm}$ and the purple arrow represents the longer
wavelengths generated due to the spontaneous Raman scattered light.

The sample was made of two different materials, a highly scattering layer of
anatase TiO2 (Fisher Scientific UK) of thickness
$L=$29\text{\,}$\pm$2\text{\,}\mathrm{\SIUnitSymbolMicro m}$$ and a second
layer of Calcium Hydroxyapatite (HAP) with a thickness of
$$120\text{\,}$\pm$10\text{\,}\mathrm{\SIUnitSymbolMicro m}$$ (Sigma Aldrich
UK). The layer of TiO2 was chosen because it is a highly scattering material
with very little absorption, which allows us obtain large optical densities
with small thicknesses, in this case $OD=L/\ell_{t}\sim 29/0.6\sim 48$,
comparable to thicknesses of $\sim$5\text{\,}\mathrm{cm}$$ [33, 34] in fatty
biological media, where the transport mean free path is $\sim$
$1\text{\,}\mathrm{mm}$ (the effect of a thicker sample is considered in the
Discussion section). In this article we consider only non-absorbing scattering
media; a generalization to absorbing media would modify Eq. 2 introducing an
exponential decay of the intensity from the source origin, and would change
the shape of the intensity distribution of the open channels [35], but would
not change the physics of the problem. HAP is a calcium phosphate mineral
similar to that found in many hard tissues, and of interest for various
biomedical applications [36], for instance as a marker to detect
calcifications in breast tissue [5]. Fig. 3 shows the Raman spectra for the
anatase TiO2 and HAP materials (panels a and b), and panel c shows the
combined spectra collected by the spectrometer in the experimental reflection
configuration, where we can see the reduced peak from HAP at around
$960\text{\,}\mathrm{c}\mathrm{m}^{-1}$, attenuated by the TiO2 layer. The
spectra were acquired in 5 accumulations of 10 seconds for each acquisition.
The laser power incident on the sample was measured to be
$$9.7\text{\,}$\pm$0.1\text{\,}\mathrm{mW}$$. After removing the offset
intensity from the detector, the recorded Raman spectra were imported to
Mathematica for data post-processing, primarily consisting of background
subtraction (third order polynomial). After background subtraction we
performed a Lorentzian fit to the peak of interest and normalized the values
for simplicity, as shown in Fig. 4. In order to evaluate the increase in the
Raman peak of interest, we compare the integrated area under the peak for the
optimized and non-optimized wavefronts.

Figure 3: Normalized Raman spectra of the different materials of the sample:
a) Anatase TiO2 spectrum, with three main peaks at
$$396\text{\,}\mathrm{,}$$512\text{\,}\mathrm{a}$nd$631\text{\,}\mathrm{c}\mathrm{m}^{-1}$$
b) Calcium Hydroxyapatite (HAP) with the main peak at
$960\text{\,}\mathrm{c}\mathrm{m}^{-1}$ and c) the collected spectrum of the
combined sample of TiO2 and HAP, where we can see a strong signal coming from
the first layer of TiO2 and a weak peak coming from the inner HAP at
$960\text{\,}\mathrm{c}\mathrm{m}^{-1}$, magnified in the inset. The broad
contribution around $1500\text{\,}\mathrm{c}\mathrm{m}^{-1}$ is due to the
fluorescence of the microscope cover slide.

##  5 Results

Using iterative wavefront shaping techniques we increased the total
transmission of the pump light through the scattering medium by a factor
$1.40\pm 0.3$. In Fig. 4a we show the Raman signal intensity corresponding to
the main peak of the subsurface HAP layer, before (red) and after the
wavefront optimization (green). The dots represent the experimental data and
the solid line curves are Lorentzian fits to the data. It can be seen that the
optimization in the pump wavefront results in a 40% stronger Raman scattering
signal.

Both the TiO2 and the HAP layers are composed by a scattering powder, but
since the two refractive indices are very different ($n_{TiO_{2}}\simeq
2.26,n_{\text{HAP}}\simeq 1.6$) most of the scattering is coming from the TiO2
layer, and when optimizing the total transmission we are increasing the pump
intensity in both layers. As the spontaneous Raman signal is proportional to
the pump intensity [37], we expect the increase in the Raman signal collected
from the HAP layer to be roughly linear with the increase in the total
transmission. In Fig. 4b we show the relationship between the increase in
total transmission of the pump and the increase in the intensity of the
collected Raman signal, for different values of the optimization. The best fit
model follows a linear curve of slope 1.07$\pm$ 0.12, showing that to a very
good approximation the increase in pump transmission is linear with the
increase in the collected Raman intensity.

Figure 4: a) Normalized spectral data points of the HAP peak collected in
reflection before (red) and after (green) the wavefront optimization. Dots
represent the experimental data and the solid lines, the Lorentzian fits to
the data. The data in the figure corresponds to an enhancement in the Raman
signal of 41%, which was achieved with an increase in total transmission of
39%. b) Increase of the Raman signal against the increase in the total pump
transmission. It is possible to see how the data points follow a linear trend
(in green) with a slope of 1.07 $\pm$ 0.12.

###  5.1 Estimated increase in penetration depth

Increasing the amount of generated Raman signal means that one can detect
samples from deeper into a scattering medium. To quantify how much, we assume
that a Raman active medium at a depth $z_{R}$ produces an acceptable signal to
noise ratio, and normalize to 1 the intensity of the signal produced, which
will then diffuse, exit the scattering slab, and reach our detector (blue
dashed curve in Fig. 5a,c. If wavefront shaping of the pump enhances the Raman
light produced by a factor $\beta$ the active medium can be at a deeper
position $z_{R}^{0}$ and still produce the same amount of measurable signal
(green solid curve in Fig. 5a,c).

Figure 5: a) Intensity distributions of Raman elements at two different
positions giving rise to the same forward emission. The dashed blue curve
represents the intensity distribution of a Raman element excited with a non-
optimized pump at position $z_{R}$. The green curve represents the intensity
distribution of a Raman element at a position $z_{R}^{O}$ excited with an
optimized pump (with 1.5 times higher intensity), farther away from the back-
surface ($L=29\mu m$), yet resulting in the same forward emission. b)
Normalized increase in the distance at which an optimized Raman element would
give rise to the same forward emission as a non-optimized one, dependent on
the position of the Raman element ($z_{R}$). Note that the vertical axis is in
logarithmic scale. c) Intensity distribution of the optimized and non-
optimized Raman elements resulting in the same backward emission. d)
Normalized increase in the distance at which the optimized Raman element
should be in order to give the same backwards emission as the non-optimized
emission.

In order to generate the same output Raman signal, according to Eq. 2 and Eq.
3 the two distributions of intensity need to have the same gradient at the
edges of the sample ($z=L$ in transmission, as in Fig. 5a and $z=0$ in
reflection, as in Fig. 5c. Calling $d=\left|z_{R}^{O}-z_{R}\right|$ we obtain

$\frac{I(z_{R})}{Ds_{L}}=\frac{\beta I(z_{R}-d)}{Ds_{L}+d}\,,$ (5)

where $Ds_{L}=L-z_{R}+z_{e2}$ and $Ds_{L}^{O}=L-z_{R}^{O}+z_{e2}$.

Solving Eq. 5 for the distance $d$, we obtain that the extra distance at which
a Raman element with the optimized intensity can be placed to generate the
same measurable signal is given by:

$\displaystyle d(z_{R})=\frac{-1}{2\beta}\left(-\beta
G(z_{R})+\frac{C(z_{R})}{Ds_{L}(z_{R})}\right)$ (6)
$\displaystyle+\frac{1}{2\beta}\sqrt{\left(\beta
G(z_{R})-\frac{C(z_{R})}{Ds_{L}(z_{R})}\right)^{2}-4\beta(C(z_{R})(1-\beta))}$

where $G(z_{R})=-L+z_{e1}-z_{e2}+2z_{R}$ and $C(z_{R})\leavevmode\nobreak\
=\leavevmode\nobreak\ (z_{R}+z_{e1})\cdot(L+z_{e2}-z_{R})$.

In Fig. 5b we plot (on logarithmic scale) the normalized increase in the
distance to the output surface ($\frac{d(z_{R})}{L-z_{R}}$), achieved by the
extra pump intensity as a function of $z_{R}$. It is interesting to note that
when the Raman element is around the central region of the sample, which is,
by conventional approaches, the least accessible region [25], the optimized
pump is capable of achieving an extra penetration depth between $30\text{\,}$
and $100\text{\,}$%. Fig. 5d represents the equivalent case to Fig. 5b but
when considering the Raman intensity collected in a reflection geometry, which
leads to a very similar result.

##  6 Discussion

The technique presented and demonstrated in this work allows to increase the
amount of pump energy density inside a scattering medium, thus increasing the
amount of Raman signal produced by a sample buried deep inside it, without
increasing the incident flux. As the optimization is done on the pump, instead
of the Raman signal, this process can take a much shorter time than the
measurement of the Raman signal itself, and can be in principle fast enough to
be performed on living samples [14]. The transmission geometry used here was
chosen for simplicity; however, there is no fundamental problem that prevents
to use the more common epi geometry, or even combining this technique with
spatially offset Raman spectroscopy [4, 5]. The main practical limitation of
this approach is that the maximum enhancement of the Raman signal that can be
obtained decreases with the thickness of the sample. In fact, $M$ is
proportional to the illuminated area $A\propto L^{2}$. Whilst the number of
controlled elements $N_{C}$ is limited by the spatial light modulator, $M$
increases with the thickness and the total enhancement in total transmission
decreases, given by Eq. 4. When $M>>N_{C}$ Eq. 4 scales as approximately
$1+2\sqrt{\nicefrac{{N_{C}}}{{M}}}$. The decrease in the maximum enhancement
can be counterbalanced by increasing the number of input modes, $N_{C}$, that
is optimized.

Both the derivations and the experiments presented here assume a negligible
absorption. If this is not the case it becomes even more difficult to detect a
signal coming from the middle of the system if no wavefront shaping is used
[25, 38], but it is nevertheless still possible to optimize the pump signal to
enhance the amount of energy inside the scattering slab, given that this
approach is only based on the modification of the elastically scattered light.

##  7 Conclusions

We have shown that the signal coming from a Raman active material buried deep
inside a scattering medium can be enhanced by maximizing the total pump
transmission via wavefront shaping. This is due to the fact that higher
transmission modes store more energy inside the scattering medium than modes
with low transmission [22]. By performing the wavefront shaping on the pump
instead of the Raman signal, the process can be completed on a timescale much
shorter than the Raman signal measurement itself [14]. We experimentally shown
a $\sim 48\%$ increase of the Raman signal in a well controlled and
characterized system ($\sim 30\mu$m thick TiO2 layer with OD $\sim 50$ hiding
a HAP sample). These results show the potential of wavefront shaping
techniques for enhancing the sensitivity of detection for biomedical
applications such as the measurement of breast calcifications and bone quality
using deep Raman approaches. We expect that this approach can enable even
deeper readout of surface enhanced Raman scattering (SERS) labeled
nanoparticles and surface enhanced spatial offset Raman spectroscopy (SESORS)
[39].

## Funding Information

A. M. Paniagua-Diaz acknowledges support from EPSRC (EP/L015331/1) through the
Centre of Doctoral Training in Metamaterials (XM2). A. Ghita and N. Stone
contribution was funded by EPSRC [EP/P012442/1]. J. Bertolotti acknowledges
support from the Leverhulme Trust’s Philip Leverhulme Prize and the Leverhulme
Trust (No. RPG-2016-129).

The research data supporting this publication are openly available from [40]

## References

  * [1] C. V. Raman and K. S. Krishnan, “A new type of secondary radiation,” Nature 121, 501 (1928).
  * [2] P. Graves and D. Gardiner, _Practical Raman Spectroscopy_ (Springer, 1989).
  * [3] A. Mahadevan-Jansen and R. R. Richards-Kortum, “Raman spectroscopy for the detection of cancers and precancers,” Journal of Biomedical Optics 1, 31–70 (1996).
  * [4] P. Matousek and N. Stone, “Development of deep subsurface raman spectroscopy for medical diagnosis and disease monitoring,” Chemical Society Reviews 45, 1794–1802 (2016).
  * [5] P. Matousek and N. Stone, “Emerging concepts in deep Raman spectroscopy of biological tissue,” Analyst 134, 1058–1066 (2009).
  * [6] A. Ghita, P. Matousek, and N. Stone, “Exploring the effect of laser excitation wavelength on signal recovery with deep tissue transmission Raman spectroscopy,” The Analyst 141, 5738–5746 (2016).
  * [7] K. Kong, C. Kendall, N. Stone, and I. Notingher, “Raman spectroscopy for medical diagnostics — From in-vitro biofluid assays to in-vivo cancer detection,” Advanced Drug Delivery Reviews 89, 121–134 (2015).
  * [8] E. Akkermans and G. Montambaux, _Mesoscopic Physics of Electrons and Photons_ (Cambridge University Press, 2007).
  * [9] I. M. Vellekoop and A. P. Mosk, “Focusing coherent light through opaque strongly scattering media,” Opt. Lett. 32, 2309 (2007).
  * [10] A. P. Mosk, A. Lagendijk, G. Lerosey, and M. Fink, “Controlling waves in space and time for imaging and focusing in complex media,” Nature photonics 6, 283 (2012).
  * [11] I. M. Vellekoop, E. Van Putten, A. Lagendijk, and A. Mosk, “Demixing light paths inside disordered metamaterials,” Optics express 16, 67–80 (2008).
  * [12] J. V. Thompson, G. A. Throckmorton, B. H. Hokr, and V. V. Yakovlev, “Wavefront shaping enhanced Raman scattering in a turbid medium,” Optics Letters 41, 1769 (2016).
  * [13] I. M. Vellekoop, “Feedback-based wavefront shaping,” Optics express 23, 12189–12206 (2015).
  * [14] D. B. Conkey, A. M. Caravaca-Aguirre, and R. Piestun, “High-speed scattering medium characterization with application to focusing light through turbid media,” Optics express 20, 1733–1740 (2012).
  * [15] J. X. Zhu, D. J. Pine, and D. A. Weitz, “Internal reflection of diffusive light in random media,” Physical Review A 44, 3948–3959 (1991).
  * [16] R. Berkovits and S. Feng, “Correlations in coherent multiple scattering,” Phys. Rep. 238, 135 – 172 (1994).
  * [17] J. F. de Boer, M. P. van Albada, and A. Lagendijk, “Transmission and intensity correlations in wave propagation through random media,” Phys. Rev. B 45, 658–666 (1992).
  * [18] M. P. V. Albada and A. Lagendijk, “Observation of Weak Localization of Light in a Random Medium,” Physical Review Letters 55, 2692–2695 (1985).
  * [19] P.-E. Wolf and G. Maret, “Weak Localization and Coherent Backscattering of Photons in Disordered Media,” Physical Review Letters 55, 2696–2699 (1985).
  * [20] C. W. J. Beenakker, “Random-matrix theory of quantum transport,” Reviews of modern physics 69, 731 (1997).
  * [21] O. Dorokhov, “On the coexistence of localized and extended electronic states in the metallic phase,” Solid state communications 51, 381–384 (1984).
  * [22] W. Choi, A. P. Mosk, Q.-H. Park, and W. Choi, “Transmission eigenchannels in a disordered medium,” Physical Review B 83, 134207 (2011).
  * [23] M. Davy, Z. Shi, J. Park, C. Tian, and A. Z. Genack, “Universal structure of transmission eigenchannels inside opaque media,” Nature communications 6, 6893 (2015).
  * [24] M. Koirala, R. Sarma, H. Cao, and A. Yamilov, “Inverse design of perfectly transmitting eigenchannels in scattering media,” Phys. Rev. B 96, 054209 (2017).
  * [25] M. Z. Vardaki, B. Gardner, N. Stone, and P. Matousek, “Studying the distribution of deep raman spectroscopy signals using liquid tissue phantoms with varying optical properties,” Analyst 140, 5112–5119 (2015).
  * [26] A. Fick, “Uber diffusion,” Poggendorff’s Annalen der Physik und Cheimie 94, 59 (1855).
  * [27] O. S. Ojambati, H. Yilmaz, A. Lagendijk, A. P. Mosk, and W. L. Vos, “Coupling of energy into the fundamental diffusion mode of a complex nanophotonic medium,” New Journal of Physics 18 (2016).
  * [28] M. Kim, Y. Choi, C. Yoon, W. Choi, J. Kim, Q.-H. Park, and W. Choi, “Maximal energy transport through disordered media with the implementation of transmission eigenchannels,” Nature photonics 6, 581–585 (2012).
  * [29] W. Choi, M. Kim, D. Kim, C. Yoon, C. Fang-Yen, Q.-H. Park, and W. Choi, “Preferential coupling of an incident wave to reflection eigenchannels of disordered media,” Scientific reports 5 (2015).
  * [30] I. M. Vellekoop and A. P. Mosk, “Universal Optimal Transmission of Light Through Disordered Materials,” Physical Review Letters 101, 120601 (2008).
  * [31] A. Goetschy and A. Stone, “Filtering random matrices: the effect of incomplete channel control in multiple scattering,” Physical review letters 111, 063901 (2013).
  * [32] V. A. Marcenko and L. A. Pastur, “Distribution of eigenvalues for some sets of random matrices,” Mathematics of the USSR-Sbornik 1, 457–483 (1967).
  * [33] S. L. Jacques, “Optical properties of biological tissues: a review,” Physics in Medicine and Biology 58, R37–R61 (2013).
  * [34] T. Vo-Dinh, _Biomedical Photonics Handbook: Fundamentals, Devices and Techniques_ , vol. 1 (CRC press, 2014).
  * [35] R. Sarma, A. Yamilov, S. F. Liew, M. Guy, and H. Cao, “Control of mesoscopic transport by modifying transmission channels in opaque media,” Physical Review B 92, 214206 (2015).
  * [36] M. Mucalo, _Hydroxyapatite (HAp) for biomedical applications_ (Elsevier, 2015).
  * [37] J. Cheng and X. S. Xie, _Coherent Raman scattering microscopy_ (CRC press, 2016).
  * [38] M. Z. Vardaki, P. Matousek, and N. Stone, “Characterisation of signal enhancements achieved when utilizing a photon diode in deep raman spectroscopy of tissue,” Biomedical optics express 7, 2130–2141 (2016).
  * [39] N. Stone, M. Kerssens, G. R. Lloyd, K. Faulds, D. Graham, and P. Matousek, “Surface enhanced spatially offset raman spectroscopic (sesors) imaging–the next dimension,” Chemical Science 2, 776–780 (2011).
  * [40] http://doi.org/10.5281/zenodo.1319374.

Mendel


###### Proof.

Consider (14.5). First, note that

$f^{\prime}(\zeta)=\frac{df(\zeta)}{d\zeta}=\sum\limits_{m\geq
0}(m+1)\;\beta_{m}\zeta^{m}.$

By using the identification (10.14) and and the $L_{W}(-1)$-properties (12.1)
and (12.6) we obtain

$\displaystyle\langle w^{\prime},\Phi\left(dw_{1}^{\mbox{\rm wt}\
(v_{1})}\otimes v_{1},w_{1};\ldots;dw_{n}^{\mbox{\rm wt}\ (v_{n})}\otimes
v_{n},w_{n}\right)\rangle$ $\displaystyle=\langle
w^{\prime},f^{\prime}(\zeta)^{-L_{W}(0)}\;P(f(\zeta))\;\Phi\left(\xi_{1}\otimes
v_{1},z_{1};\ldots;\xi_{n}\otimes v_{n},z_{n}\right)\rangle$
$\displaystyle\qquad=\langle
w^{\prime},\left(\frac{df(\zeta)}{d\zeta}\right)^{-L_{W}(0)}\;\Phi\left(dw_{1}^{\mbox{\rm
wt}\ (v_{1})}\otimes v_{1},\sum\limits_{m\geq
0}(m+1)\;\beta_{m}z_{1}^{m+1};\ldots;\right.$
$\displaystyle\left.\left.\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad
dw_{n}^{\mbox{\rm wt}\ (v_{n})}\otimes v_{n},\sum\limits_{m\geq
0}(m+1)\;\beta_{m}z_{n}^{m+1}\right)\rangle\right)$ $\displaystyle=\langle
w^{\prime},\left(\frac{df(\zeta)}{d\zeta}\right)^{-L_{W}(0)}\;\Phi\left(dw_{1}^{\mbox{\rm
wt}\ (v_{1})}\otimes v_{1},\left(\frac{df(z_{1})}{dz_{1}}\right)z_{1};\right.$
$\displaystyle\left.\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\ldots;dw_{n}^{\mbox{\rm
wt}\ (v_{n})}\otimes
v_{n},\left(\frac{df(z_{n})}{dz_{n}}\right)z_{n}\right)\rangle$
$\displaystyle\qquad=\langle
w^{\prime},\Phi\left(\left(\frac{df(z_{1})}{dz_{i}}\;dw_{1}\right)^{-\mbox{\rm
wt}\ (v_{1})}\otimes v_{1},z_{1};\right.$
$\displaystyle\left.\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\ldots;\left(\frac{df(z_{n})}{dz_{n}}\;dw_{n}\right)^{-\mbox{\rm
wt}\ (v_{n})}\otimes v_{n},z_{n}\rangle\right)$ $\displaystyle\qquad=\langle
w^{\prime},\Phi\left(dz_{1}^{\mbox{\rm wt}\ (v_{1})}\otimes
v_{1},z_{1};\ldots;dz_{n}^{\mbox{\rm wt}\ (v_{n})}\otimes
v_{n},z_{n}\right)\rangle.$

Thus we proved the Lemma. ∎

The elements $\Phi(v_{1},z_{1};\ldots;v_{n},z_{n})$ of
$C^{n}_{k}(V,\mathcal{W},\mathcal{F})$ belong to the space
$\mathcal{W}_{z_{1},\ldots,z_{n}}$ and assumed to be composable with a set of
vertex operators $\omega_{W}(v_{j}^{\prime},c_{j}(p_{j}^{\prime}))$, $1\leq
j\leq k$. Vertex operators $\omega_{W}(dc(p)^{\mbox{\rm wt}\
(v^{\prime})}\otimes v_{j}^{\prime},c_{j}(p_{j}^{\prime}))$ constitute
particular examples of mapping of $C^{1}_{\infty}(V,\mathcal{W},\mathcal{F})$
and, therefore, are invariant with respect to (14.4). Thus, the construction
of spaces (3.7) is invariant under the action of the group ∎

Finally, we give a proof of Lemma 3.

###### Proof.

Since $n$ is the same for both spaces in (3.12), it only remains to check that
the conditions for (13.3) and (13.5) for $\Phi(v_{1},c_{j}(p_{1});$ $\ldots;$
$v_{n},c_{j}(p_{n}))$ of composibility Definition 13 with vertex operators are
stronger for ${C}_{m}^{n}(V,\mathcal{W},\mathcal{U},\mathcal{F})$ then for
${C}_{m-1}^{n}(V,\mathcal{W},\mathcal{U},\mathcal{F})$. In particular, in the
first condition for (13.3) in definition of composability 35 the difference
between the spaces in (3.12) is in indeces. Consider (14.1). For
${C}_{m-1}^{n}(V,\mathcal{W},\mathcal{U},\mathcal{F})$, the summations in
idexes ${k_{1}}={l_{1}+\cdots+l_{i-1}+1}$, …,
${k_{i}}={l_{1}+\cdots+l_{i-1}+l_{i}}$, for the coordinates $c_{j}(p_{1})$, …,
$c_{j}(p_{n})$ with $l_{1},\dots,l_{n}\in\mathbb{Z}_{+}$, such that
$l_{1}+\cdots+l_{n}=n+(m-1)$, and vertex algebra elements
$v_{1},\dots,v_{n+(m-1)}$ are included in summation for indexes for
${C}_{m}^{n}(V,\mathcal{W},\mathcal{U},\mathcal{F})$. The conditions for the
domains of absolute convergency for $\mathcal{M}$, i.e.,
$|c_{l_{1}+\cdots+l_{i-1}+p}-\zeta_{i}|+|c_{l_{1}+\cdots+l_{j-1}+q}-\zeta_{i}|<|\zeta_{i}-\zeta_{j}|$,
for $i$, $j=1,\dots,k$, $i\neq j$, and for $p=1,\dots,l_{i}$ and
$q=1,\dots,l_{j}$, for the series (13.3) are more restrictive then for $m-1$.
The conditions for $\mathcal{I}^{n}_{m-1}(\Phi)$ to be extended analytically
to a rational function in $(c_{1}(p_{1})$, $\dots$,
$c_{n+(m-1)}(p_{n+(m-1)}))$, with positive integers
$N^{n}_{m-1}(v_{i},v_{j})$, depending only on $v_{i}$ and $v_{j}$ for
$i,j=1,\dots,k$, $i\neq j$, are included in the conditions for
$\mathcal{I}^{n}_{m}(\Phi)$.

Similarly, the second condition for (13.5), of is absolute convergency and
analytical extension to a rational function in
$(c_{1}(p_{1}),\dots,c_{m+n}(p_{m+n}))$, with the only possible poles at
$c_{i}(p_{i})=c_{j}(p_{j})$, of orders less than or equal to
$N^{n}_{m}(v_{i},v_{j})$, for $i,j=1,\dots,k$, $i\neq j$, for (13.5) when
$c_{i}(p_{i})\neq c_{j}(p_{j})$, $i\neq j$ $|c_{i}(p_{i})|>|c_{k}(p_{k})|>0$
for $i=1,\dots,m$, and $k=m+1,\dots,m+n$ includes the same condition for
$\mathcal{J}^{n}_{m-1}(\Phi)$. Thus we obtain the conclusion of Lemma. ∎

## References

  * [1] Di Francesco, P., Mathieu, P., Sénéchal, D.: Conformal Field Theory. Graduate Texts in Contemporary Physics, Springer 1996
  * [2] Ya. V. Bazaikin, A. S. Galaev. Losik classes for codimension one foliations, Mathematics of Jussieu (2021) doi:10.1017/S1474748020000596.
  * [3] Ya. V. Bazaikin, A. S. Galaev, and P. Gumenyuk. Non-diffeomorphic Reeb foliations and modified Godbillon-Vey class, arXiv:1912.01267. Math. Z. (2021). https://doi.org/10.1007/s00209-021-02828-1
  * [4] D. Ben-Zvi and E. Frenkel Vertex algebras on algebraic curves. American Mathematical Society, 2 edition, 2004.
  * [5] R. Bott, Lectures on characteristic classes and foliations. Springer LNM 279 (1972), 1–94.
  * [6] R. Bott and A. Haefliger, On characteristic classes of $\Gamma$-foliations, Bull. Amer. Math. Soc. 78 (1972), 1039–1044.
  * [7] R. Bott, G. Segal The cohomology of the vector fields on a manifold. Topology. V. 16, Issue 4, 1977, Pages 285–298.
  * [8] M. Crainic and I. Moerdijk, ${\rm\check{C}}$ech-De Rham theory for leaf spaces of foliations. Math. Ann. 328 (2004), no. 1–2, 59–85.
  * [9] B. A. Dubrovin, A. T. Fomenko, and S. P. and Novikov. Modern geometry: methods and applications. Graduate Texts in Mathematics, 93. Springer-Verlag, New York, 1992.
  * [10] I. Frenkel, Y. Huang and J. Lepowsky, On axiomatic approaches to vertex operator algebras and modules, Memoirs American Math. Soc. 104, 1993.
  * [11] Ph. Francesco, P. Mathieu, and D. Senechal. Conformal Field Theory. Graduate Texts in Contemporary Physics. 1997.
  * [12] D. B. Fuks, Cohomology of infinite-dimensional Lie algebras, Contemporary Soviet Mathematics, Consultunt Bureau, New York, 1986.
  * [13] D. B. Fuchs, Characteristic classes of foliations. Russian Math. Surveys, 28 (1973), no. 2, 1–16.
  * [14] A. S. Galaev Comparison of approaches to characteristic classes of foliations, arXiv:1709.05888.
  * [15] E. Ghys L’invariant de Godbillon-Vey. Seminaire Bourbaki, 41–eme annee, n 706, S. M. F. Asterisque 177–178 (1989).
  * [16] I. M. Gelfand and D. B. Fuks, Cohomologies of the Lie algebra of vector fields on the circle, Funktional. Anal, i Prilozen. 2 (1968), no. 3, 32-52; ibid. 4 (1970), 23-32.
  * [17] I. M. Gelfand and D. B. Fuks, Cohomologies of the Lie algebra of tangent vector fields of a smooth manifold. I, II, Funktional. Anal, i Prilozen. 3 (1969), no. 3, 32-52; ibid. 4 (1970), 23-32.
  * [18] I. M. Gel’fand and D. B. Fuks, Cohomology of the Lie algebra of formal vector fields, Izv. Akad. Nauk SSSR Ser. Mat. 34 (1970), 322-337, Math. USSR-Izv. 4 (1970), 327-342.
  * [19] R. C. Gunning. Lectures on Riemann surfaces , Princeton Univ. Press, (Princeton, 1966).
  * [20] R. C. Gunning. Lectures on Vector Bundles Over Riemann Surfaces. Princeton University Press, 1967
  * [21] Y.-Zh. Huang, A cohomology theory of grading-restricted vertex algebras, Comm. Math. Phys. 327 (2014), no. 1, 279–307.
  * [22] Y.-Zh. Huang Differential equations and conformal field theories. Nonlinear evolution equations and dynamical systems, 61–71, World Sci. Publ., River Edge, NJ, 2003.
  * [23] Y.-Zh. Huang A cohomology theory of grading-restricted vertex algebras. Comm. Math. Phys. 327 (2014), no. 1, 279–307.
  * [24] Y.-Zh. Huang, The first and second cohomologies of grading-restricted vertex algebras, Communications in Mathematical Physics volume 327, 261–278 (2014)
  * [25] Y.-Zh. Huang, Two-dimensional conformal geometry and vertex operator algebras, Progress in Mathematics, Vol. 148, Birkhäuser, Boston, 1997.
  * [26] P. Iglesias-Zemmour. Diffeology, Mathematical Surveys and Monographs Volume: 185; 2013; 439 pp.
  * [27] V. Kac: Vertex Operator Algebras for Beginners, University Lecture Series 10, AMS, Providence 1998.
  * [28] D. Kotschick: Godbillon-Vey invariants for families of foliations. Symplectic and contact topology: interactions and perspectives (Toronto, ON/Montreal, QC, 2001), 131–144, Fields Inst. Commun., 35, Amer. Math. Soc., Providence, RI, 2003.
  * [29] Krichever I.M., S. P. Novikov, Algebras of Virasoro type, Riemann surfaces and the structures of soliton theory (Russian), Funktsional. Anal, i Prilozhen. 21 (1987), no. 2, 46-63.
  * [30] Krichever I.M., S. P. Novikov, Algebras of Virasoro type, Riemann surfaces and strings in Minkowski space (Russian), Funktsional. Anal, i Prilozhen. 21 (1987), no. 4, 47-61, 96,
  * [31] Krichever I.M., S. P. Novikov, Algebras of Virasoro type, the energy-momentum tensor, and operator expansions on Riemann surfaces (Russian), Funktsional. Anal, i Prilozhen. 23 (1989), no. 1, 24-40, English transl., Funct. Anal. Appl. 23 (1989), no. 1, 19-33.
  * [32] S. Lang. Elliptic functions. With an appendix by J. Tate. Second edition. Graduate Texts in Mathematics, 112. New York: Springer-Verlag, 1987
  * [33] Losik, M. V.: Orbit spaces and leaf spaces of foliations as generalized manifolds, arXiv:1501.04993.
  * [34] H. B. Lawson, Foliations. Bull. Amer. Math. Soc. 80 (1974), no. 3, 369–418.
  * [35] J. I. Liberati: Cohomology of vertex algebras. J. Algebra 472 (2017), 259–272.
  * [36] M. V. Losik. Orbit spaces and leaf spaces of foliations as generalized manifolds, arXiv:1501.04993.
  * [37] F. Malikov, V. Schechtman, A. Vaintrob, Chiral de Rham complex. Comm. Math. Phys. 204 (1999), no. 2, 439–473.
  * [38] S. P. Novikov. The topology of foliations. (Russian) Trudy Moskov. Mat. Obsch. 14 1965 248–278.
  * [39] S. P. Novikov. Topology of generic Hamiltonian foliations on Riemann surfaces. Mosc. Math. J. 5 (2005), no. 3, 633–667, 743.
  * [40] S. P. Novikov. Topology of Foliations given by the real part of holomor- phic one-form, preprint, 2005, arXive math.GT/0501338.
  * [41] A. M. Vinogradov. Cohomological analysis of partial differential equations and secondary calculus. Translations of Mathematical Monographs, 204. American Mathematical Society, Providence, RI, 2001. xvi+247.
  * [42] F. Qi, Representation theory and cohomology theory of meromorphic open string vertex algebras, Ph.D. dissertation, (2018).
  * [43] Razumov, A. V.; Saveliev, M. V. Lie groups, differential geometry, and nonlinear integrable systems. Nonassociative algebra and its applications (Sao Paulo, 1998), 32–336, Lecture Notes in Pure and Appl. Math., 211, Dekker, New York, 2000.
  * [44] Schlichenmaier, M. Krichever-Novikov type algebras. An introduction. Lie algebras, Lie superalgebras, vertex algebras and related topics, 181-220, Proc. Sympos. Pure Math., 92, Amer. Math. Soc., Providence, RI, 2016.
  * [45] Schlichenmaier, M., Krichever-Novikov algebras for more than two points, Lett. Math. Phys. 19(1990), 15-165.
  * [46] Krichever-Novikov algebras for more than two points: explicit generators, Lett. Math. Phys. 19(1990), 327-336.
  * [47] G. Segal, The definition of conformal field theory, in: Differential geometrical methods in theoretical physics (Como, 1987), NATO Adv. Sci. Inst. Ser. C Math. Phys. Sci., 250, Kluwer Acad. Publ., Dordrecht, 1988, 165–171.
  * [48] G. B. Segal, Two-dimensional conformal field theories and modular functors, in: Proceedings of the IXth International Congress on Mathematical Physics, Swansea, 1988, Hilger, Bristol, 1989, 22–37.
  * [49] W. Thurston, Non-cobordant foliations on $S^{3}$. Bulletin Amer. Math. Soc. 78 (1972), 511–514.
  * [50] A. Tsuchiya, K. Ueno, and Y. Yamada, Y.: Conformal field theory on universal family of stable curves with gauge symmetries, Adv. Stud. Pure. Math. 19 (1989), 459–566.
  * [51] C. Weibel. An introduction to homological algebras, Cambridge Studies in Adv. Math., Vol. 38, Cambridge University Press, Cambridge, 1994.
  * [52] A. Yamada, A.. Precise variational formulas for abelian differentials. Kodai Math.J. 3 (1980) 114–143.
  * [53] Y. Zhu. Modular invariance of characters of vertex operator algebras. J. Amer. Math. Soc. 9(1), 237-302
  * [54] Vinogradov, A. M. Cohomological analysis of partial differential equations and secondary calculus. Translations of Mathematical Monographs, 204. American Mathematical Society, Providence, RI, 2001. xvi+247.