OFFSET
0,1
EXAMPLE
n=4: 5+19+19 = 43 = a(4).
MAPLE
with(numtheory):
b:= proc(n) option remember; nops(invphi(n)) end:
g:= proc(n) option remember; `if`(n=0, 1, add(
g(n-j)*add(d*b(d), d=divisors(j)), j=1..n)/n)
end:
a:= n-> add(g(2*floor((i+n)/2)+1)/2, i=-1..1):
seq(a(n), n=0..40); # Alois P. Heinz, Mar 02 2023
MATHEMATICA
nmax1 = 40;
terms = nmax1 + 2; (* number of terms of A120963 *)
nmax2 = Floor[terms/2] - 1;
S[m_] := S[m] = CoefficientList[Product[1/(1 - x^EulerPhi[k]), {k, 1, m*terms}] + O[x]^(terms + 1), x];
S[m = 1]; S[m++]; While[S[m] != S[m - 1], m++];
A120963 = S[m];
K[n_] := A341711[Floor[n/2]];
a[n_] := If[n == 0, 2, K[n - 1] + K[n] + K[n + 1]];
Table[a[n], {n, 0, nmax1}] (* Jean-François Alcover, Dec 01 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 02 2023
STATUS
approved