Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 Feb 10 2022 20:05:44
%S 1,1,2,1,3,2,2,1,13,3,3,2,7,2,3,1,13,13,5,3,2,3,3,2,31,7,5,2,5,3,2,1,
%T 3,13,3,13,19,5,7,3,7,2,11,3,13,3,3,2,19,31,13,7,5,5,13,2,5,5,5,3,31,
%U 2,13,1,7,3,17,13,3,3,13,13,37,19,31,5,3,7,5,3,19,7,7,2,5,11,5,3,13,13,7,3,2,3,5,2,19
%N a(n) is the largest prime factor (A006530) of all terms encountered when iterating the map x -> A000593(x), when starting from x = n, but excluding the n itself. If n is a power of 2, then a(n) = 1. If 1 is never reached, then a(n) = -1.
%H Antti Karttunen, <a href="/A347240/b347240.txt">Table of n, a(n) for n = 1..20000</a>
%F a(n) = A347241(A000593(n)). - _Antti Karttunen_, Feb 10 2022
%e For n = 17, the iteration proceeds as follows 17 -> 18 (= 2*3*3), 18 -> 13 (13 is a prime), 13 -> 14 (= 2*7), 14 -> 8 (= 2*2*2), 8 -> 1. The largest prime factor present after the initial step is 13, thus a(17) = 13.
%o (PARI)
%o A006530(n) = if(1==n, n, my(f=factor(n)); f[#f~, 1]);
%o A000265(n) = (n >> valuation(n, 2));
%o A000593(n) = sigma(A000265(n));
%o A347240(n) = { my(m=1); while(n>1, n = A000593(n); m = max(m, A006530(n))); (m); };
%Y Cf. A000593, A006530, A336361, A347241, A347242, A347243, A347244.
%Y Cf. also A161942.
%K nonn
%O 1,3
%A _Antti Karttunen_, Aug 28 2021