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.

A032742 a(1) = 1; for n > 1, a(n) = largest proper divisor of n (that is, for n>1, maximum divisor d of n in range 1 <= d < n).

This page as a plain text file.
%I A032742 #108 Feb 16 2025 08:32:36
%S A032742 1,1,1,2,1,3,1,4,3,5,1,6,1,7,5,8,1,9,1,10,7,11,1,12,5,13,9,14,1,15,1,
%T A032742 16,11,17,7,18,1,19,13,20,1,21,1,22,15,23,1,24,7,25,17,26,1,27,11,28,
%U A032742 19,29,1,30,1,31,21,32,13,33,1,34,23,35,1,36,1,37,25,38,11,39,1,40
%N A032742 a(1) = 1; for n > 1, a(n) = largest proper divisor of n (that is, for n>1, maximum divisor d of n in range 1 <= d < n).
%C A032742 It seems that a(n) = Max_{j=n+1..2n-1} gcd(n,j). - _Labos Elemer_, May 22 2002
%C A032742 This is correct: No integer in the range [n+1, 2n-1] has n as its divisor, but certainly at least one multiple of the largest proper divisor of n will occur there (e.g., if it is n/2, then at n + (n/2)). - _Antti Karttunen_, Dec 18 2014
%C A032742 The slopes of the visible lines made by the points in the scatter plot are 1/2, 1/3, 1/5, 1/7, ... (reciprocals of primes). - _Moosa Nasir_, Jun 19 2022
%H A032742 Rémi Eismann, <a href="/A032742/b032742.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)
%H A032742 Moosa Nasir, <a href="https://raw.githubusercontent.com/TealEgg/Testing/main/Slopes.png">Slopes</a>.
%H A032742 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ProperDivisor.html">Proper Divisor</a>.
%F A032742 a(n) = n / A020639(n).
%F A032742 Other identities and observations:
%F A032742 A054576(n) = a(a(n)); A117358(n) = a(a(a(n))) = a(A054576(n)); a(A008578(n)) = 1, a(A002808(n)) > 1. - _Reinhard Zumkeller_, Mar 10 2006
%F A032742 a(n) = A130064(n) / A006530(n). - _Reinhard Zumkeller_, May 05 2007
%F A032742 a(m)*a(n) < a(m*n) for m and n > 1. - _Reinhard Zumkeller_, Apr 11 2008
%F A032742 a(m*n) = max(m*a(n), n*a(m)). - _Robert Israel_, Dec 18 2014
%F A032742 From _Antti Karttunen_, Mar 31 2018: (Start)
%F A032742 a(n) = n - A060681(n).
%F A032742 For n > 1, a(n) = A003961^(r)(A246277(n)), where r = A055396(n)-1 and A003961^(r)(n) stands for shifting the prime factorization of n by r positions towards larger primes.
%F A032742 a(n) = A250246(A302042(A250245(n))) = A302026(A302032(A302025(n))).
%F A032742 For all n >= 1, A276085(a(A276086(n))) = A276151(n).
%F A032742 (End)
%F A032742 Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Sum_{k>=1} A005867(k-1)/(prime(k)*A002110(k)) = 0.165049... . - _Amiram Eldar_, Nov 19 2022
%p A032742 A032742 :=proc(n) option remember; if n = 1 then 1; else numtheory[divisors](n) minus {n} ; max(op(%)) ; end if; end proc: # _R. J. Mathar_, Jun 13 2011
%p A032742 1, seq(n/min(numtheory:-factorset(n)), n=2..1000); # _Robert Israel_, Dec 18 2014
%t A032742 f[n_] := If[n == 1, 1, Divisors[n][[-2]]]; Table[f[n], {n, 100}] (* _Vladimir Joseph Stephan Orlovsky_, Mar 03 2010 *)
%t A032742 Join[{1},Divisors[#][[-2]]&/@Range[2,80]] (* _Harvey P. Dale_, Nov 29 2011 *)
%t A032742 a[n_] := n/FactorInteger[n][[1, 1]]; Array[a, 100] (* _Amiram Eldar_, Nov 26 2020 *)
%t A032742 Table[Which[n==1,1,PrimeQ[n],1,True,Divisors[n][[-2]]],{n,80}] (* _Harvey P. Dale_, Feb 02 2022 *)
%o A032742 (PARI) a(n)=if(n==1,1,n/factor(n)[1,1]) \\ _Charles R Greathouse IV_, Jun 15 2011
%o A032742 (Haskell)
%o A032742 a032742 n = n `div` a020639 n  -- _Reinhard Zumkeller_, Oct 03 2012
%o A032742 (Scheme) (define (A032742 n) (/ n (A020639 n))) ;; _Antti Karttunen_, Dec 18 2014
%o A032742 (Python)
%o A032742 from sympy import factorint
%o A032742 def a(n): return 1 if n == 1 else n//min(factorint(n))
%o A032742 print([a(n) for n in range(1, 81)]) # _Michael S. Branicky_, Jun 21 2022
%Y A032742 Cf. A002110, A002808, A005867, A006530, A008578, A020639, A032741, A003961, A052126, A054576, A055396, A060681, A068319, A063928, A130064, A246277, A250245, A250246, A276085, A276086, A276151, A286477, A300236, A302025, A302026, A302032, A302042, A325563, A325567.
%Y A032742 Maximal GCD of k positive integers with sum n for k = 2..10: this sequence (k=2,n>=2), A355249 (k=3), A355319 (k=4), A355366 (k=5), A355368 (k=6), A355402 (k=7), A354598 (k=8), A354599 (k=9), A354601 (k=10).
%K A032742 nonn,easy,nice
%O A032742 1,4
%A A032742 _Patrick De Geest_, May 15 1998
%E A032742 Definition clarified by _N. J. A. Sloane_, Dec 26 2022