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-3 of 3 results.

A137921 Number of divisors d of n such that d+1 is not a divisor of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 23 2008

Keywords

Comments

a(n) = number of "divisor islands" of n. A divisor island is any set of consecutive divisors of a number where no pairs of consecutive divisors in the set are separated by 2 or more. - Leroy Quet, Feb 07 2010

Examples

			The divisors of 30 are 1,2,3,5,6,10,15,30. The divisor islands are (1,2,3), (5,6), (10), (15), (30). (Note that the differences between consecutive divisors 5-3, 10-6, 15-10 and 30-15 are all > 1.) There are 5 such islands, so a(30)=5.
		

Crossrefs

Bisections: A099774, A174199.
First appearance of n is at position A173569(n).
Numbers whose divisors have no non-singleton runs are A005408.
The longest run of divisors of n has length A055874(n).
The number of successive pairs of divisors of n is A129308(n).

Programs

  • Haskell
    a137921 n = length $ filter (> 0) $
       map ((mod n) . (+ 1)) [d | d <- [1..n], mod n d == 0]
    -- Reinhard Zumkeller, Nov 23 2011
    
  • Maple
    with(numtheory): disl := proc (b) local ct, j: ct := 1: for j to nops(b)-1 do if 2 <= b[j+1]-b[j] then ct := ct+1 else end if end do: ct end proc: seq(disl(divisors(n)), n = 1 .. 120); # Emeric Deutsch, Feb 12 2010
  • Mathematica
    f[n_] := Length@ Split[ Divisors@n, #2 - #1 == 1 &]; Array[f, 105] (* f(n) from Bobby R. Treat *) (* Robert G. Wilson v, Feb 22 2010 *)
    Table[Count[Differences[Divisors[n]],?(#>1&)]+1,{n,110}] (* _Harvey P. Dale, Jun 05 2012 *)
    a[n_] := DivisorSum[n, Boole[!Divisible[n, #+1]]&]; Array[a, 100] (* Jean-François Alcover, Dec 01 2015 *)
  • PARI
    a(n)=my(d,s=0);if(n%2,numdiv(n),d=divisors(n);for(i=1,#d,if(n%(d[i]+1),s++));s)
    
  • PARI
    a(n)=sumdiv(n,d,(n%(d+1)!=0)); \\ Joerg Arndt, Jan 06 2015
    
  • Python
    from sympy import divisors
    def A137921(n):
        return len([d for d in divisors(n,generator=True) if n % (d+1)])
    # Chai Wah Wu, Jan 05 2015

Formula

a(n) <= A000005(n), with equality iff n is odd; a(A137922(n)) = 2.
a(n) = A000005(n) - A129308(n). - Michel Marcus, Jan 06 2015
a(n) = A001222(A328166(n)). - Gus Wiseman, Oct 16 2019
Sum_{k=1..n} a(k) ~ n * (log(n) + 2*gamma - 2), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 18 2024

Extensions

Corrected and edited by Charles R Greathouse IV, Apr 19 2010
Edited by N. J. A. Sloane, Aug 10 2010

A195150 Number of divisors d of n such that d-1 does not divide n.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 3, 3, 1, 3, 1, 3, 3, 2, 1, 4, 2, 2, 3, 4, 1, 4, 1, 4, 3, 2, 3, 5, 1, 2, 3, 5, 1, 4, 1, 4, 5, 2, 1, 6, 2, 4, 3, 4, 1, 5, 3, 5, 3, 2, 1, 6, 1, 2, 5, 5, 3, 5, 1, 4, 3, 6, 1, 7, 1, 2, 5, 4, 3, 5, 1, 7, 4, 2, 1, 7, 3, 2
Offset: 1

Views

Author

Omar E. Pol, Sep 19 2011

Keywords

Comments

Define "subdivisor" of n to be the positive integer b such that b = d - 1, if d divides n and b does not divide n. For the list of subdivisors of n see A195153.
First occurrence of k is given in A173569. - Robert G. Wilson v, Sep 23 2011

Examples

			a(24) = 4 since the divisors of 24 are 1,2,3,4,6,8,12,24, so the subdivisors of 24 are 5,7,11,23 because 6-1 = 5, 8-1 = 7, 12-1 = 11 and 24-1 = 23. Note that the positive integers 1,2,3 are not subdivisors of 24 because they are divisors of 24.
		

Crossrefs

Programs

  • Haskell
    a195150 n = length [d | d <- [3..n], mod n d == 0, mod n (d-1) /= 0]
    -- Reinhard Zumkeller, Sep 23 2011
  • Mathematica
    f[n_] := Module[{d = Divisors[n]}, Length[Select[Rest[d-1], Mod[n, #] > 0 &]]]; Table[f[n], {n, 100}] (* T. D. Noe, Sep 22 2011 *)

Formula

a(n) = A137921(n) - 1. - Robert G. Wilson v, Sep 23 2001
Sum_{k=1..n} a(k) ~ n * (log(n) + 2*gamma - 3), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 18 2024

A173570 Where A174102 sets a new record.

Original entry on oeis.org

1, 3, 8, 15, 24, 36, 48, 72, 96, 140, 180, 280, 336, 420, 480, 672, 864, 900, 1008, 1080, 1260, 1980, 2340, 3744, 4032, 4680, 6048, 9450, 11088, 11880, 13440, 16632, 17280, 30888, 32400, 33264, 33600, 44352, 46800, 47520, 63360, 66528, 71280, 84240
Offset: 1

Views

Author

Robert G. Wilson v, Feb 22 2010

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ Split[ Divisors@n, #2 - #1 == 1 &] (* f(n) from Dr. Bobby R. Treat *); t = Table[0, {1000}]; k = 1; While[k < 10^9, a = f@k; If[a < 101 && t[[a]] == 0, t[[a]] = k; Print[{k, a}]]; k++ ]; lst = {1}; m = 1; While[m < 1001, If[ t[[m]] > lst[[ -1]], AppendTo[ lst, t[[m]]]]; m++ ]; lst
Showing 1-3 of 3 results.