|
|
A005729
|
|
a(n) is the smallest positive integer a for which there is an identity of the form a*n*x = Sum_{i=1..m} ai*gi(x)^n where a1, ..., am are in Z and g1(x), ..., gm(x) are in Z[x].
(Formerly M1557)
|
|
4
|
|
|
1, 1, 2, 6, 2, 60, 2, 42, 6, 30, 1, 660, 3, 182, 30, 42, 2, 1020, 1, 570, 42, 22, 1, 106260, 10, 390, 6, 546, 1, 1740, 10, 1302, 66, 34, 70, 11220, 1, 1406, 78, 3990, 1, 223860, 1, 2838, 30, 46, 1, 4994220, 14, 210, 102, 390, 1, 54060, 110, 546, 798, 58, 1, 21455940
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Previous name was: From polynomial identities.
The originally published terms of this sequence were incorrect for a small number of n, the smallest of which is n=14 (see the paper of Zhu for more details). - Daniel Zhu, Feb 16 2024
|
|
REFERENCES
|
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(PARI) expa(p, n) = {if (p % 2, return (1)); if (n % 6, return (1)); 2; }
expb(p, n) = {expo = 0; r = 1; ok = 1; while (ok, m = 2; while ((ps = (p^(m*r)-1)/(p^r-1)) <= n, if (n % ps == 0, expo = 1; break); m++; ); if (m==2, ok = 0); if (expo, break); r++; ); expo; }
expp(p, n) = if (n % p, expb(p, n), expa(p, n));
a(n) = {my(vp = primes(primepi(n-1))); prod(k=1, #vp, vp[k]^expp(vp[k], n)); } \\ Michel Marcus, Apr 27 2016 [Corrected by Daniel Zhu, Feb 16 2024]
(Python)
from itertools import count
from sympy import nextprime
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
else:
c *= p if p&1 or n%6 else p**2
p = nextprime(p)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,nice,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Errors in name and terms a(14), a(28), and a(56) corrected by Daniel Zhu, Feb 16 2024
|
|
STATUS
|
approved
|
|
|
|