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.

Showing 1-7 of 7 results.

A033676 Largest divisor of n <= sqrt(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 4, 1, 3, 1, 4, 3, 2, 1, 4, 5, 2, 3, 4, 1, 5, 1, 4, 3, 2, 5, 6, 1, 2, 3, 5, 1, 6, 1, 4, 5, 2, 1, 6, 7, 5, 3, 4, 1, 6, 5, 7, 3, 2, 1, 6, 1, 2, 7, 8, 5, 6, 1, 4, 3, 7, 1, 8, 1, 2, 5, 4, 7, 6, 1, 8, 9, 2, 1, 7, 5, 2, 3
Offset: 1

Views

Author

Keywords

Comments

a(n) = sqrt(n) is a new record if and only if n is a square. - Zak Seidov, Jul 17 2009
a(n) = A060775(n) unless n is a square, when a(n) = A033677(n) = sqrt(n) is strictly larger than A060775(n). It would be nice to have an efficient algorithm to calculate these terms when n has a large number of divisors, as for example in A060776, A060777 and related problems such as A182987. - M. F. Hasler, Sep 20 2011
a(n) = 1 when n = 1 or n is prime. - Alonso del Arte, Nov 25 2012
a(n) is the smallest central divisor of n. Column 1 of A207375. - Omar E. Pol, Feb 26 2019
a(n^4+n^2+1) = n^2-n+1: suppose that n^2-n+k divides n^4+n^2+1 = (n^2-n+k)*(n^2+n-k+2) - (k-1)*(2*n+1-k) for 2 <= k <= 2*n, then (k-1)*(2*n+1-k) >= n^2-n+k, or n^2 - (2*k-1)*n + (k^2-k+1) = (n-k+1/2)^2 + 3/4 < 0, which is impossible. Hence the next smallest divisor of n^4+n^2+1 than n^2-n+1 is at least n^2-n+(2*n+1) = n^2+n+1 > sqrt(n^4+n^2+1). - Jianing Song, Oct 23 2022

References

  • G. Tenenbaum, pp. 268 ff, in: R. L. Graham et al., eds., Mathematics of Paul Erdős I.

Crossrefs

Cf. A033677 (n/a(n)), A000196 (sqrt), A027750 (list of divisors), A056737 (n/a(n) - a(n)), A219695 (half of this for odd numbers), A207375 (list the central divisor(s)).
The strictly inferior case is A060775. Cf. also A140271.
Indices of given values: A008578 (1 and the prime numbers: a(n) = 1), A161344 (a(n) = 2), A161345 (a(n) = 3), A161424 (4), A161835 (5), A162526 (6), A162527 (7), A162528 (8), A162529 (9), A162530 (10), A162531 (11), A162532 (12), A282668 (indices of primes).

Programs

  • Haskell
    a033676 n = last $ takeWhile (<= a000196 n) $ a027750_row n
    -- Reinhard Zumkeller, Jun 04 2012
    
  • Maple
    A033676 := proc(n) local a,d; a := 0 ; for d in numtheory[divisors](n) do if d^2 <= n then a := max(a,d) ; end if; end do: a; end proc: # R. J. Mathar, Aug 09 2009
  • Mathematica
    largestDivisorLEQR[n_Integer] := Module[{dvs = Divisors[n]}, dvs[[Ceiling[Length@dvs/2]]]]; largestDivisorLEQR /@ Range[100] (* Borislav Stanimirov, Mar 28 2010 *)
    Table[Last[Select[Divisors[n],#<=Sqrt[n]&]],{n,100}] (* Harvey P. Dale, Mar 17 2017 *)
  • PARI
    A033676(n) = {local(d);if(n<2,1,d=divisors(n);d[(length(d)+1)\2])} \\ Michael B. Porter, Jan 30 2010
    
  • Python
    from sympy import divisors
    def A033676(n):
        d = divisors(n)
        return d[(len(d)-1)//2]  # Chai Wah Wu, Apr 05 2021

Formula

a(n) = n / A033677(n).
a(n) = A161906(n,A038548(n)). - Reinhard Zumkeller, Mar 08 2013
a(n) = A162348(2n-1). - Daniel Forgues, Sep 29 2014

A033677 Smallest divisor of n >= sqrt(n).

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 4, 3, 5, 11, 4, 13, 7, 5, 4, 17, 6, 19, 5, 7, 11, 23, 6, 5, 13, 9, 7, 29, 6, 31, 8, 11, 17, 7, 6, 37, 19, 13, 8, 41, 7, 43, 11, 9, 23, 47, 8, 7, 10, 17, 13, 53, 9, 11, 8, 19, 29, 59, 10, 61, 31, 9, 8, 13, 11, 67, 17, 23, 10, 71, 9, 73, 37, 15, 19, 11, 13, 79, 10
Offset: 1

Views

Author

Keywords

Comments

a(n) is the smallest k such that n appears in the k X k multiplication table and A027424(k) is the number of n with a(n) <= k.
a(n) is the largest central divisor of n. Right border of A207375. - Omar E. Pol, Feb 26 2019
If we define a divisor d|n to be superior if d >= n/d, then superior divisors are counted by A038548 and listed by A161908. This sequence selects the smallest superior divisor of n. - Gus Wiseman, Feb 19 2021
a(p) = p for p a prime or 1, these are also the record high points in this sequence. - Charles Kusniec, Aug 26 2022
a(n^4+n^2+1) = n^2+n+1 (see A033676). - Jianing Song, Oct 23 2022

Examples

			From _Gus Wiseman_, Feb 19 2021: (Start)
The divisors of 36 are {1,2,3,4,6,9,12,18,36}. Of these {1,2,3,4,6} are inferior and {6,9,12,18,36} are superior, so a(36) = 6.
The divisors of 40 are {1,2,4,5,8,10,20,40}. Of these {1,2,4,5} are inferior and {8,10,20,40} are superior, so a(40) = 8.
(End)
		

References

  • G. Tenenbaum, pp. 268ff of R. L. Graham et al., eds., Mathematics of Paul Erdős I.

Crossrefs

The lower central divisor is A033676.
The strictly superior case is A140271.
Leftmost column of A161908 (superior divisors).
Rightmost column of A207375 (central divisors).
A038548 counts superior (or inferior) divisors.
A056924 counts strictly superior (or strictly inferior) divisors.
A063538/A063539 list numbers with/without a superior prime divisor.
A070038 adds up superior divisors.
A341676 selects the unique superior prime divisor.
- Strictly Inferior: A070039, A333805, A333806, A341596, A341674, A341677.

Programs

  • Haskell
    a033677 n = head $
       dropWhile ((< n) . (^ 2)) [d | d <- [1..n], mod n d == 0]
    -- Reinhard Zumkeller, Oct 20 2011
    
  • Maple
    A033677 := proc(n)
        n/A033676(n) ;
    end proc:
  • Mathematica
    Table[Select[Divisors[n], # >= Sqrt[n] &, 1] // First, {n, 80}]  (* Jean-François Alcover, Apr 01 2011 *)
  • PARI
    A033677(n) = {local(d); d=divisors(n); d[length(d)\2+1]} \\ Michael B. Porter, Feb 26 2010
    
  • Python
    from sympy import divisors
    def A033677(n):
        d = divisors(n)
        return d[len(d)//2]  # Chai Wah Wu, Apr 05 2021

Formula

a(n) = n/A033676(n).
a(n) = A162348(2n). - Daniel Forgues, Sep 29 2014

A056737 Minimum nonnegative integer m such that n = k*(k+m) for some positive integer k.

Original entry on oeis.org

0, 1, 2, 0, 4, 1, 6, 2, 0, 3, 10, 1, 12, 5, 2, 0, 16, 3, 18, 1, 4, 9, 22, 2, 0, 11, 6, 3, 28, 1, 30, 4, 8, 15, 2, 0, 36, 17, 10, 3, 40, 1, 42, 7, 4, 21, 46, 2, 0, 5, 14, 9, 52, 3, 6, 1, 16, 27, 58, 4, 60, 29, 2, 0, 8, 5, 66, 13, 20, 3, 70, 1, 72, 35, 10, 15, 4
Offset: 1

Views

Author

Leroy Quet, Aug 26 2000

Keywords

Comments

a(n) is difference between the least divisor of n that is >= square root(n) and the greatest divisor of n that is <= square root(n).
From Omar E. Pol, Aug 12 2009: (Start)
a(n) = 0 iff n is a square.
a(n) = n-1 is a new record iff n is a prime number. (End)
For odd n = 2k-1, a(n) = 2*A219695(k) is even. - M. F. Hasler, Nov 25 2012
Conjecture: There exists some constant, k, approximately equal to 1.7, such that a(n) is of average order k*n/log(n). See Tooth Link for evidence. - Clive Tooth, Mar 18 2025

Examples

			a(8) = 2 because 8 = 2*(2+2) and 8 = k*(k+1) or 8 = k^2 have no solutions for k = a positive integer.
		

Crossrefs

Programs

  • Mathematica
    A033676[n_] := If[EvenQ[DivisorSigma[0, n]], Divisors[n][[DivisorSigma[0, n]/2]], Sqrt[n]]; A033677[n_] := If[EvenQ[DivisorSigma[0, n]], Divisors[n][[DivisorSigma[0, n]/2+1]], Sqrt[n]]; Table[A033677[n] - A033676[n], {n, 1, 77}] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 27 2004 *)
    Table[d = Divisors[n]; len = Length[d]; If[OddQ[len], 0, d[[1 + len/2]] - d[[len/2]]], {n, 100}] (* T. D. Noe, Jun 04 2012 *)
  • PARI
    A056737(n)={n=divisors(n);n[(2+#n)\2]-n[(1+#n)\2]}  \\ M. F. Hasler, Nov 25 2012

Formula

a(n) = Min_{t - d | 0 < d <= t <= n and d*t=n}. - Reinhard Zumkeller, Feb 25 2002
a(n) = A033677(n)-A033676(n). - Omar E. Pol, Jun 21 2009
a(2n-1) = 2*A219695(n). - M. F. Hasler, Nov 25 2012

A003681 a(n) = min { p +- q : p +- q > 1 and p*q = Product_{k=1..n-1} a(k) }.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 107, 197, 3293, 74057, 1124491, 1225063003, 48403915086083, 229199690093487791653, 139394989871393443893426292667, 2310767115930351361890156080500119173238113, 521722354210765171422123515738862106081757768167379798858040637
Offset: 1

Views

Author

Keywords

Comments

a(n) = A082120(Product_{k=1..n-1} a(k)) for n >= 3. - Robert Israel, Aug 12 2015
The + sign in the definition applies only for n = 1 and n = 2, thereafter only the - sign is relevant and will yield the minimum. The definition could be reformulated in a way similar to that of A056737. - M. F. Hasler, Aug 17 2015

Examples

			a(4) = 7 because 2*3*5 = 30 whose divisors are 1, 2, 3, 5, 6, 10, 15 and 30. The closest p and q are 5 and 6 but its difference is 1 so the next closest p and q are 3 and 10 whose difference is 7.
		

References

  • J. H. Conway, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    a[1] = 2; a[2] = 3; a[n_] := a[n] = Block[{d, l, t, p = Product[a[i], {i, n - 1}]}, d = Divisors[p]; l = Length[d]; t = Take[d, {l/2 - 1, l/2 + 2}]; If[t[[3]] - t[[2]] == 1, t[[4]] - t[[1]], t[[3]] - t[[2]]]]; Array[a, 16] (* Robert G. Wilson v, May 27 2012 *)
  • PARI
    A003681(N,a=[2,3])={while(#a1||next;a=concat(a,d[i+1]-d[#d-i]);break));a} \\ May require allocatemem() for N >= 15. - M. F. Hasler, Aug 17 2015

Extensions

a(15) from Robert G. Wilson v, Feb 26 1996
a(16) from Naohiro Nomoto, Jun 25 2001
a(17) from Robert G. Wilson v, Sep 15 2006
a(18) from Robert G. Wilson v, Jul 20 2009
a(19) from Sean A. Irvine, Jul 29 2015

A377499 a(n) is the median of the divisors of 2n-1.

Original entry on oeis.org

1, 2, 3, 4, 3, 6, 7, 4, 9, 10, 5, 12, 5, 6, 15, 16, 7, 6, 19, 8, 21, 22, 7, 24, 7, 10, 27, 8, 11, 30, 31, 8, 9, 34, 13, 36, 37, 10, 9, 40, 9, 42, 11, 16, 45, 10, 17, 12, 49, 10, 51, 52, 11, 54, 55, 20, 57, 14, 11, 12, 11, 22, 15, 64, 23, 66, 13, 12, 69, 70, 25, 12, 17, 14, 75, 76
Offset: 1

Views

Author

Charles Kusniec, Oct 30 2024

Keywords

Comments

From Rémi Guillaume, Nov 26 2024 and Dec 05 2024: (Start)
2n-1 has only odd divisors; so the sum of any two of them is even.
a(n) and A219695(n) have opposite parity.
a(n) and n have the same parity.
a(n) = sqrt(2n-1) iff 2n-1 = (2j+1)^2 for some j >= 0, iff n is a centered square (A001844(j)); in this case, the two "median" divisors coincide with 2j+1, so their mean a(n) = 2j+1 and A219695(n) = 0.
More generally, with s a nonnegative integer:
If j >= s and n is the centered square A001844(j), then a(n-2s^2) <= 2j+1 and A219695(n-2s^2) <= 2s.
If j > (s^2)/2 and n = A001844(j), then a(n-2s^2) = 2j+1 and A219695(n-2s^2) = 2s. (P)
Basis of the proofs: 2(n-2s^2)-1 = (2j+1)^2-(2s)^2.
If j = s and n = A001844(j), then n-2s^2 = 2j+1 and 2(n-2s^2)-1 = 4j+1.
(End)

Examples

			From _Michael De Vlieger_, Nov 01 2024: (Start)
Let u = 2*n-1, let factor d <= sqrt(u) be the largest such, and let D = u/d.
For n = 2, u = 2*2-1 = 3, d = 1, D = 3, so a(2) = (1+3)/2 = 2.
For n = 5, u = 2*5-1 = 9 is a perfect square and d = D = 3, so a(5) = (3+3)/2 = 3.
For n = 8, u = 2*8-1 = 15, d = 3, D = 5, so a(8) = (3+5)/2 = 4, etc. (End)
		

Crossrefs

Cf. A219695 (associated subtrahend square base forming 2n-1), A001844 (solutions of a(n)=sqrt(2n-1)), A006254 (indices of record highs).

Programs

  • Mathematica
    {1}~Join~Table[u = 2*n + 1; (# + u/#)/2 &@ #[[Floor[Length[#]/2] ]] &@ Divisors[u], {n, 2, 120}] (* Michael De Vlieger, Nov 01 2024 *)
  • Python
    from sympy import divisors
    def A377499(n): return (d:=(f:=divisors(m:=(n<<1)-1))[len(f)-1>>1])+m//d>>1 # Chai Wah Wu, Nov 07 2024

Formula

a(n) = (A033677(2n-1) + A033676(2n-1))/2.
a(n) = A063655(2n-1)/2.
a(n) = sqrt((2n-1) + A219695(n)^2).
a(n) = n iff 2n-1 is 1 or prime (n is 1 or in A006254); in this case, A219695(n) = n-1.
From Rémi Guillaume, Nov 21 2024: (Start)
a(n) = A361565(2n-1).
sqrt(2n-1) <= a(n) <= n.
a(n) = (A377865(n) + A377864(n))/2.
a(n) = A377864(n) + A219695(n).
a(n) = A377865(n) - A219695(n). (End)

Extensions

New name from Rémi Guillaume, Feb 19 2025

A377864 Largest divisor of 2n-1 less than or equal to sqrt(2n-1).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 1, 3, 1, 1, 5, 1, 7, 3, 1, 5, 3, 1, 1, 7, 5, 1, 3, 1, 1, 5, 7, 1, 9, 1, 5, 3, 1, 7, 3, 5, 1, 9, 1, 1, 7, 1, 1, 3, 1, 5, 9, 7, 11, 3, 5, 1, 3, 1, 7, 9, 1, 1, 3, 11, 5, 7, 1, 1, 9, 5, 1, 3, 7, 1, 11, 1, 13, 9
Offset: 1

Views

Author

Charles Kusniec, Nov 10 2024

Keywords

Crossrefs

Odd bisection of A033676.

Programs

  • Mathematica
    a[n_]:=Module[{k=2n-1},While[!Divisible[2n-1,k] || k>Sqrt[2n-1] ,k--]; k]; Array[a,86] (* Stefano Spezia, Nov 17 2024 *)
  • PARI
    a(n) = {my(d = divisors(2*n-1)); d[ceil(#d/2)]} \\ Thomas Scheuerle, Nov 17 2024

Formula

a(n) = A033676(2n-1).
a(n) = A377499(n) - A219695(n).

A377865 Smallest divisor of 2n-1 greater than or equal to sqrt(2n-1).

Original entry on oeis.org

1, 3, 5, 7, 3, 11, 13, 5, 17, 19, 7, 23, 5, 9, 29, 31, 11, 7, 37, 13, 41, 43, 9, 47, 7, 17, 53, 11, 19, 59, 61, 9, 13, 67, 23, 71, 73, 15, 11, 79, 9, 83, 17, 29, 89, 13, 31, 19, 97, 11, 101, 103, 15, 107, 109, 37, 113, 23, 13, 17, 11, 41, 25, 127, 43, 131, 19
Offset: 1

Views

Author

Charles Kusniec, Nov 10 2024

Keywords

Crossrefs

Odd bisection of A033677.

Programs

  • Mathematica
    a[n_]:=Module[{k=1},While[!Divisible[2n-1,k] || kStefano Spezia, Nov 17 2024 *)

Formula

a(n) = A033677(2n-1).
a(n) = A377499(n) + A219695(n).
Showing 1-7 of 7 results.