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-10 of 15 results. Next

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

A129308 a(n) is the number of positive integers k such that k*(k+1) divides n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, May 26 2007

Keywords

Comments

The usual OEIS policy is not to include sequences like this where alternate terms are zero; this is an exception.
In other words, a(n) is the number of oblong numbers (A002378) dividing n. - Bernard Schott, Jul 29 2022

Examples

			The divisors of 20 are 1,2,4,5,10,20. Of these there are two that are of the form k(k+1): 2 = 1*2 and 20 = 4*5. So a(2) = 2.
		

Crossrefs

Positions of 0's and 1's are A088725, whose characteristic function is A360128.
First appearance of n is A287142(n), with sorted version A328450.
The longest run of divisors of n has length A055874(n).
One less than A195155.

Programs

  • Mathematica
    a = {}; For[n = 1, n < 90, n++, k = 1; co = 0; While[k < Sqrt[n], If[IntegerQ[ n/(k*(k + 1))], co++ ]; k++ ]; AppendTo[a, co]]; a (* Stefan Steinerberger, May 27 2007 *)
    Table[Count[Differences[Divisors[n]],1],{n,30}] (* Gus Wiseman, Oct 15 2019 *)
  • PARI
    a(n)=sumdiv(n, d, n%(d+1)==0); \\ Michel Marcus, Jan 06 2015
    
  • Python
    from itertools import pairwise
    from sympy import divisors
    def A129308(n): return 0 if n&1 else sum(1 for a, b in pairwise(divisors(n)) if a+1==b) # Chai Wah Wu, Jun 09 2025

Formula

a(2n-1) = 0; a(2n) = A007862(n). - Ray Chandler, Jun 24 2008
G.f.: Sum_{n>=1} x^(n*(n+1))/(1-x^(n*(n+1))). - Joerg Arndt, Jan 30 2011 [modified by Ilya Gutkovskiy, Apr 14 2021]
a(n) = A000005(n) - A137921(n), where A137921(n) is the number of maximal runs of successive divisors of n. - Gus Wiseman, Oct 15 2019
a(n) = Sum_{d|n} A005369(d). - Ridouane Oudra, Jan 22 2021
a(n) = A195155(n)-1. - Antti Karttunen, Feb 21 2023
From Amiram Eldar, Dec 31 2023: (Start)
a(n) = A088722(n) + A059841(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1. (End)

Extensions

More terms from Stefan Steinerberger, May 27 2007
Extended by Ray Chandler, Jun 24 2008

A328166 Heinz number of the run-lengths of the divisors of n.

Original entry on oeis.org

2, 3, 4, 6, 4, 10, 4, 12, 8, 12, 4, 28, 4, 12, 16, 24, 4, 40, 4, 36, 16, 12, 4, 112, 8, 12, 16, 48, 4, 120, 4, 48, 16, 12, 16, 224, 4, 12, 16, 144, 4, 120, 4, 48, 64, 12, 4, 448, 8, 48, 16, 48, 4, 160, 16, 144, 16, 12, 4, 832, 4, 12, 64, 96, 16, 160, 4, 48, 16
Offset: 1

Views

Author

Gus Wiseman, Oct 07 2019

Keywords

Comments

The Heinz number of an integer partition or multiset {y_1,...,y_k} is prime(y_1)*...*prime(y_k).

Examples

			Splitting the divisors of 30 into runs gives {{1, 2, 3}, {5, 6}, {10}, {15}, {30}}, and the Heinz number of {1, 1, 1, 2, 3} is 120, so a(30) = 120.
More examples from _Antti Karttunen_, Dec 09 2021: (Start)
Splitting the divisors of 1 into runs gives {1}, and the Heinz number of that is 2.
Splitting the divisors of 2 into runs gives {1, 2}, and the Heinz number of that is 3. [one run of length 2, therefore a(2) = prime(2)^1].
Splitting the divisors of 3 into runs gives {1} and {3}, and the Heinz number of that is 4. [two runs of length 1, therefore a(3) = prime(1)^2].
Splitting the divisors of 4 into runs gives {1, 2} and {4}, and the Heinz number of that is 6. [one run of length 1, and other run of length 2, therefore a(4) = prime(1)*prime(2)].
Splitting the divisors of 5 into runs gives {1} and {5}, and the Heinz number of that is 4. [two runs of length 1, therefore a(5) = prime(1)^2].
(End)
		

Crossrefs

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).
The Heinz number of the set of divisors of n is A275700(n).
Numbers whose divisors do not have weakly decreasing run-lengths are A328165.

