login
A293223
Restricted growth sequence transform of A293221, a product formed from the 1-digits present in the ternary expansion of proper divisors of n.
10
1, 2, 2, 2, 2, 3, 2, 4, 3, 3, 2, 5, 2, 6, 7, 4, 2, 8, 2, 9, 4, 10, 2, 11, 3, 12, 8, 9, 2, 13, 2, 14, 8, 10, 4, 15, 2, 6, 16, 9, 2, 11, 2, 9, 17, 3, 2, 18, 6, 14, 8, 9, 2, 19, 8, 20, 4, 21, 2, 22, 2, 23, 16, 24, 16, 25, 2, 26, 7, 27, 2, 28, 2, 29, 16, 26, 30, 31, 2, 32, 19, 19, 2, 33, 8, 29, 34, 27, 2, 35, 14, 36, 37, 21, 4, 38, 2, 24, 39, 40, 2, 41, 2, 20, 42
OFFSET
1,2
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
A289813(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==1, 1, 0)), 2); } \\ From _Remy Sigrist_
A293221(n) = { my(m=1); fordiv(n, d, if(d < n, m *= A019565(A289813(d)))); m; };
write_to_bfile(1, rgs_transform(vector(19683, n, A293221(n))), "b293223.txt");
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 03 2017
STATUS
approved