I am currently working on problem 487 on project euler. I did some research and I only see 2 possibilities to solve this problem: 1. By using faulhabers formula 2. by using the formula featuring the stirling numbers of the second kind (cant remember the formulas name) Because n is 10^12 and k is 10000 I think the only possibility is to use the 2. option and an approximation of the factorial. If there is a better option than 1 and 2 please let me know. If there isnt please help me what kind of approximation I should use for the factorial in order to be accurate enough. Thanks for your help and effort
2026-02-23 02:59:30.1771815570
Stirling numbers and bernoulli numbers for summing up n numbers to the kth power
208 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in STIRLING-NUMBERS
- About the corvergence of series involving Stirling numbers of first kind and number theoretic functions
- Algebraic derivation of the recurrence for Stirling numbers of the second kind
- A sum involving Stirling numbers of the second kind.
- Number of entries are not divisible by x in the n th row of triangle
- odd property of Eulerian numbers
- Statistics: Using Stirling's Approximation with $3 N$
- General form of the coefficients of the polynomial $p(z)=\binom{q+z}{n}+\binom{q-z}{n}$
- Combinatorial proof for a Stirling identity
- How can I find $f(a,b,c)=e^{-c^a/a}\sum\limits_{n=0}^{\infty}\left(\frac{c^a}{a}\right)^{n}\frac{(an)^{b}}{n!}$?
- Asymptotic formula for the integral sequence s(n)
Related Questions in BERNOULLI-NUMBERS
- Infinite sum containing the Bernoulli numbers $B_{2n}$
- Stirling's series for Log Gamma
- Sign convention for Bernoulli numbers
- Contour integral calculation
- First Order Differential Equations Applied Question
- Bernoulli numbers [A classical introduction to modern number theory]
- convergence of an iterated series which is had Bernoulli numbers
- Evaluate $\lim\limits_{n\to\infty}(f(n+1)-f(n))$ where $f(n)=|B_{2n}|^{1/2n}$
- Justify an approximation of $\sum_{n=1}^\infty|G_n|\log\left(\frac{n+1}{n}\right)$, where $G_n$ is the $n$th Gregory coefficient
- Show that $n+1$ is prime if (Denominator(Bernoulli Number($n$)))/($n+1$) is an integer
Related Questions in PROJECT-EULER
- Sum Equals Product: A Diophantine Equation
- Calculating how many decks of given size can be perfectly shuffled $k$ times and return to their original ordering.
- Project Euler Problem #500
- Given $\sqrt {m^2+(n+o)^2}$ is int, is it possible that atleast one of $\sqrt {o^2+(n+m)^2}$ or $\sqrt {n^2+(o+m)^2}$ is also integer?
- What is going wrong with my solution for Project Euler 224?
- Formulae to find sum of all digits before n?
- Project Euler 233 on Hackerrank
- How does a < b < c and a + b + c = s imply a < s/3 and b < s/2?
- Digit Factorial Sum?
- How does this algorithm find the largest prime factor?
Related Questions in BERNOULLI-POLYNOMIALS
- Riemann zeta meromorphic cont. using Abel summation formula
- Formula for a sequence defined on $K_1(x,y) := y+0$ if $x \geq y$ and $y-1$ otherwise
- First Order Differential Equations Applied Question
- Constant determinant of matrix of Bernoulli polynomials
- Prove Bernoulli Task
- Bounds for Periodic Bernoulli Polynomials via Fourier Series
- Prove following statements concerning Bernoulli polynomials
- Second generalized Bernoulli number $B_{2,\chi}$
- Bernoulli equation when not homogenous
- Help with Fourier Series $\sum_{j=1}^{\infty} \frac{1}{j^{2k}}\sin{2\pi j x}$
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
So I wrote a solution to Euler487 in C#. I went about it in a rather brute force way, so I wanted a language that would run faster than python. I would've used C but I don't have a good IDE installed at the moment.
The range of primes to run through falls just under the maximum size of positive 32 bit signed int. Which means that its square falls just under the size of positive 64 bit signed long. Which makes these numbers a perfect candidate for exponentiation by squaring with modulation. Furthermore the summation of powers doesn't have to range through all trillion numbers since J[p] only has p representatives. This cuts computation down by a factor of about 500. I ran this code for 1 value of p and it took, approximately 17 min. There are 101 primes in the range specified, giving a synchronous run time of a little over a day. I'll let it run on my computer, just out of curiosity. There's got to be a more elegant solution out there. If you find one I would love to see it.