Skip to content

Commit 9e8d96d

Browse files
authored
Merge pull request #4 from kolosovpetro/MATH-81
MATH-81
2 parents 422f3f0 + cc0a54c commit 9e8d96d

17 files changed

+218
-99
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.3] - 2024-10-18
9+
10+
## Changed
11+
12+
- Add build scripts
13+
- Add mathematica program
14+
- Add table for seventh powers
15+
- Move figures to separate folder
16+
817
## [1.0.2] - 2024-09-25
918

1019
## Changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
(* Power 0^0 should equal 1 by definition *)
2+
Unprotect[Power];
3+
Power[0 | 0., 0 | 0.] = 1;
4+
Protect[Power];
5+
(* This Mathematica code was created as supplementary file to arXiv:1603.02468 *)
6+
(* The code produces the solutions of system (2.4), page 8, for m=0,...,11. Date: 06/05/2018 *)
7+
(* Original file is placed at https://kolosovpetro.github.io/mathematica_codes/solutions_system_2_4.txt *)
8+
ClearAll[M];
9+
ClearAll[A];
10+
ClearAll[T];
11+
Off[Solve::svars];
12+
M[m_, n_, k_] := Sum[A[m, j]*(n - k)^j*k^j, {j, 0, m}];
13+
T[m_] := Solve[{
14+
Sum[M[m, 1, k], {k, 0, 0}] == 1^(2 m + 1),
15+
Sum[M[m, 2, k], {k, 0, 1}] == 2^(2 m + 1),
16+
Sum[M[m, 3, k], {k, 0, 2}] == 3^(2 m + 1),
17+
Sum[M[m, 4, k], {k, 0, 3}] == 4^(2 m + 1),
18+
Sum[M[m, 5, k], {k, 0, 4}] == 5^(2 m + 1),
19+
Sum[M[m, 6, k], {k, 0, 5}] == 6^(2 m + 1),
20+
Sum[M[m, 7, k], {k, 0, 6}] == 7^(2 m + 1),
21+
Sum[M[m, 8, k], {k, 0, 7}] == 8^(2 m + 1),
22+
Sum[M[m, 9, k], {k, 0, 8}] == 9^(2 m + 1),
23+
Sum[M[m, 10, k], {k, 0, 9}] == 10^(2 m + 1),
24+
Sum[M[m, 11, k], {k, 0, 10}] == 11^(2 m + 1),
25+
Sum[M[m, 12, k], {k, 0, 11}] == 12^(2 m + 1)},
26+
{A[m, 0], A[m, 1], A[m, 2], A[m, 3], A[m, 4], A[m, 5], A[m, 6],
27+
A[m, 7], A[m, 8], A[m, 9], A[m, 10], A[m, 11], A[m, 12]}];
28+
29+
(* Print a list of solutions as triangle, solutions for m=0,1,...,5, five initial rows of sequence A302971 *)
30+
31+
Column[Table[T[m], {m, 0, 11}], Center]
32+
33+
(* We can reproduce a particular set of solution for integer m <= 11 *)
34+
(* By execution T[m] in Mathematica *)
35+
(* If it's necessary to produce terms for m>11, one has to add the sums to definition of T[m_] solving it for A[m+1,t],(m+1)^(2m+1);A[m+2,t],(m+2)^(2m+1);....;A[m+k,t],(m+k)^(2m+1). *)

out/PolynomialIdentityInvolvingBTandFaulhaber.blg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
This is BibTeX, Version 0.99d
22
Capacity: max_strings=200000, hash_size=200000, hash_prime=170003
3-
The top-level auxiliary file: PolynomialIdentityInvolvingBTandFaulhaber.aux
3+
The top-level auxiliary file: E:\RiderProjects\04_LATEX\PolynomialIdentityInvolvingBTandFaulhaber\out/PolynomialIdentityInvolvingBTandFaulhaber.aux
44
Reallocating 'name_of_file' (item size: 1) to 6 items.
55
The style file: unsrt.bst
66
Reallocating 'name_of_file' (item size: 1) to 42 items.
77
Database file #1: PolynomialIdentityInvolvingBTandFaulhaber.bib
88
You've used 14 entries,
99
1791 wiz_defined-function locations,
10-
520 strings with 6325 characters,
10+
521 strings with 6510 characters,
1111
and the built_in function-call counts, 2062 in all, are:
1212
= -- 178
1313
> -- 63
Binary file not shown.

src/Build-Latex.ps1

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
param (
2+
[string]$OutputDirectory = "../out"
3+
)
4+
5+
Write-Output "Setting working directory to PSScriptRoot: $PSScriptRoot"
6+
Set-Location -Path $PSScriptRoot
7+
8+
Write-Output "=============================================================================="
9+
10+
Write-Output "Determining the root latex file to build ..."
11+
$LatexFileName = (Get-ChildItem -Filter "*.tex" | Select-Object -First 1).BaseName
12+
Write-Output "Latex file: $LatexFileName"
13+
14+
$OutputDirectoryAbsPath = (Resolve-Path $OutputDirectory).Path
15+
$LatexFileAbsPath = (Resolve-Path "$LatexFileName.tex").Path
16+
$AuxDirectoryAbsPath = $OutputDirectoryAbsPath
17+
18+
Write-Output "=============================================================================="
19+
20+
Write-Output "Compiling $LatexFileName first time... "
21+
Write-Output "Latex file: $LatexFileAbsPath"
22+
Write-Output "Output directory: $OutputDirectoryAbsPath"
23+
Write-Output "Aux directory: $AuxDirectoryAbsPath"
24+
pdflatex -file-line-error -interaction="nonstopmode" -synctex="1" -output-format="pdf" `
25+
-output-directory="$OutputDirectoryAbsPath" `
26+
-aux-directory="$AuxDirectoryAbsPath" $LatexFileAbsPath
27+
28+
Write-Output "=============================================================================="
29+
30+
Write-Output "Compiling bibtex ... "
31+
$WorkingDirectoryForBibtex = "$OutputDirectoryAbsPath/$LatexFileName"
32+
Write-Output "Working directory for bibtex: $WorkingDirectoryForBibtex"
33+
bibtex "$WorkingDirectoryForBibtex"
34+
35+
Write-Output "=============================================================================="
36+
37+
Write-Output "Compiling $LatexFileName second time... "
38+
Write-Output "Latex file: $LatexFileAbsPath"
39+
Write-Output "Output directory: $OutputDirectoryAbsPath"
40+
Write-Output "Aux directory: $AuxDirectoryAbsPath"
41+
pdflatex -file-line-error -interaction="nonstopmode" -synctex="1" -output-format="pdf" `
42+
-output-directory="$OutputDirectoryAbsPath" `
43+
-aux-directory="$AuxDirectoryAbsPath" $LatexFileAbsPath
44+
45+
Write-Output "=============================================================================="
46+
47+
Write-Output "Compiling $LatexFileName third time... "
48+
Write-Output "Latex file: $LatexFileAbsPath"
49+
Write-Output "Output directory: $OutputDirectoryAbsPath"
50+
Write-Output "Aux directory: $AuxDirectoryAbsPath"
51+
pdflatex -file-line-error -interaction="nonstopmode" -synctex="1" -output-format="pdf" `
52+
-output-directory="$OutputDirectoryAbsPath" `
53+
-aux-directory="$AuxDirectoryAbsPath" $LatexFileAbsPath
54+
55+
Write-Output "=============================================================================="
56+
57+
Write-Output "Build complete."
58+
Write-Output "Changing Powershell Directory... "
59+
cd ..

src/Rename-Tex-Files.ps1

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Write-Output "Setting working directory to PSScriptRoot: $PSScriptRoot"
2+
Set-Location -Path $PSScriptRoot
3+
4+
Write-Output "=============================================================================="
5+
6+
Write-Output "Determining the root latex file to build ..."
7+
$LatexFileName = (Get-ChildItem -Filter "*.tex" | Select-Object -First 1).BaseName
8+
Write-Output "Latex file: $LatexFileName"
9+
10+
Write-Output "=============================================================================="
11+
12+
Write-Output "Determining the root bibtex file ..."
13+
$BibtexFileName = (Get-ChildItem -Filter "*.bib" | Select-Object -First 1).BaseName
14+
Write-Output "Bibtex file: $BibtexFileName"
15+
16+
Write-Output "=============================================================================="
17+
18+
Write-Output "Determining New name for TeX and BibTeX files ..."
19+
Write-Output "New name is the root of Git repository ..."
20+
$GitRootDirectory = (Get-Item $PSScriptRoot).Parent.Name
21+
Write-Output "New name for TeX and BibTeX files: $GitRootDirectory"
22+
23+
Write-Output "=============================================================================="
24+
25+
Write-Output "Renaming TeX root file ..."
26+
Write-Output "Old name: $LatexFileName.tex"
27+
Rename-Item -Path "$LatexFileName.tex" -NewName "$GitRootDirectory.tex"
28+
Write-Output "New name: $GitRootDirectory.tex"
29+
30+
Write-Output "=============================================================================="
31+
32+
Write-Output "Renaming BibTeX root file ..."
33+
Write-Output "Old name: $BibtexFileName.bib"
34+
Rename-Item -Path "$BibtexFileName.bib" -NewName "$GitRootDirectory.bib"
35+
Write-Output "New name: $GitRootDirectory.bib"
36+
37+
Write-Output "=============================================================================="
38+
39+
Write-Output "Updating TeX root file with new BibTeX file name ..."
40+
$LatexFileContent = Get-Content -Path "$GitRootDirectory.tex"
41+
Write-Output "Old BibTeX file name: $BibtexFileName"
42+
Write-Output "New BibTeX file name: $GitRootDirectory"
43+
$LatexFileContent = $LatexFileContent -replace "$BibtexFileName", "$GitRootDirectory"
44+
$LatexFileContent| Set-Content "$GitRootDirectory.tex"
45+
46+
Write-Output "=============================================================================="
47+
48+
Write-Output "Changing Powershell Directory... "
49+
cd ..

src/auxiliary/oeis_row_sums_cubes.tex

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/auxiliary/differences_of_cubes.tex renamed to src/figures/01_fig_finite_differences_cubes.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
7 & 343 & & &
1515
\end{tabular}
1616
\end{center}
17-
\caption{Table of finite differences of the polynomial $n^3$.} \label{tab:table}
18-
\end{table}
17+
\caption{Table of finite differences of the polynomial $n^3$.} \label{tab:differneces-of-cubes}
18+
\end{table}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
\begin{table}[H]
2+
\setlength\extrarowheight{-6pt}
3+
\begin{tabular}{c|cccccccc}
4+
$n/k$ & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\
5+
\hline
6+
0 & 1 & & & & & & & \\
7+
1 & 1 & 1 & & & & & & \\
8+
2 & 1 & 7 & 1 & & & & & \\
9+
3 & 1 & 13 & 13 & 1 & & & & \\
10+
4 & 1 & 19 & 25 & 19 & 1 & & & \\
11+
5 & 1 & 25 & 37 & 37 & 25 & 1 & & \\
12+
6 & 1 & 31 & 49 & 55 & 49 & 31 & 1 & \\
13+
7 & 1 & 37 & 61 & 73 & 73 & 61 & 37 & 1
14+
\end{tabular}
15+
\caption{Values of $6k(n-k) + 1$.
16+
See the OEIS entry: \href{https://oeis.org/A287326}{\texttt{A287326}}~\cite{kolosov2017third}.}
17+
\label{tab:triangle_row_sums_give_cubes}
18+
\end{table}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
\begin{table}[H]
2+
\setlength\extrarowheight{-6pt}
3+
\begin{tabular}{c|cccccccc}
4+
$n/k$ & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\
5+
\hline
6+
0 & 1 & & & & & & & \\
7+
1 & 1 & 1 & & & & & & \\
8+
2 & 1 & 31 & 1 & & & & & \\
9+
3 & 1 & 121 & 121 & 1 & & & & \\
10+
4 & 1 & 271 & 481 & 271 & 1 & & & \\
11+
5 & 1 & 481 & 1081 & 1081 & 481 & 1 & & \\
12+
6 & 1 & 751 & 1921 & 2431 & 1921 & 751 & 1 & \\
13+
7 & 1 & 1081 & 3001 & 4321 & 4321 & 3001 & 1081 & 1
14+
\end{tabular}
15+
\caption{Values of $30k^2(n-k)^2 + 1$.
16+
See the OEIS entry \href{https://oeis.org/A300656}{\texttt{A300656}}~\cite{kolosov2018fifth}.}
17+
\label{tab:row-sums-gives-fifth-power}
18+
\end{table}

0 commit comments

Comments
 (0)