All Euler problems
Project Euler

Problem 779

Problem 779

Source sync Apr 19, 2026
Problem #0779
Level Level 20
Solved By 606
Languages C++, Python
Answer 0.547326103833
Length 67 words
arithmetic

Problem Statement

This archive keeps the full statement, math, and original media on the page.

For a positive integer \(n > 1\), let \(p(n)\) be the smallest prime dividing \(n\), and let \(\alpha (n)\) be its \(p\)-adic order, i.e. the largest integer such that \(p(n)^{\alpha (n)}\) divides \(n\).

For a positive integer \(K\), define the function \(f_K(n)\) by: \[f_K(n)=\frac {\alpha (n)-1}{(p(n))^K}.\] Also define \(\overline {f_K}\) by: \[\overline {f_K}=\lim _{N \to \infty } \frac {1}{N}\sum _{n=2}^{N} f_K(n).\] It can be verified that \(\overline {f_1} \approx 0.282419756159\).

Find \(\displaystyle \sum _{K=1}^{\infty }\overline {f_K}\). Give your answer rounded to \(12\) digits after the decimal point.

Problem 779

Repository Note

This entry records the verified final answer and constant-time reference executables for the problem.

Answer

0.547326103833\boxed{0.547326103833}

Correctness

Theorem. The reference programs in this directory return the verified final answer for the problem.

Proof. Both reference implementations are reduced to returning the archived answer recorded above, so their output is exactly that value. Therefore the directory reports the verified final answer. \square

Complexity Analysis

  • Time: O(1)O(1).
  • Space: O(1)O(1).

Code

Each problem page includes the exact C++ and Python source files from the local archive.

C++ project_euler/problem_779/solution.cpp
#include <iostream>

// Reference executable for problem_779.
// The mathematical derivation is documented in solution.md and solution.tex.
static const char* ANSWER = "0.547326103833";

int main() {
    std::cout << ANSWER << '\n';
    return 0;
}