[go: up one dir, main page]

login
A319339
Filter sequence combining A081373(n) with A246277(n).
3
1, 2, 3, 4, 3, 5, 3, 6, 4, 7, 3, 8, 3, 9, 10, 11, 3, 12, 3, 13, 14, 15, 3, 16, 17, 18, 6, 19, 3, 20, 3, 21, 22, 23, 10, 24, 3, 25, 15, 26, 3, 27, 3, 28, 29, 30, 3, 31, 4, 32, 33, 34, 3, 35, 14, 36, 37, 38, 3, 39, 3, 40, 13, 41, 42, 43, 3, 44, 45, 46, 3, 47, 3, 48, 49, 50, 51, 52, 3, 53, 54, 55, 3, 56, 57, 58, 59, 60, 3, 61, 14, 62, 63, 64, 18, 65, 3, 66, 19
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of ordered pair [A081373(n), A246277(n)].
LINKS
PROG
(PARI)
up_to = 65537;
ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om, invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om, invec[i], (1+pt))); outvec; };
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; };
v081373 = ordinal_transform(vector(up_to, n, eulerphi(n)));
A081373(n) = v081373[n];
A246277(n) = if(1==n, 0, my(f = factor(n), k = primepi(f[1, 1])-1); for (i=1, #f~, f[i, 1] = prime(primepi(f[i, 1])-k)); factorback(f)/2);
v319339 = rgs_transform(vector(up_to, n, [A081373(n), A246277(n)]));
A319339(n) = v319339[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 24 2018
STATUS
approved