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 10 results.

A328171 Number of (necessarily strict) integer partitions of n with no two consecutive parts divisible.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 3, 2, 4, 4, 5, 4, 9, 9, 10, 12, 14, 16, 20, 23, 29, 34, 38, 41, 51, 60, 66, 78, 89, 103, 119, 137, 157, 180, 201, 229, 261, 298, 338, 379, 431, 486, 547, 618, 694, 783, 876, 986, 1103, 1241, 1387, 1551, 1728, 1932, 2148, 2395, 2664, 2963
Offset: 0

Views

Author

Gus Wiseman, Oct 11 2019

Keywords

Examples

			The a(1) = 1 through a(15) = 10 partitions (A..F = 10..15):
  1  2  3  4  5   6  7   8   9    A    B   C    D    E     F
              32     43  53  54   64   65  75   76   86    87
                     52      72   73   74  543  85   95    96
                             432  532  83  732  94   A4    B4
                                       92       A3   B3    D2
                                                B2   653   654
                                                643  743   753
                                                652  752   852
                                                832  5432  A32
                                                           6432
		

Crossrefs

The complement is counted by A328221.
The Heinz numbers of these partitions are A328603.
Partitions whose pairs of consecutive parts are relatively prime are A328172, with strict case A328188.
Partitions with no pair of consecutive parts relatively prime are A328187, with strict case A328220.
Numbers without consecutive divisible proper divisors are A328028.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],!MatchQ[#,{_,x_,y_,_}/;Divisible[x,y]]&]],{n,0,30}]

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

A328460 Number of compositions of n with no part divisible by the next.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 5, 8, 11, 16, 26, 35, 53, 76, 115, 168, 244, 363, 528, 782, 1144, 1685, 2474, 3633, 5347, 7844, 11539, 16946, 24919, 36605, 53782, 79053, 116142, 170700, 250800, 368585, 541610, 795884, 1169572, 1718593, 2525522, 3711134, 5453542, 8013798, 11776138
Offset: 0

Views

Author

Gus Wiseman, Oct 17 2019

Keywords

Examples

			The a(1) = 1 through a(9) = 16 compositions:
  (1)  (2)  (3)   (4)   (5)   (6)    (7)    (8)     (9)
            (21)  (31)  (23)  (42)   (25)   (35)    (27)
                        (32)  (51)   (34)   (53)    (45)
                        (41)  (231)  (43)   (62)    (54)
                              (321)  (52)   (71)    (63)
                                     (61)   (251)   (72)
                                     (232)  (323)   (81)
                                     (421)  (341)   (234)
                                            (431)   (252)
                                            (521)   (342)
                                            (2321)  (351)
                                                    (423)
                                                    (432)
                                                    (531)
                                                    (621)
                                                    (3231)
		

Crossrefs

The case of partitions is A328171.
If we also require no part to be divisible by the prior, we get A328508.
Compositions with each part relatively prime to the next are A167606.
Compositions with no part relatively prime to the next are A178470.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{_,x_,y_,_}/;Divisible[y,x]]&]],{n,0,10}]
  • PARI
    seq(n)={my(r=matid(n)); for(k=1, n, for(i=1, k-1, r[i,k]=sum(j=1, k-i, if(j%i, r[j, k-i])))); concat([1], vecsum(Col(r)))} \\ Andrew Howroyd, Oct 19 2019

Extensions

Terms a(26) and beyond from Andrew Howroyd, Oct 19 2019

A328028 Nonprime numbers n whose proper divisors (greater than 1 and less than n) have no consecutive divisibilities.

Original entry on oeis.org

1, 4, 6, 9, 10, 12, 14, 15, 21, 22, 24, 25, 26, 30, 33, 34, 35, 36, 38, 39, 45, 46, 48, 49, 51, 55, 57, 58, 60, 62, 63, 65, 69, 70, 72, 74, 77, 82, 84, 85, 86, 87, 90, 91, 93, 94, 95, 96, 105, 106, 108, 111, 115, 118, 119, 120, 121, 122, 123, 129, 132, 133, 134
Offset: 1

Views

Author

Gus Wiseman, Oct 06 2019

Keywords

Examples

			The proper divisors of 18 are {2, 3, 6, 9}, and {3, 6} are a consecutive divisible pair, so 18 does not belong to the sequence.
The proper divisors of 60 are {2, 3, 4, 5, 6, 10, 12, 15, 20, 30}, and none of {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 10}, {10, 12}, {12, 15}, {15, 20}, or {20, 30} are divisible pairs, so 60 belongs to the sequence.
		

Crossrefs

Positions of 0's or 2's in A328026.
1 and positions of 1's in A328194.
The version including primes is A328161.
Partitions with no consecutive divisibilities are A328171.
Numbers whose proper divisors have no consecutive successions are A088725.
Contains A001358.

