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”).

Recursive 2-parameter sequence allowing calculation of the Euler Totient function.
1

%I #10 Feb 18 2017 22:35:48

%S 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,

%T -10,10,-2,8,-10,0,2,12,-34,22,10,-12,12,-22,30,-30,6,10,-10,8,0,6,

%U -14,6,-18,52,-34,-16,18,-18,34,-36,20,10,-6,-2,4,-28,18,8

%N Recursive 2-parameter sequence allowing calculation of the Euler Totient function.

%C The a(n,m) forms a table where each row has (n*(n-3)+4)/2 = A152947(n) elements.

%C The index of the first row is n=1 and the index of the first column is m=0.

%C The right diagonal a(n, A152947(n)) = A000010(n), Euler Totient function.

%F nu(n) = (n*(n-3)+4)/2

%F Q(n,m) = 2*A231599(n,m-1)-A231599(n,m-2)-A231599(n,m)

%F 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)

%F a(1,m)=1 if m=1 and 0 otherwise.

%F a(n,nu(n))= A000010(n)

%e The first few rows are:

%e 0, 1;

%e -1, 1;

%e 2, -4, 2;

%e -4, 10, -6, -2, 2;

%e 6, -16, 10, 4, -6, 8, -10, 4;

%e -10, 28, -18, -8, 10, -10, 10, -2, 8, -10, 0, 2;

%e 12, -34, 22, 10, -12, 12, -22, 30, -30, 6, 10, -10, 8, 0, 6, -14, 6;

%t U[n_, m_] := U[n, m] = If[n > 1, U[n - 1, n*(n - 1)/2 - m]*(-1)^n - U[n - 1, m], 0]

%t U[1, m_] := U[1, m] = If[m == 0, 1, 0]

%t Q[n_, m_] := U[n, m - 2] - 2*U[n, m - 1] + U[n, m]

%t nu[n_]:=(n-1)*n/2+2-n

%t 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]]

%t a[1, m_] := a[1, m] = If[m == 1, 1, 0]

%t Table[Table[a[n, m], {m, 0, nu[n]}], {n, 1, 20}]

%t Table[a[n, nu[n]], {n, 1, 50}]

%Y Cf. A000010, A152947, A231599.

%K sign,tabf

%O 0,5

%A _Gevorg Hmayakyan_, Feb 11 2017