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-6 of 6 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

A181063 Smallest positive integer with a discrete string of exactly n consecutive divisors, or 0 if no such integer exists.

Original entry on oeis.org

1, 2, 6, 12, 3960, 60, 420, 840, 17907120, 2520, 411863760, 27720, 68502634200, 447069823200, 360360, 720720, 7600186994400, 12252240, 9524356075634400, 81909462250455840, 1149071006394511200, 232792560, 35621201198229847200, 5354228880, 91351145008363640400
Offset: 1

Views

Author

Matthew Vandermast, Oct 07 2010

Keywords

Comments

The word "discrete" is used to describe a string of consecutive divisors that is not part of a longer such string.
Does a(n) ever equal 0?
a(n) = A003418(n) iff n belongs to A181062; otherwise, a(n) > A003418(n). a(A181062(n)) = A051451(n).

Examples

			a(5) = 3960 is divisible by 8, 9, 10, 11, and 12, but not 7 or 13. It is the smallest positive integer with a string of 5 consecutive divisors that is not part of a longer string.
From _Gus Wiseman_, Oct 16 2019: (Start)
The sequence of terms together with their divisors begins:
     1: {1}
     2: {1,2}
     6: {1,2,3,6}
    12: {1,2,3,4,6,12}
  3960: {1,2,...,8,9,10,11,12,...,1980,3960}
    60: {1,2,3,4,5,6,...,30,60}
   420: {1,2,3,4,5,6,7,...,210,420}
   840: {1,2,3,4,5,6,7,8,...,420,840}
(End)
		

Crossrefs

The version taking only the longest run is A328449.
The longest run of divisors of n has length A055874(n).
Numbers whose divisors > 1 have no non-singleton runs are A088725.
The number of successive pairs of divisors of n is A129308(n).

