OFFSET
1,3
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
T. Chinburg and M. Henriksen, Sums of k-th powers in the ring of polynomials with integer coefficients, Acta Arithmetica, 29 (1976), 227-250.
PROG
(Python)
from itertools import count
from sympy import nextprime
def A005731(n):
c, p = 1, 2
while p < n:
if n%p:
for m in count(2):
if (p**m-1)//(p-1) > n:
break
for r in count(1):
q = (p**(m*r)-1)//(p**r-1)
if q > n:
break
if not n % q:
c *= p
break
else:
continue
if q <= n:
break
p = nextprime(p)
return c # Chai Wah Wu, Mar 10 2024
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
EXTENSIONS
More terms from Emeric Deutsch, Jan 24 2005
STATUS
approved