login
Filter sequence combining A081373(n) with A246277(n).
3

%I #6 Sep 24 2018 17:46:33

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

%T 20,3,21,22,23,10,24,3,25,15,26,3,27,3,28,29,30,3,31,4,32,33,34,3,35,

%U 14,36,37,38,3,39,3,40,13,41,42,43,3,44,45,46,3,47,3,48,49,50,51,52,3,53,54,55,3,56,57,58,59,60,3,61,14,62,63,64,18,65,3,66,19

%N Filter sequence combining A081373(n) with A246277(n).

%C Restricted growth sequence transform of ordered pair [A081373(n), A246277(n)].

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

%o (PARI)

%o up_to = 65537;

%o ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };

%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 v081373 = ordinal_transform(vector(up_to,n,eulerphi(n)));

%o A081373(n) = v081373[n];

%o A246277(n) = if(1==n, 0, my(f = factor(n), k = primepi(f[1,1])-1); for (i=1, #f~, f[i,1] = prime(primepi(f[i,1])-k)); factorback(f)/2);

%o v319339 = rgs_transform(vector(up_to,n,[A081373(n),A246277(n)]));

%o A319339(n) = v319339[n];

%Y Cf. A081373, A246277, A300247, A305801, A305897, A318500.

%K nonn

%O 1,2

%A _Antti Karttunen_, Sep 24 2018