login
Filter sequence combining the 2-adic valuation of n (A007814) with the differences between odd primes in the prime factorization of n.
4

%I #7 Sep 24 2018 17:46:11

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

%T 16,17,5,9,18,3,5,19,13,3,20,3,8,21,5,3,22,7,11,23,8,3,24,25,13,26,5,

%U 3,27,3,5,28,29,17,30,3,8,31,15,3,32,3,5,33,8,12,34,3,22,35,5,3,36,37,5,38,13,3,39,25,8,40,5,23,41,3,11,42,18,3,43,3,13,44

%N Filter sequence combining the 2-adic valuation of n (A007814) with the differences between odd primes in the prime factorization of n.

%C Restricted growth sequence transform of an ordered pair [A007814(n), A318885(A000265(n))].

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

%H Antti Karttunen, <a href="/A318888/b318888.txt">Table of n, a(n) for n = 1..100000</a>

%o (PARI)

%o up_to = 100000;

%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 A000265(n) = (n/2^valuation(n, 2));

%o A007814(n) = valuation(n,2);

%o A318885(n) = if(1==n,n,my(f=factor(n),m=2^f[1,2],i=1); for(k=2,#f~,i += (f[k,1]-f[k-1,1]); m *= prime(i)^f[k,2]); (m));

%o v318888 = rgs_transform(vector(up_to,n,[A007814(n), A318885(A000265(n))]));

%o A318888(n) = v318888[n];

%Y Cf. A305801, A305891, A318500, A318885, A318887.

%K nonn

%O 1,2

%A _Antti Karttunen_, Sep 24 2018