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.

A066522 Numbers n whose divisors less than or equal to sqrt(n) are consecutive, from 1 up to some number k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 19, 22, 23, 24, 26, 29, 31, 34, 37, 38, 41, 43, 46, 47, 53, 58, 59, 60, 61, 62, 67, 71, 73, 74, 79, 82, 83, 86, 89, 94, 97, 101, 103, 106, 107, 109, 113, 118, 122, 127, 131, 134, 137, 139, 142, 146, 149, 151, 157
Offset: 1

Views

Author

Johan G. van der Galien (galien8(AT)zonnet.nl), Jan 05 2002

Keywords

Comments

The sequence consists of all numbers of the form p or 2p with p prime, along with 1, 8, 12, 18, 24 and 60. Sketch of proof: If k<=2 then n=1 or 8 or p or 2p. If k>2, then one of the numbers k+1, ..., k+4 is == 2 (mod 4); call it m. Then m/2 is an odd number <= k, so m = 2 * (m/2) divides n. Since m is not among 1,2,...,k, it must be greater than sqrt(n), so sqrt(n) < m <= k+4. Also, n is divisible by all positive integers <= k, including k, k-1 and k-2, whose least common multiple is their product divided by 1 or 2. So n >= k(k-1)(k-2)/2. Combining these inequalities implies k<=7 and n<=120.
Changing the definition to use "less than sqrt(n)" doesn't change the sequence. - Stewart Gordon, Sep 27 2011

Examples

			60 = 1*60 = 2*30 = 3*20 = 4*15 = 5*12 = 6*10.
		

Crossrefs

Cf. A066664 (composite terms); A074964, A000196.
Cf. A161906.

Programs

  • Haskell
    import Data.List (genericLength)
    a066522 n = a066522_list !! (n-1)
    a066522_list = filter f [1..] where
       f x = genericLength ds == maximum ds where ds = a161906_row x
    -- Reinhard Zumkeller, Jun 24 2015, Nov 14 2011
  • Mathematica
    test[n_] := Module[{}, d=Divisors[n]; d=Take[d, Ceiling[Length[d]/2]]; Last[d]==Length[d]]; Select[Range[1, 200], test]
    cdQ[n_]:=Module[{d=Union[Differences[Select[Divisors[n],#<=Sqrt[n]&]]]},d=={}||d=={1}]; Select[Range[200],cdQ] (* Harvey P. Dale, Feb 12 2017 *)
  • PARI
    { n=0; for (m=1, 10^10, d=divisors(m); b=1; for (i=2, ceil(length(d)/2), if (d[i] - d[i-1] > 1, b=0; break)); if (b, write("b066522.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Feb 21 2010
    

Extensions

Edited by Dean Hickerson, Jan 07 2002