login
A357588
The compositional inverse of n -> n^[isprime(n)], where [b] is the Iverson bracket of b.
17
1, -2, 5, -11, 6, 146, -1295, 7712, -36937, 141514, -357676, -322973, 12078666, -102218510, 623243991, -3041134727, 11440387382, -23657862864, -95377084665, 1570488584608, -12255377466362, 72288056416374, -340793435817068, 1186234942871544, -1525020468715715
OFFSET
1,2
MAPLE
# REVERT from N. J. A. Sloane's 'Transforms' (see the footer of the page).
REVERT([seq(if isprime(k) then k else 1 fi, k = 1..25)]);
# Alternative:
CompInv := proc(len, seqfun) local n, k, m, g, M, A;
A := [seq(seqfun(i), i=1..len)];
M := Matrix(len+1, shape=triangular[lower]); M[1, 1] := 1;
for m from 2 to len + 1 do M[m, m] := M[m - 1, m - 1]/A[1];
for k from m-1 by -1 to 2 do M[m, k] := M[m-1, k-1] -
add(A[i+1]*M[m, k+i], i=1..m-k)/A[1] od od; seq(M[k, 2], k=2..len + 1) end:
CompInv(25, n -> if isprime(n) then n else 1 fi);
CROSSREFS
Sequence in context: A363554 A127011 A170868 * A276736 A069162 A300677
KEYWORD
sign
AUTHOR
Peter Luschny, Oct 04 2022
STATUS
approved