This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A252463 #33 Jan 21 2023 03:27:17 %S A252463 1,1,2,2,3,3,5,4,4,5,7,6,11,7,6,8,13,9,17,10,10,11,19,12,9,13,8,14,23, %T A252463 15,29,16,14,17,15,18,31,19,22,20,37,21,41,22,12,23,43,24,25,25,26,26, %U A252463 47,27,21,28,34,29,53,30,59,31,20,32,33,33,61,34,38,35,67,36,71,37,18,38,35,39,73,40,16 %N A252463 Hybrid shift: a(1) = 1, a(2n) = n, a(2n+1) = A064989(2n+1); shift the even numbers one bit right, shift the prime factorization of odd numbers one step towards smaller primes. %C A252463 For any node n >= 2 in binary trees A005940 and A163511, a(n) gives the parent node of n. (Here we assume that their initial root 1 is its own parent). %H A252463 Antti Karttunen, <a href="/A252463/b252463.txt">Table of n, a(n) for n = 1..8192</a> %F A252463 a(1) = 1, a(2n) = n, a(2n+1) = A064989(2n+1). %F A252463 Other identities. For all n >= 1: %F A252463 a(2n-1) = A064216(n). %F A252463 A001222(a(n)) = A001222(n) - (1 - A000035(n)). %F A252463 Above means: if n is odd, A001222(a(n)) = A001222(n) and if n is even, A001222(a(n)) = A001222(n) - 1. %F A252463 Sum_{k=1..n} a(k) ~ c * n^2, where c = 1/8 + (1/2) * Product_{p prime > 2} ((p^2-p)/(p^2-q(p))) = 0.2905279467..., where q(p) = prevprime(p) (A151799). - _Amiram Eldar_, Jan 21 2023 %t A252463 Table[Which[n == 1, 1, EvenQ@ n, n/2, True, Times @@ Power[ %t A252463 Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n], {n, 81}] (* _Michael De Vlieger_, Sep 16 2017 *) %o A252463 (Scheme) (define (A252463 n) (cond ((<= n 1) n) ((even? n) (/ n 2)) (else (A064989 n)))) %o A252463 (Python) %o A252463 from sympy import factorint, prevprime %o A252463 from operator import mul %o A252463 def a064989(n): %o A252463 f = factorint(n) %o A252463 return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f]) %o A252463 def a(n): return 1 if n==1 else n//2 if n%2==0 else a064989(n) %o A252463 print([a(n) for n in range(1, 51)]) # _Indranil Ghosh_, Sep 15 2017 %o A252463 (PARI) a064989(n) = factorback(Mat(apply(t->[max(precprime(t[1]-1), 1), t[2]], Vec(factor(n)~))~)); \\ A064989 %o A252463 a(n) = if (n==1, 1, if (n%2, a064989(n), n/2)); \\ _Michel Marcus_, Oct 13 2021 %Y A252463 A252464 gives the number of iterations needed to reach 1 from n. %Y A252463 Bisections: A000027 and A064216. %Y A252463 Cf. A000035, A001222, A004526, A005940, A064989, A151799, A163511, A246277, A252461, A252462. %K A252463 nonn,look %O A252463 1,3 %A A252463 _Antti Karttunen_, Dec 20 2014