login
A319999
Filter sequence combining A173557(n) with A319993(n).
2
1, 2, 3, 4, 5, 6, 7, 4, 8, 9, 10, 11, 12, 13, 14, 4, 15, 16, 17, 18, 12, 19, 20, 11, 21, 22, 23, 24, 25, 26, 27, 4, 28, 29, 30, 11, 31, 32, 30, 18, 33, 22, 34, 35, 36, 37, 38, 11, 39, 40, 41, 42, 43, 44, 33, 24, 31, 45, 46, 47, 48, 49, 50, 4, 51, 52, 53, 54, 55, 56, 57, 11, 58, 59, 60, 61, 48, 56, 62, 18, 63, 64, 65, 42, 66, 67, 68, 35, 69, 70, 58, 71, 48, 72, 58, 11, 73, 74, 75, 18, 76, 77, 78, 42
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of ordered pair [A173557(n), A319993(n)].
For all i, j: a(i) = a(j) => A319997(i) = A319997(j).
LINKS
PROG
(PARI)
up_to = 65537;
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; };
A173557(n) = factorback(apply(p -> p-1, factor(n)[, 1]));
A319993(n) = { my(f=factor(n)); prod(i=1, #f~, if(2==f[i, 1], -(1==f[i, 2]), (f[i, 1]^(f[i, 2]-1)))); };
v319999 = rgs_transform(vector(up_to, n, [A173557(n), A319993(n)]));
A319999(n) = v319999[n];
CROSSREFS
Cf. also A295886, A295887.
Sequence in context: A272573 A328477 A332230 * A083501 A007922 A007948
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 08 2018
STATUS
approved