login
Filter sequence combining from all divisors d > 1 of n, the prime signature of 2d+1.
7

%I #10 Jun 16 2018 18:31:45

%S 1,2,2,3,2,4,5,6,7,8,2,9,10,8,4,11,5,12,5,13,8,14,2,15,16,17,8,18,2,

%T 19,20,18,4,21,8,22,20,21,17,23,2,24,5,25,26,8,5,27,28,29,8,30,2,19,8,

%U 31,21,14,5,32,5,33,26,34,17,35,36,18,4,37,5,32,20,14,26,38,21,39,5,40,41,42,2,43,44,8,14,45,2,46,47,18,44,48,8,49,50,51,12,52,5

%N Filter sequence combining from all divisors d > 1 of n, the prime signature of 2d+1.

%C Restricted growth sequence transform of A305984.

%C For all i, j: a(i) = a(j) => A086668(i) = A086668(j).

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

%o (PARI)

%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 A305984(n) = { my(m=1); fordiv(n, d, if((d>1), m *= prime(A305973(1+d)-1))); (m); }; \\ Needs also code from A305973.

%o v305985 = rgs_transform(vector(up_to,n,A305984(n)));

%o A305985(n) = v305985[n];

%Y Cf. A305810, A305973, A305983, A305984.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jun 15 2018