OFFSET
1,2
COMMENTS
Restricted growth sequence transform of the function f given in the definition.
Note that for composite n, f(n) can be defined in general as a quintuple vector [v(n), w(n), x(n), y(n), z(n)], where v, w, x, y and z are any five of these six sequences: A007814, A007949, A065339, A083025, A373591, A373592. This follows because A007814(n) + A065339(n) + A083025(n) = A007949(n) + A373591(n) + A373592(n) = A001222(n), so the omitted sixth element can be always worked out from the remaining five.
For all i, j > 1:
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000
PROG
(PARI)
up_to = 100000;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
A007814(n) = valuation(n, 2);
A065339(n) = sum(i=1, #n=factor(n)~, (3==n[1, i]%4)*n[2, i]);
A083025(n) = sum(i=1, #n=factor(n)~, (1==n[1, i]%4)*n[2, i]);
A373591(n) = sum(i=1, #n=factor(n)~, (1==n[1, i]%3)*n[2, i]);
A373592(n) = sum(i=1, #n=factor(n)~, (2==n[1, i]%3)*n[2, i]);
Aux373594(n) = if(n<=3, n, if(isprime(n), 0, [A007814(n), A083025(n), A065339(n), A373591(n), A373592(n)]));
v373594 = rgs_transform(vector(up_to, n, Aux373594(n)));
A373594(n) = v373594[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 13 2024
STATUS
approved