OFFSET
1,3
REFERENCES
M. Pohst and H. Zassenhaus, Algorithmic Algebraic Number Theory, Cambridge, 1989; see page 131.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
EXAMPLE
The first few factorization are:
n, p, factors
1, 2, x^3+x+1
2, 3, x^3+2*x+2
3, 5, (x+3)*(x^2+2*x+3)
4, 7, (x+2)*(x^2+5*x+3)
5, 11, (x+5)*(x^2+6*x+2)
6, 13, x^3+12*x+12
7, 17, (x^2+5*x+7)*(x+12)
8, 19, (x^2+6*x+16)*(x+13)
9, 23, (x+20)*(x+13)^2
10, 29, x^3+28*x+28
11, 31, x^3+30*x+30
12, 37, (x^2+13*x+20)*(x+24)
...
MAPLE
p:=x^3-x-1;
f:=n->Factor(p) mod ithprime(n);
for n from 1 to 20 do lprint(n, ithprime(n), f(n)); od:
MATHEMATICA
a[n_] := Total[Last /@ FactorList[x^3-x-1, Modulus -> Prime[n]]] - 1; Array[a, 100] (* Giovanni Resta, May 28 2019 *)
PROG
(PARI) a(n) = vecsum(factor((x^3-x-1)*Mod(1, prime(n)))[, 2]); \\ Michel Marcus, May 28 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 26 2019
EXTENSIONS
More terms from Giovanni Resta, May 28 2019
STATUS
approved