proposed
approved
proposed
approved
editing
proposed
<a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
Antti Karttunen, <a href="/A331280/b331280.txt">Table of n, a(n) for n = 1..65537</a>
1, 2, 3, 2, 4, 3, 5, 2, 6, 4, 7, 3, 8, 5, 9, 2, 10, 6, 11, 4, 12, 7, 13, 3, 9, 8, 6, 5, 14, 9, 15, 2, 16, 10, 17, 6, 18, 11, 19, 4, 20, 12, 21, 7, 9, 13, 22, 3, 12, 9, 23, 8, 24, 6, 25, 5, 26, 14, 27, 9, 28, 15, 12, 2, 29, 16, 30, 10, 31, 17, 32, 6, 33, 18, 34, 11, 25, 19, 35, 4, 6, 20, 36, 12, 37, 21, 38, 7, 39, 9, 40, 13, 41, 22, 42, 3, 43, 12, 16, 9, 44, 23, 45, 8, 46
1,2
(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; };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from A046523
A241909(n) = if(1==n||isprime(n), 2^primepi(n), my(f=factor(n), h=1, i, m=1, p=1, k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k, 1]); m *= p^(i-h); h = i; if(f[k, 2]>1, f[k, 2]--, k++)); (p*m));
A278220(n) = A046523(A241909(n));
v331280 = rgs_transform(vector(up_to, n, A278220(n)));
A331280(n) = v331280[n];
allocated
nonn
Antti Karttunen, Jan 17 2020
approved
editing
allocated for Antti Karttunen
allocated
approved