[go: up one dir, main page]

login
A326139
a(n) = gcd(A032742(n), A302042(n)).
5
1, 1, 1, 2, 1, 3, 1, 4, 3, 5, 1, 6, 1, 7, 5, 8, 1, 9, 1, 10, 1, 11, 1, 12, 5, 13, 1, 14, 1, 15, 1, 16, 1, 17, 7, 18, 1, 19, 1, 20, 1, 21, 1, 22, 3, 23, 1, 24, 7, 25, 1, 26, 1, 27, 1, 28, 1, 29, 1, 30, 1, 31, 1, 32, 1, 33, 1, 34, 1, 35, 1, 36, 1, 37, 1, 38, 11, 39, 1, 40, 3, 41, 1, 42, 1, 43, 1, 44, 1, 45, 1, 46, 1, 47, 1, 48, 1, 49, 1, 50, 1, 51, 1, 52, 1
OFFSET
1,4
LINKS
FORMULA
a(n) = gcd(A032742(n), A302042(n)).
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; };
A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639
A032742(n) = (n/A020639(n));
v078898 = ordinal_transform(vector(up_to, n, A020639(n)));
A078898(n) = v078898[n];
A302042(n) = if((1==n)||isprime(n), 1, my(c = A078898(n), p = prime(-1+primepi(A020639(n))+primepi(A020639(c))), d = A078898(c), k=0); while(d, k++; if((1==k)||(A020639(k)>=p), d -= 1)); (k*p));
A326139(n) = gcd(A032742(n), A302042(n));
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 23 2019
STATUS
approved