login
A293224
Restricted growth sequence transform of A293222, a product formed from the 2-digits present in the ternary expansions of proper divisors of n.
10
1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 4, 1, 4, 2, 5, 1, 4, 1, 3, 6, 3, 1, 7, 2, 2, 1, 5, 1, 7, 1, 7, 2, 5, 4, 8, 1, 9, 1, 10, 1, 11, 1, 12, 4, 12, 1, 13, 6, 14, 4, 14, 1, 8, 3, 15, 16, 3, 1, 17, 1, 2, 18, 15, 2, 11, 1, 7, 9, 19, 1, 20, 1, 2, 21, 12, 4, 11, 1, 22, 1, 3, 1, 23, 5, 4, 2, 22, 1, 24, 6, 25, 1, 12, 9, 26, 1, 14, 4, 27, 1, 13, 1, 28, 23, 14, 1, 29, 1, 30
OFFSET
1,4
LINKS
PROG
(PARI)
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; };
write_to_bfile(start_offset, vec, bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
A019565(n) = {my(j, v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ This function from M. F. Hasler
A289814(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==2, 1, 0)), 2); } \\ From _Remy Sigrist_
A293222(n) = { my(m=1); fordiv(n, d, if(d < n, m *= A019565(A289814(d)))); m; };
write_to_bfile(1, rgs_transform(vector(19683, n, A293222(n))), "b293224.txt");
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 03 2017
STATUS
approved