[go: up one dir, main page]

login
A318887
Filter sequence related to the differences of prime factors of n.
3
1, 2, 2, 3, 2, 4, 2, 5, 3, 6, 2, 7, 2, 8, 9, 10, 2, 11, 2, 12, 13, 14, 2, 15, 3, 16, 5, 17, 2, 18, 2, 19, 20, 21, 9, 22, 2, 23, 24, 25, 2, 26, 2, 27, 28, 29, 2, 30, 3, 31, 32, 33, 2, 34, 35, 36, 37, 38, 2, 39, 2, 40, 41, 42, 20, 43, 2, 44, 45, 46, 2, 47, 2, 48, 49, 50, 13, 51, 2, 52, 10, 53, 2, 54, 55, 56, 57, 58, 2, 59, 35, 60, 61, 62, 32, 63, 2, 64, 65, 66, 2
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A318885.
LINKS
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; };
A318885(n) = if(1==n, n, my(f=factor(n), m=2^f[1, 2], i=1); for(k=2, #f~, i += (f[k, 1]-f[k-1, 1]); m *= prime(i)^f[k, 2]); (m));
v318887 = rgs_transform(vector(up_to, n, A318885(n)));
A318887(n) = v318887[n];
CROSSREFS
Sequence in context: A355834 A300248 A300247 * A305975 A304751 A117658
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 24 2018
STATUS
approved