OFFSET
1,2
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Sum_{n>=2} 1/a(n) = Sum_{k>=2} (zeta(k)/zeta(2*k) - 1) = 0.848633... (A368250).
MATHEMATICA
Table[n*(n - 1), {n, Select[Range[100], SquareFreeQ]}]
PROG
(PARI) lista(kmax) = forsquarefree(k=1, kmax, print1(k[1]*(k[1]-1), ", "));
(Python)
from math import isqrt
from sympy import mobius
def A368249(n):
def f(x): return int(n-sum(mobius(k)*(x//k**2) for k in range(2, isqrt(x)+1)))
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m*(m-1) # Chai Wah Wu, Dec 23 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Dec 19 2023
STATUS
approved