login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Restricted growth sequence transform of A297156, which is Möbius transform of A243354.
5

%I #6 Dec 28 2017 19:34:06

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

%T 18,19,20,21,22,23,5,5,24,25,26,22,27,28,29,17,10,30,31,32,2,5,33,23,

%U 34,7,35,26,36,37,38,19,39,40,15,41,42,43,44,25,45,19,46,7,47,48,7,30,5,49,50,51,52,53,54,55,56,57,58,33

%N Restricted growth sequence transform of A297156, which is Möbius transform of A243354.

%H Antti Karttunen, <a href="/A297157/b297157.txt">Table of n, a(n) for n = 1..8192</a>

%o (PARI)

%o up_to = 8192;

%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 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};

%o A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));

%o A006068(n)= { my(s=1, ns); while(1, ns = n >> s; if(0==ns, break()); n = bitxor(n, ns); s <<= 1; ); return (n); } \\ Essentially _Joerg Arndt_'s Jul 19 2012 code.

%o A243354(n) = A006068(A156552(n));

%o A297156(n) = sumdiv(n,d,moebius(n/d)*A243354(d));

%o write_to_bfile(1,rgs_transform(vector(up_to,n,A297156(n))),"b297157.txt");

%Y Cf. A006068, A156552, A243354, A297156.

%Y Cf. also A297113, A297161, A297162.

%K nonn

%O 1,2

%A _Antti Karttunen_, Dec 28 2017