cp's OEIS Frontend

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.

A093803 Greatest odd proper divisor of n; a(1)=1.

This page as a plain text file.
%I A093803 #26 Oct 27 2022 19:54:59
%S A093803 1,1,1,1,1,3,1,1,3,5,1,3,1,7,5,1,1,9,1,5,7,11,1,3,5,13,9,7,1,15,1,1,
%T A093803 11,17,7,9,1,19,13,5,1,21,1,11,15,23,1,3,7,25,17,13,1,27,11,7,19,29,1,
%U A093803 15,1,31,21,1,13,33,1,17,23,35,1,9,1,37,25,19,11,39,1,5,27,41,1,21,17
%N A093803 Greatest odd proper divisor of n; a(1)=1.
%H A093803 Antti Karttunen, <a href="/A093803/b093803.txt">Table of n, a(n) for n = 1..10000</a>
%F A093803 a(n) <= A000265(n);
%F A093803 a(n) = n / (A020639(n)*(n mod 2) + A006519(n)*(1 - n mod 2)).
%F A093803 a(n) = A000265(A032742(n)). - _Antti Karttunen_, Aug 12 2017
%p A093803 with(numtheory): a := n -> max(1,op(select(k->type(k,odd),divisors(n) minus {n}))): seq(a(n),n=1..85); # _Peter Luschny_, Feb 02 2015
%t A093803 Join[{1},Table[Max[Select[Most[Divisors[n]],OddQ]],{n,2,90}]] (* _Harvey P. Dale_, Apr 10 2012 *)
%t A093803 odd[n_] := n/2^IntegerExponent[n, 2]; a[n_] := odd[n/FactorInteger[n][[1, 1]]]; Array[a, 100] (* _Amiram Eldar_, Jul 04 2022 *)
%o A093803 (Scheme) (define (A093803 n) (/ n (if (odd? n) (A020639 n) (A006519 n)))) ;; _Antti Karttunen_, Aug 12 2017
%o A093803 (PARI) a(n)= my(x=if(n==1, 1, n/factor(n)[1, 1])); x >> valuation(x, 2); \\ _Michel Marcus_, Oct 26 2022
%o A093803 (Python)
%o A093803 from math import prod
%o A093803 from sympy import factorint
%o A093803 def A093803(n):
%o A093803     if n == 1: return 1
%o A093803     f = factorint(n)
%o A093803     m = min(f)
%o A093803     return prod(p**(0 if p == 2 else e-1 if p == m else e) for p,e in f.items()) # _Chai Wah Wu_, Oct 27 2022
%Y A093803 Cf. A000265, A005408, A006519, A006530, A020639, A032742, A078701.
%K A093803 nonn
%O A093803 1,6
%A A093803 _Reinhard Zumkeller_, May 19 2004