OFFSET
1,2
FORMULA
a(n) = 3*n^2 - 4*n + 2 for n=1, 2, 3, 4, 5, 7, 10, 11, 12, 14, 15, 18, 24, 25, 26, 28, 29, 31, 33, 35, 38, ...
That is, in those cases a(n) = A056109(n-1). It appears that the corresponding indices are given by A133431 (i.e., 1 U A002504). - Michel Marcus, Feb 17 2018
MATHEMATICA
a[n_] := For[x = 1, True, x++, If[Mod[x^3 + n^3, x + n - 1] == 0, Return[x]]]; Array[a, 24] (* Jean-François Alcover, Feb 17 2018 *)
PROG
(PARI) a(n) = {my(k=1); while((k^3+n^3)%(k+n-1) != 0, k++); k; } \\ Altug Alkan, Feb 17 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jan 02 2002
EXTENSIONS
More terms from Altug Alkan, Feb 17 2018
STATUS
approved