OFFSET
1,2
FORMULA
a(n) = Sum_{y=1..prime(n)} Sum_{x=1..prime(n)} [GCD(f(x,y), prime(n)) = 1],
a(n) = Sum_{y=1..prime(n)} Sum_{x=1..prime(n)} (1 - [MOD(f(x,y), prime(n)) = 0]) where f(x,y) = x^3 - x^2 - y^2 - y, in the last two formulas.
a(n) = A366362(prime(n), 1).
MATHEMATICA
b[n_] := If[n < 1, 0, With[{m = Prime@n}, SeriesCoefficient[q (Product[(1 - q^(11 k)), {k, Ceiling[m/11]}] Product[1 - q^k, {k, m}])^2, {q, 0, m}]]]; Table[Prime[n] (Prime[n] - 1) + b[n], {n, 1, 43}] (* after Michael Somos in A002070, Jul 04 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Mats Granvik, Oct 07 2023
STATUS
approved