Programs

  • Maple
    filter:= proc(n) local D,i;
      if isprime(n) then return false fi;
      D:= sort(convert(numtheory:-divisors(n) minus {1,n}, list));
      for i from 1 to nops(D)-1 do if (D[i+1]/D[i])::integer then return false fi od:
      true
    end proc:
    select(filter, [$1..300]); # Robert Israel, Oct 11 2019
  • Mathematica
    Select[Range[100],!PrimeQ[#]&&!MatchQ[DeleteCases[Divisors[#],1|#],{_,x_,y_,_}/;Divisible[y,x]]&]

A328194 Maximum length of a divisibility chain of consecutive nontrivial divisors of n (greater than 1 and less than n).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 14 2019

Keywords

Comments

The nontrivial divisors of n are row n of A163870.

Examples

			The nontrivial divisors of 272 are {2, 4, 8, 16, 17, 34, 68, 136} with divisibility chains {{2, 4, 8, 16}, {17, 34, 68, 136}}, so a(272) = 4.
		

Crossrefs

Positions of 1's are A328028 without 1.
The version with all divisors allowed is A328162.
Allowing n as a divisor of n gives A328195.
Indices of terms greater than 1 are A328189.
The maximum run-length of divisors of n is A055874(n).

Programs

  • Mathematica
    Table[Switch[n,1,0,?PrimeQ,0,,Max@@Length/@Split[DeleteCases[Divisors[n],1|n],Divisible[#2,#1]&]],{n,100}]
  • PARI
    A328194(n) = if(1==n || isprime(n), 0, my(divs=divisors(n), rl=0,ml=1); for(i=2,#divs-1,if(!(divs[i]%divs[i-1]), rl++, ml = max(rl,ml); rl=1)); max(ml,rl)); \\ Antti Karttunen, Dec 07 2024

Extensions

Data section extended up to a(105) by Antti Karttunen, Dec 07 2024

A328508 Number of compositions of n with no part divisible by the next or the prior.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 6, 4, 8, 14, 14, 27, 30, 55, 69, 97, 155, 200, 312, 421, 630, 893, 1260, 1864, 2600, 3813, 5395, 7801, 11196, 15971, 23126, 32917, 47514, 67993, 97670, 140334, 200913, 289147, 414119, 595109, 853751, 1225086, 1759405, 2523151, 3623984, 5198759
Offset: 0

Views

Author

Gus Wiseman, Oct 17 2019

Keywords

Examples

			The a(1) = 1 through a(11) = 14 compositions (A = 10, B = 11):
  (1)  (2)  (3)  (4)  (5)   (6)  (7)    (8)    (9)    (A)     (B)
                      (23)       (25)   (35)   (27)   (37)    (29)
                      (32)       (34)   (53)   (45)   (46)    (38)
                                 (43)   (323)  (54)   (64)    (47)
                                 (52)          (72)   (73)    (56)
                                 (232)         (234)  (235)   (65)
                                               (252)  (253)   (74)
                                               (432)  (325)   (83)
                                                      (343)   (92)
                                                      (352)   (254)
                                                      (523)   (272)
                                                      (532)   (353)
                                                      (2323)  (434)
                                                      (3232)  (452)
		

Crossrefs

The case of partitions is A328171.
If we only forbid parts to be divisible by the next, we get A328460.
Compositions with each part relatively prime to the next are A167606.
Compositions with no part relatively prime to the next are A178470.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{_,x_,y_,_}/;Divisible[y,x]||Divisible[x,y]]&]],{n,0,10}]
  • PARI
    seq(n)={my(r=matid(n)); for(k=1, n, for(i=1, k-1, r[i,k]=sum(j=1, k-i, if(i%j && j%i, r[j, k-i])))); concat([1], vecsum(Col(r)))} \\ Andrew Howroyd, Oct 19 2019

Extensions

Terms a(26) and beyond from Andrew Howroyd, Oct 19 2019

A328221 Number of integer partitions of n with at least one pair of consecutive divisible parts.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 10, 12, 20, 26, 38, 51, 73, 92, 126, 166, 219, 283, 369, 470, 604, 763, 968, 1217, 1534, 1907, 2376, 2944, 3640, 4476, 5501, 6723, 8212, 9986, 12130, 14682, 17748, 21376, 25717, 30847, 36959, 44152, 52688, 62714, 74557, 88440, 104775, 123878
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2019

Keywords

Comments

Includes all non-strict partitions.

Examples

			The a(2) = 1 through a(8) = 20 partitions:
  (11)  (21)   (22)    (41)     (33)      (61)       (44)
        (111)  (31)    (221)    (42)      (322)      (62)
               (211)   (311)    (51)      (331)      (71)
               (1111)  (2111)   (222)     (421)      (332)
                       (11111)  (321)     (511)      (422)
                                (411)     (2221)     (431)
                                (2211)    (3211)     (521)
                                (3111)    (4111)     (611)
                                (21111)   (22111)    (2222)
                                (111111)  (31111)    (3221)
                                          (211111)   (3311)
                                          (1111111)  (4211)
                                                     (5111)
                                                     (22211)
                                                     (32111)
                                                     (41111)
                                                     (221111)
                                                     (311111)
                                                     (2111111)
                                                     (11111111)
		

Crossrefs

The complement is counted by A328171.
Partitions whose consecutive parts are relatively prime are A328172.
Partitions with no pair of consecutive parts relatively prime are A328187.
Numbers without consecutive divisible proper divisors are A328028.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],MatchQ[#,{_,x_,y_,_}/;Divisible[x,y]]&]],{n,0,30}]

A328162 Maximum length of a divisibility chain of consecutive divisors of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 06 2019

Keywords

Examples

			The divisors of 968 split into consecutive divisibility chains {{1, 2, 4, 8}, {11, 22, 44, 88}, {121, 242, 484, 968}}, so a(968) = 4.
		

Crossrefs

Records occur at powers of 2 (A000079).
Taking only proper divisors gives A328194.
Taking only divisors > 1 gives A328195.
The maximum run-length among divisors of n is A055874.

Programs

  • Maple
    f:= proc(n) local F,L,d,i;
      F:= sort(convert(numtheory:-divisors(n),list));
      d:= nops(F);
      L:= Vector(d);
      L[1]:= 1;
      for i from 2 to d do
        if F[i] mod F[i-1] = 0 then L[i]:= L[i-1]+1
        else L[i]:= 1
        fi
      od;
      max(L)
    end proc:
    map(f, [$1..100]); # Robert Israel, Apr 20 2023
  • Mathematica
    Table[Max@@Length/@Split[Divisors[n],Divisible[#2,#1]&],{n,100}]

A328195 Maximum length of a divisibility chain of consecutive divisors of n greater than 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 14 2019

Keywords

Comments

Also the maximum length of a divisibility chain of consecutive divisors of n less than n.
The divisors of n (except 1) are row n of A027749.

Examples

			The divisors of 272 greater than 1 are {2, 4, 8, 16, 17, 34, 68, 136, 272}, with divisibility chains {{2, 4, 8, 16}, {17, 34, 68, 136, 272}}, so a(272) = 5.
		

Crossrefs

Allowing 1 as a divisor gives A328162.
Forbidding n as a divisor of n gives A328194.
Positions of 1's are A000040 (primes).
Indices of terms greater than 1 are A002808 (composite numbers).
The maximum run-length of divisors of n is A055874(n).

Programs

  • Mathematica
    Table[If[n==1,0,Max@@Length/@Split[DeleteCases[Divisors[n],1],Divisible[#2,#1]&]],{n,100}]
  • PARI
    A328195(n) = if(1==n, 0, my(divs=divisors(n), rl=0,ml=1); for(i=2,#divs,if(!(divs[i]%divs[i-1]), rl++, ml = max(rl,ml); rl=1)); max(ml,rl)); \\ Antti Karttunen, Dec 07 2024

Extensions

Data section extended up to a(105) by Antti Karttunen, Dec 07 2024

A060766 Least common multiple of differences between consecutive divisors of n (ordered by size).

Original entry on oeis.org

1, 2, 2, 4, 3, 6, 4, 6, 15, 10, 6, 12, 35, 10, 8, 16, 9, 18, 10, 28, 99, 22, 12, 20, 143, 18, 42, 28, 60, 30, 16, 88, 255, 28, 18, 36, 323, 130, 60, 40, 21, 42, 154, 60, 483, 46, 24, 42, 75, 238, 234, 52, 27, 132, 84, 304, 783, 58, 60, 60, 899, 84, 32, 104, 165, 66, 442
Offset: 2

Views

Author

Labos Elemer, Apr 24 2001

Keywords

Examples

			For n=98, divisors={1,2,7,14,49,98}; differences={1,5,7,35,49}; a(98) = LCM of differences = 245.
		

Crossrefs

The GCD version appears to be A258409.
The LCM of the prime indices of n is A290103(n).
The differences between consecutive divisors of n are row n of A193829.

Programs

  • Mathematica
    a[n_ ] := LCM@@(Drop[d=Divisors[n], 1]-Drop[d, -1])
    Table[LCM@@Differences[Divisors[n]],{n,2,70}] (* Harvey P. Dale, Oct 08 2012 *)

Formula

a(n) = A290103(A328023(n)). - Gus Wiseman, Oct 16 2019

Extensions

Edited by Dean Hickerson, Jan 22 2002
Showing 1-10 of 10 results.