Programs

  • Mathematica
    Table[Times@@Prime/@Length/@Split[Divisors[n],#2==#1+1&],{n,30}]
  • PARI
    A328166(n) = { my(rl=0,pd=0,v=vector(numdiv(n)),m=1); fordiv(n, d, if(d>(1+pd), v[rl]++; rl=0); pd=d; rl++); v[rl]++; for(i=1,#v, m *= prime(i)^v[i]); (m); }; \\ Antti Karttunen, Dec 09 2021

Formula

A001222(a(n)) = A137921(n).
A056239(a(n)) = A000005(n).

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

A199969 a(n) = the greatest non-divisor h of n (1 < h < n), or 0 if no such h exists.

Original entry on oeis.org

0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75
Offset: 1

Views

Author

Jaroslav Krizek, Nov 26 2011

Keywords

Comments

From Paul Curtz, Feb 09 2015: (Start)
The nonnegative numbers with 0 instead of 1. See A254667(n), which is linked to the Bernoulli numbers A164555(n)/A027642(n), an autosequence of the second kind.
Offset 0 could be chosen.
An autosequence of the second kind is a sequence whose main diagonal is the first upper diagonal multiplied by 2. If the first upper diagonal is
s0, s1, s2, s3, s4, s5, ...,
the sequence is
Ssk(n) = 2*s0, s0, s0 + 2*s1, s0 +3*s1, s0 + 4*s1 + 2*s2, s1 + 5*s1 + 5*s2, etc.
The corresponding coefficients are A034807(n), a companion to A011973(n).
The binomial transform of Ssk(n) is (-1)^n*Ssk(n).
Difference table of a(n):
0, 0, 2, 3, 4, 5, 6, 7, ...
0, 2, 1, 1, 1, 1, 1, ...
2, -1, 0, 0, 0, 0 ...
-3, 1, 0, 0, 0, ...
4, -1, 0, 0, ...
-5, 1, 0, ...
6, -1, ...
7, ...
etc.
a(n) is an autosequence of the second kind. See A054977(n).
The corresponding autosequence of the first kind (a companion) is 0, 0 followed by the nonnegative numbers (A001477(n)). Not in the OEIS.
Ssk(n) = 2*Sfk(n+1) - Sfk(n) where Sfk(n) is the corresponding sequence of the first kind (see A254667(n)).
(End)
Number of binary sequences of length n-1 that contain exactly one 0 and at least one 1. - Enrique Navarrete, May 11 2021

Crossrefs

Cf. A199968 (the smallest non-divisor h of n (1A199970. A001477, A011973, A034807, A054977, A254667.
Cf. A007978.
Essentially the same as A000027, A028310, A087156 etc.

Programs

  • Mathematica
    Join[{0,0},Table[Max[Complement[Range[n],Divisors[n]]],{n,3,70}]] (* or *) Join[{0,0},Range[2,70]] (* Harvey P. Dale, May 31 2014 *)
  • PARI
    if(n>2,n-1,0) \\ Charles R Greathouse IV, Sep 02 2015

Formula

a(n) = n-1 for n >= 3.
E.g.f.: 1-x^2/2+(x-1)*exp(x). - Enrique Navarrete, May 11 2021

A328448 Smallest number whose divisors > 1 have a longest run of length n, and 0 if none exists.

Original entry on oeis.org

2, 6, 12, 504, 60, 420, 840, 4084080, 2520, 21162960, 27720, 2059318800, 0, 360360, 720720, 8494326640800, 12252240, 281206918792800, 0, 0, 232792560, 409547311252279200, 5354228880, 619808900849199341280, 26771144400, 54749786241679275146400, 80313433200, 5663770990518545704800
Offset: 1

Views

Author

Gus Wiseman, Oct 16 2019

Keywords

Examples

			The runs of divisors of 504 (greater than 1) are {{2,3,4},{6,7,8,9},{12},{14},{18},{21},{24},{28},{36},{42},{56},{63},{72},{84},{126},{168},{252},{504}}, the longest of which has length 4, and 504 is the smallest number with this property, so a(4) = 504.
		

Crossrefs

The version that looks at all divisors (including 1) is A328449.
The longest run of divisors of n greater than 1 has length A328457.
Numbers whose divisors > 1 have no non-singleton runs are A088725.
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).

Extensions

Data corrected and extended by Giovanni Resta, Oct 18 2019

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.

A328165 Numbers whose divisors do not have weakly decreasing run-lengths.

Original entry on oeis.org

56, 72, 110, 112, 132, 144, 156, 182, 210, 216, 224, 240, 264, 272, 288, 306, 312, 342, 364, 380, 392, 396, 420, 432, 440, 448, 462, 468, 480, 506, 528, 544, 550, 552, 576, 600, 612, 616, 624, 648, 650, 684, 702, 720, 728, 756, 760, 770, 780, 784, 792, 812
Offset: 1

Views

Author

Gus Wiseman, Oct 07 2019

Keywords

Examples

			The divisors of 56 are {1, 2, 4, 7, 8, 14, 28, 56}, with runs {{1, 2}, {4}, {7, 8}, {14}, {28}, {56}}, with lengths (2, 1, 2, 1, 1, 1), which are not weakly decreasing, so 56 is in the sequence.
		

Crossrefs

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).
The Heinz number of the multiset of run-lengths of divisors of n is A328166(n).

Programs

  • Mathematica
    Select[Range[1000],!GreaterEqual@@Length/@Split[Divisors[#],#2==#1+1&]&]

A199968 a(n) = the smallest non-divisor h of n (1

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Nov 26 2011

Keywords

Comments

a(n) = A173540(n,1). - Reinhard Zumkeller, Oct 02 2015

Crossrefs

Cf. A199969 (the greatest non-divisor h of n (1A199970.
Cf. A173540.

Programs

Formula

a(n) = A007978(n) for n>=3.
Showing 1-10 of 15 results. Next