editing
proposed
editing
proposed
(Python)
import sympy as sp
def aupto(n):
x = sp.symbols('x')
expr = (1 - x - sp.sqrt(1 - 2*x - 3*x**2)) / (x**2 * (3 - x - sp.sqrt(1 - 2*x - 3*x**2)))
series_expr = sp.series(expr, x, 0, n).removeO()
return sp.Poly(series_expr, x).all_coeffs()[::-1] # Paul Muljadi, Oct 10 2024
approved
editing
editing
proposed
(Python)
from math import factorial
def aupto(n):
f = [1, 1]
for D in range(1, 5):
for j in range(1, D + 1):
sign = (-1) ** j
f.extend(sign * f[k] for k in range(1, factorial(D) + 1))
return f[1:n] # Paul Muljadi, Sep 26 2024
approved
editing
editing
proposed
(Python)
import math
def a(n):
count = 0
for k in range(1, n + 1):
if n % k == 0:
count += math.factorial(n) // (math.factorial(k) ** (n // k) * math.factorial(n // k))
return count # Paul Muljadi, Sep 25 2024
approved
editing
editing
proposed
Wikipedia, <a href="http://en.wikipedia.org/wiki/Abc_conjecture">abc conjecture</a>
approved
editing
editing
proposed
(Python) def a(n): return n % 10 + 1 # _Paul Muljadi_, Aug 06 2024
def agen(n):
for i in range(n):
yield (i % 10) + 1 # Paul Muljadi, Aug 06 2024
proposed
editing