login
A319714
Filter sequence combining the largest proper divisor of n (A032742) with n's residue modulo 4 (A010873).
5
1, 2, 3, 4, 5, 6, 3, 7, 8, 9, 3, 10, 5, 11, 12, 13, 5, 14, 3, 15, 16, 17, 3, 18, 19, 20, 21, 22, 5, 23, 3, 24, 25, 26, 27, 28, 5, 29, 30, 31, 5, 32, 3, 33, 34, 35, 3, 36, 16, 37, 38, 39, 5, 40, 41, 42, 43, 44, 3, 45, 5, 46, 47, 48, 49, 50, 3, 51, 52, 53, 3, 54, 5, 55, 56, 57, 25, 58, 3, 59, 60, 61, 3, 62, 63, 64, 65, 66, 5, 67, 30, 68, 69, 70, 71, 72, 5, 73
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A286474, or equally, of A286473.
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; };
A032742(n) = if(1==n, n, n/vecmin(factor(n)[, 1]));
A286474(n) = if(1==n, n, (4*A032742(n) + (n % 4)));
v319714 = rgs_transform(vector(up_to, n, A286474(n)));
A319714(n) = v319714[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 26 2018
STATUS
approved