Programs

  • Mathematica
    tav=Table[Length/@Split[Divisors[n],#2==#1+1&],{n,10000}];
    Table[Position[tav,i][[1,1]],{i,Split[Union@@tav,#2==#1+1&][[1]]}] (* Assumes there are no zeros. - Gus Wiseman, Oct 16 2019 *)

A328457 Length of the longest run of divisors > 1 of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 5, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Oct 16 2019

Keywords

Crossrefs

Records occur at A328448.
Positions of 0's and 1's are A088725.
The version that looks at all divisors (including 1) is A055874.
The number of successive pairs of divisors > 1 of n is A088722(n).
The Heinz number of the multiset of run-lengths of divisors of n is A328166(n).
The longest run of nontrivial divisors of n is A328458(n).

Programs

  • Mathematica
    Table[If[n==1,0,Max@@Length/@Split[Rest[Divisors[n]],#2==#1+1&]],{n,100}]
  • PARI
    A328457(n) = { my(rl=0,pd=0,m=0); fordiv(n, d, if(d>1, if(d>(1+pd), m = max(m,rl); rl=0); pd=d; rl++)); max(m,rl); }; \\ Antti Karttunen, Feb 23 2023

Extensions

Data section extended up to a(105) by Antti Karttunen, Feb 23 2023

A328449 Smallest number in whose divisors the longest run is of length n, and 0 if none exists.

Original entry on oeis.org

0, 1, 2, 6, 12, 0, 60, 420, 840, 0, 2520, 0, 27720, 0, 0, 360360, 720720, 0, 12252240, 0, 0, 0, 232792560, 0, 5354228880, 0, 26771144400, 0, 80313433200, 0, 2329089562800, 72201776446800, 0, 0, 0, 0, 144403552893600, 0, 0, 0, 5342931457063200, 0
Offset: 0

Views

Author

Gus Wiseman, Oct 16 2019

Keywords

Crossrefs

Positions of 0's are 0 followed by A024619 - 1.
The version that looks only at all divisors > 1 is A328448.
The longest run of divisors of n has length A055874.
The longest run of divisors of n greater than one has length A328457.
Numbers whose divisors have no non-singleton runs are A005408.
The number of successive pairs of divisors of n is A129308(n).
The Heinz number of the multiset of run-lengths of divisors of n is A328166(n).
The smallest number whose divisors have a (not necessarily longest) maximal run of length n is A181063.

Programs

  • Mathematica
    tav=Table[Max@@Length/@Split[Divisors[n],#2==#1+1&],{n,10000}];
    Table[If[FreeQ[tav,i],0,Position[tav,i][[1,1]]],{i,0,Max@@tav}]

Formula

a(n) = LCM(1,2,...,n) = A003418(n) if n + 1 is a prime power, otherwise a(n) = 0.

A328458 Maximum run-length of the nontrivial divisors (greater than 1 and less than n) of n.

Original entry on oeis.org

1, 0, 0, 1, 0, 2, 0, 1, 1, 1, 0, 3, 0, 1, 1, 1, 0, 2, 0, 2, 1, 1, 0, 3, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 1, 3, 0, 1, 1, 2, 0, 2, 0, 1, 1, 1, 0, 3, 1, 1, 1, 1, 0, 2, 1, 2, 1, 1, 0, 5, 0, 1, 1, 1, 1, 2, 0, 1, 1, 1, 0, 3, 0, 1, 1, 1, 1, 2, 0, 2, 1, 1, 0, 3, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 3, 0, 1, 1, 2, 0, 2, 0, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Oct 17 2019

Keywords

Comments

By convention, a(1) = 1, and a(p) = 0 for p prime.

Examples

			The non-singleton runs of the nontrivial divisors of 1260 are: {2,3,4,5,6,7} {9,10} {14,15} {20,21} {35,36}, so a(1260) = 6.
		

Crossrefs

Positions of first appearances are A328459.
Positions of 0's and 1's are A088723.
The version that looks at all divisors is A055874.
The number of successive pairs of divisors > 1 of n is A088722(n).
The Heinz number of the multiset of run-lengths of divisors of n is A328166(n).

Programs

  • Mathematica
    Table[Switch[n,1,1,?PrimeQ,0,,Max@@Length/@Split[DeleteCases[Divisors[n],1|n],#2==#1+1&]],{n,100}]
  • PARI
    A328458(n) = if(1==n,n,my(rl=0,pd=0,m=0); fordiv(n, d, if(1(1+pd), m = max(m,rl); rl=0); pd=d; rl++)); max(m,rl)); \\ Antti Karttunen, Feb 23 2023

Extensions

Data section extended up to a(105) by Antti Karttunen, Feb 23 2023

A328459 Sorted positions of first appearances in A328458 (maximum run-length of nontrivial divisors) of each positive integer in the image.

Original entry on oeis.org

1, 2, 6, 12, 60, 420, 504, 840, 2520, 27720, 360360, 720720, 4084080
Offset: 0

Views

Author

Gus Wiseman, Oct 17 2019

Keywords

Examples

			The sequence of terms > 1 together with their nontrivial divisors begins:
    2: {}
    6: {2,3}
   12: {2,3,4,6}
   60: {2,3,4,5,6,10,12,15,20,30}
  420: {2,3,4,5,6,7,10,12,14,15,20,21,28,30,35,42,60,70,84,105,140,210}
  504: {2,3,4,6,7,8,9,12,14,18,21,24,28,36,42,56,63,72,84,126,168,252}
		

Crossrefs

Positions of first appearances in A328458.
The version for all divisors is A051451.

Programs

  • Mathematica
    dav=Table[Switch[n,1,1,_,Max@@Length/@Split[DeleteCases[Divisors[n],1|n],#2==#1+1&]],{n,1000}];
    Table[Position[dav,i][[1,1]],{i,Union[dav]}]//Sort

Extensions

a(12) from Robert Israel, Mar 31 2023
Showing 1-6 of 6 results.