login
a(n) = gcd(A329697(n), A331410(n)), where A329697, A331410 give the number of iterations needed to reach a power of 2, when using the map n -> n-(n/p), or respectively, n -> n+(n/p), where p is the largest prime factor of n.
1

%I #9 Jun 06 2024 08:23:38

%S 0,0,1,0,1,1,1,0,2,1,2,1,2,1,1,0,1,2,3,1,1,2,1,1,2,2,3,1,1,1,1,0,3,1,

%T 3,2,1,3,3,1,1,1,1,2,1,1,2,1,2,2,2,2,1,3,1,1,4,1,4,1,1,1,1,0,1,3,4,1,

%U 1,3,1,2,1,1,1,3,1,3,1,1,4,1,3,1,1,1,1,2,1,1,1,1,2,2,1,1,1,2,4,2,1,2,3,2,4

%N a(n) = gcd(A329697(n), A331410(n)), where A329697, A331410 give the number of iterations needed to reach a power of 2, when using the map n -> n-(n/p), or respectively, n -> n+(n/p), where p is the largest prime factor of n.

%C As A329697 and A331410 are both fully additive sequences, all sequences that give the positions of multiples of some natural number k in this sequence are closed under multiplication, i.e., are multiplicative semigroups.

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

%F a(n) = gcd(A329697(n), A334861(n)) = gcd(A331410(n), A334861(n)).

%F a(n) = gcd(A329697(n), A335877(n)) = gcd(A331410(n), A335877(n)).

%o (PARI)

%o A329697(n) = { my(f=factor(n)); sum(k=1,#f~,if(2==f[k,1],0,f[k,2]*(1+A329697(f[k,1]-1)))); };

%o A331410(n) = { my(f=factor(n)); sum(k=1,#f~,if(2==f[k,1],0,f[k,2]*(1+A331410(f[k,1]+1)))); };

%o A373382(n) = gcd(A329697(n), A331410(n));

%Y Cf. A329697, A331410, A334861, A335877.

%Y Cf. also A373370.

%K nonn

%O 1,9

%A _Antti Karttunen_, Jun 06 2024