login
Lexicographically earliest infinite sequence such that a(i) = a(j) => A349915(i) = A349915(j) for all i, j >= 1, where A349915 is Dirichlet inverse of arithmetic mean between the number of odd divisors and their sum.
2

%I #8 Oct 12 2023 20:48:04

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

%T 13,20,4,21,12,22,4,23,24,25,4,26,27,28,4,29,30,31,4,7,1,32,4,33,1,25,

%U 4,34,21,35,4,36,37,29,4,38,19,39,4,40,41,42,4,43,38,11,4,38,44,45,4,29,32,46,4,34,47,48,4,49

%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A349915(i) = A349915(j) for all i, j >= 1, where A349915 is Dirichlet inverse of arithmetic mean between the number of odd divisors and their sum.

%H Antti Karttunen, <a href="/A366383/b366383.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 DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1])*sumdiv(n, d, if(d<n, v[n/d]*u[d], 0))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v

%o A113415(n) = if(n<1, 0, sumdiv(n, d, if(d%2, (d+1)/2)));

%o v366383 = rgs_transform(DirInverseCorrect(vector(up_to,n,A113415(n))));

%o A366383(n) = v366383[n];

%Y Cf. A113415, A349915.

%K nonn

%O 1,2

%A _Antti Karttunen_, Oct 12 2023