login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A282283
Recursive 2-parameter sequence allowing calculation of the Euler Totient function.
1
0, 1, -1, 1, 2, -4, 2, -4, 10, -6, -2, 2, 6, -16, 10, 4, -6, 8, -10, 4, -10, 28, -18, -8, 10, -10, 10, -2, 8, -10, 0, 2, 12, -34, 22, 10, -12, 12, -22, 30, -30, 6, 10, -10, 8, 0, 6, -14, 6, -18, 52, -34, -16, 18, -18, 34, -36, 20, 10, -6, -2, 4, -28, 18, 8
OFFSET
0,5
COMMENTS
The a(n,m) forms a table where each row has (n*(n-3)+4)/2 = A152947(n) elements.
The index of the first row is n=1 and the index of the first column is m=0.
The right diagonal a(n, A152947(n)) = A000010(n), Euler Totient function.
FORMULA
nu(n) = (n*(n-3)+4)/2
Q(n,m) = 2*A231599(n,m-1)-A231599(n,m-2)-A231599(n,m)
a(n, m) = a(n - 1, m - n + 1) - a(n - 1, m) - a(n - 1, nu(n - 1))*Q(n - 1, m) if (m < 0) or (nu(n) < m)
a(1,m)=1 if m=1 and 0 otherwise.
a(n,nu(n))= A000010(n)
EXAMPLE
The first few rows are:
0, 1;
-1, 1;
2, -4, 2;
-4, 10, -6, -2, 2;
6, -16, 10, 4, -6, 8, -10, 4;
-10, 28, -18, -8, 10, -10, 10, -2, 8, -10, 0, 2;
12, -34, 22, 10, -12, 12, -22, 30, -30, 6, 10, -10, 8, 0, 6, -14, 6;
MATHEMATICA
U[n_, m_] := U[n, m] = If[n > 1, U[n - 1, n*(n - 1)/2 - m]*(-1)^n - U[n - 1, m], 0]
U[1, m_] := U[1, m] = If[m == 0, 1, 0]
Q[n_, m_] := U[n, m - 2] - 2*U[n, m - 1] + U[n, m]
nu[n_]:=(n-1)*n/2+2-n
a[n_, m_] := a[n, m] = If[(m < 0) || (nu[n] < m), 0, a[n - 1, m - n + 1] - a[n - 1, m] - a[n - 1, nu[n - 1]]*Q[n - 1, m]]
a[1, m_] := a[1, m] = If[m == 1, 1, 0]
Table[Table[a[n, m], {m, 0, nu[n]}], {n, 1, 20}]
Table[a[n, nu[n]], {n, 1, 50}]
CROSSREFS
KEYWORD
sign,tabf
AUTHOR
Gevorg Hmayakyan, Feb 11 2017
STATUS
approved