login
Restricted growth sequence transform of A304102, a filter sequence related to the proper divisors of n expressed in Fibonacci number system.
5

%I #27 Jul 18 2018 12:26:32

%S 1,2,2,3,2,4,2,5,3,4,2,6,2,5,4,7,2,8,2,6,5,5,2,9,3,4,10,11,2,12,2,6,5,

%T 13,5,14,2,13,4,9,2,15,2,11,8,10,2,16,17,18,13,6,2,19,5,20,13,5,2,21,

%U 2,13,6,22,4,23,2,24,10,25,2,26,2,10,18,27,28,12,2,29,30,13,2,31,13,32,5,33,2,34,5,35,13,5,13,21,2,36,37,38,2,39,2,9,15

%N Restricted growth sequence transform of A304102, a filter sequence related to the proper divisors of n expressed in Fibonacci number system.

%C For all i, j: a(i) = a(j) => b(i) = b(j), where b can be any of {A000005, A293435, A304095 or A300836} for example.

%H Antti Karttunen, <a href="/A304103/b304103.txt">Table of n, a(n) for n = 1..65537</a>

%o (PARI)

%o \\ Needs also code from A304101.

%o up_to = 65537;

%o 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; };

%o write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }

%o A304102(n) = { my(m=1); fordiv(n,d,if(d<n, m *= prime(A304101(d)-1))); (m); };

%o write_to_bfile(1,rgs_transform(vector(up_to,n,A304102(n))),"b304103.txt");

%Y Cf. A293435, A304095, A300836, A304102.

%Y Cf. also A300835, A304105, A305800.

%Y Cf. A305793 (analogous filter for base 2).

%K nonn

%O 1,2

%A _Antti Karttunen_, May 13 2018