OFFSET
1,2
COMMENTS
All prime powers p^k, k >= 1, are allotted to distinct equivalence classes according to the number of cyclotomic cosets of 2 mod p^k, while all other numbers occur in singular equivalence classes of their own.
Restricted growth sequence transform of function f defined as f(n) = A006694((n-1)/2) when n is an odd prime power > 1, otherwise -n.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000
EXAMPLE
a(7) = a(9) = a(17) = a(23) = a(25) = a(41) = ... because n = 7, 9, 17, 23, 25, 41, ... are such powers of odd primes for which A006694((n-1)/2) = 4.
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; };
A319351aux(n) = if((n<=2)||!(n%2)||!isprimepower(n), n, -(A006694((n-1)/2)));
v319351 = rgs_transform(vector(up_to, n, A319351aux(n)));
A319351(n) = v319351[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 26 2018
STATUS
approved