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.

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

A088725 Numbers having no divisors d>1 such that also d+1 is a divisor.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 79, 81, 82, 83, 85, 86, 87, 88, 89, 91
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 12 2003

Keywords

Comments

Complement of A088723.
Union of A132895 and A005408, the odd numbers. - Ray Chandler, May 29 2008
The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 9, 79, 778, 7782, 77813, 778055, 7780548, 77805234, 778052138, 7780519314, ... . Apparently, the asymptotic density of this sequence exists and equals 0.77805... . - Amiram Eldar, Jun 14 2022

Examples

			From _Gus Wiseman_, Oct 16 2019: (Start)
The sequence of terms together with their divisors > 1 begins:
   1: {}
   2: {2}
   3: {3}
   4: {2,4}
   5: {5}
   7: {7}
   8: {2,4,8}
   9: {3,9}
  10: {2,5,10}
  11: {11}
  13: {13}
  14: {2,7,14}
  15: {3,5,15}
  16: {2,4,8,16}
  17: {17}
  19: {19}
  21: {3,7,21}
  22: {2,11,22}
  23: {23}
  25: {5,25}
(End)
		

Crossrefs

Positions of 0's and 1's in A129308.
Positions of 0's and 1's in A328457 (also).
Numbers whose divisors (including 1) have no non-singleton runs are A005408.
The number of runs of divisors of n is A137921(n).
The longest run of divisors of n has length A055874(n).

Programs

  • Mathematica
    Select[Range[100],FreeQ[Differences[Rest[Divisors[#]]],1]&] (* Harvey P. Dale, Sep 16 2017 *)
  • PARI
    isok(n) = {my(d=setminus(divisors(n), [1])); #setintersect(d, apply(x->x+1, d)) == 0;} \\ Michel Marcus, Oct 28 2019

Formula

A088722(a(n)) = 0.

Extensions

Extended by Ray Chandler, May 29 2008

A088722 Number of divisors d>1 of n such that d+1 also divides n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 12 2003

Keywords

Comments

Also, number of partitions of n into two distinct parts (s,t), sWesley Ivan Hurt, Jan 16 2022

Examples

			n=144: divisors(144) = {1,2,3,4,6,8,9,12,16,18,24,36,48,72,144}, there are a(144) = 3 divisors d>1 such that also d+1 divides 144: (2,3), (3,4) and (8,9).
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, 1 &, And[# > 1, Divisible[n, # + 1]] &], {n, 105}] (* Michael De Vlieger, Jul 12 2017 *)
  • PARI
    A088722(n) = sumdiv(n,d,(d>1)&&!(n%(d+1))); \\ Antti Karttunen, Jul 12 2017
    
  • PARI
    first(n) = my(v = vector(n),k); for(i=2,sqrtint(n),k=i*(i+1); for(j=1, n\k, v[j*k]++)); v \\ David A. Corneth, Jul 12 2017

Formula

a(A088723(n)) > 0, a(A088724(n)) = 1, a(A088725(n)) = 0.
a(A088726(n)) = n, a(k) <> n, for n < A088726(n).
a(2n+1) = 0. - Ray Chandler, May 29 2008
a(n) = Sum_{d|n, (d+1)|n, d>1} 1. - Wesley Ivan Hurt, Jan 16 2022
From Amiram Eldar, Dec 31 2023: (Start)
a(n) = A129308(n) - A059841(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/2. (End)

Extensions

Extended by Ray Chandler, May 29 2008

A088726 Smallest numbers having exactly n divisors d>1 such that also d+1 is a divisor.

Original entry on oeis.org

1, 6, 12, 72, 60, 180, 360, 420, 840, 1260, 3780, 2520, 5040, 13860, 36960, 41580, 27720, 55440, 83160, 166320, 277200, 491400, 471240, 360360, 1113840, 720720, 1081080, 3341520, 2162160, 2827440, 5405400, 4324320, 12972960, 6126120
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 12 2003

Keywords

Comments

A088722(a(n))=n, A088722(k)<>n, for n

Crossrefs

Formula

a(n) = 2*A130317(n+1) for n>0. - Chandler

Extensions

Extended by Ray Chandler, May 29 2008

A113502 A number n is included if at least one of its divisors > 1 is a triangular number (i.e., is of the form m(m+1)/2, m >= 2).

Original entry on oeis.org

3, 6, 9, 10, 12, 15, 18, 20, 21, 24, 27, 28, 30, 33, 36, 39, 40, 42, 45, 48, 50, 51, 54, 55, 56, 57, 60, 63, 66, 69, 70, 72, 75, 78, 80, 81, 84, 87, 90, 91, 93, 96, 99, 100, 102, 105, 108, 110, 111, 112, 114, 117, 120, 123, 126, 129, 130, 132, 135, 136, 138, 140, 141
Offset: 1

Author

Leroy Quet, Jan 10 2006

Keywords

Comments

A number n is in the sequence iff it is not a "triangle-free" positive integer.
Multiples of A226863. - Charles R Greathouse IV, Jul 29 2016

Examples

			12 is included because its divisors are 1, 2, 3, 4, 6 and 12, two of which (3 and 6) are triangular numbers > 1.
		

Crossrefs

Programs

  • Mathematica
    v={};Do[If[b=Select[Divisors[n], #>1 && IntegerQ[(1+8#)^(1/2)]&]; b!={}, AppendTo[v, n]], {n, 200}]; v (* Farideh Firoozbakht, Jan 12 2006 *)
    Select[Range[200],AnyTrue[Rest[Divisors[#]],OddQ[Sqrt[8#+1]]&]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 13 2017 *)
  • PARI
    is(n)=fordiv(n,d, if(ispolygonal(d,3) && d>1, return(1))); 0 \\ Charles R Greathouse IV, Jul 29 2016

Formula

a(n) = A088723(n)/2. - Ray Chandler, May 29 2008

Extensions

More terms from Farideh Firoozbakht, Jan 12 2006

A094519 Numbers having at least one pair (x,y) of divisors with x

Original entry on oeis.org

6, 12, 18, 20, 24, 30, 36, 40, 42, 48, 54, 56, 60, 66, 70, 72, 78, 80, 84, 90, 96, 100, 102, 108, 110, 112, 114, 120, 126, 132, 138, 140, 144, 150, 156, 160, 162, 168, 174, 180, 182, 186, 192, 198, 200, 204, 210, 216, 220, 222, 224, 228, 234, 240, 246
Offset: 1

Author

Reinhard Zumkeller, May 06 2004

Keywords

Comments

If m is in the sequence then so is k*m for k > 0. Furthermore, all terms are even. - David A. Corneth, Aug 31 2019
If (x,y) = (1,m) with m > 1, then oblong numbers m*(m+1) >= 6 belong to this sequence, and each oblong number >= 6 is a primitive term of the subsequence {k*m*(m+1), k >= 1}. Examples: with pair (1,2), we get multiples of 6 (see A008588); with (1,3) we get multiples of 12 (see A008594); with (1,4) we get multiples of 20 (see A008602); with (1,7) we get multiples of 56. - Bernard Schott, Aug 31 2019
The numbers of terms that do not exceed 10^k, for k = 1, 2, ..., are 1, 22, 230, 2317, 23201, 232209, 2322920, 23232166, 232332309, 2323370184, ... . Apparently, the asymptotic density of this sequence exists and equals 0.23233... . - Amiram Eldar, Apr 20 2025

Crossrefs

Cf. A094518.
Complement of A094520.
A superset of A088723. - R. J. Mathar, Sep 16 2007
Subsequences: A002378 \ {0, 2}, A008588 \ {0}, A008602 \ {0}.

Programs

  • Mathematica
    aQ[n_] := AnyTrue[Total /@ Subsets[Divisors[n], {2}], Divisible[n, #] &]; Select[Range[250], aQ] (* Amiram Eldar, Aug 31 2019 *)
  • PARI
    is(n) = {my(d = divisors(n)); for(i = 1, #d - 2, for(j = i + 1, #d - 1, if(n % (d[i] + d[j]) == 0, return(1) ) ) ); 0 } \\ David A. Corneth, Aug 31 2019
    
  • Python
    from itertools import count, islice
    from sympy import divisors
    def A094519_gen(): # generator of terms
        for n in count(1):
            for i in range(1,len(d:=divisors(n))):
                di = d[i]
                for j in range(i):
                    if n % (di+d[j]) == 0:
                        yield n
                        break
                else:
                    continue
                break
    A094519_list = list(islice(A094519_gen(),20)) # Chai Wah Wu, Dec 26 2021

Formula

A094518(a(n)) > 0.

A088724 Numbers having exactly one divisor d>1 such that also d+1 is a divisor.

Original entry on oeis.org

6, 18, 20, 40, 54, 56, 66, 78, 80, 100, 102, 110, 112, 114, 138, 140, 160, 162, 174, 182, 186, 198, 200, 222, 224, 234, 246, 258, 260, 272, 282, 318, 320, 340, 354, 364, 366, 392, 400, 402, 414, 426, 438, 448, 460, 474, 486, 498, 500, 506, 520, 522, 534, 544
Offset: 1

Author

Reinhard Zumkeller, Oct 12 2003

Keywords

Comments

Subsequence of A088723.
The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 1, 10, 100, 976, 9712, 97140, 971139, 9711054, 97109111, 971091745, ... . Apparently, the asymptotic density of this sequence exists and equals 0.097109... . - Amiram Eldar, Jul 09 2022

Crossrefs

Programs

  • Mathematica
    Select[Range[600],Count[Differences[Rest[Divisors[#]]],1]==1&] (* Harvey P. Dale, Sep 05 2015 *)

Formula

A088722(a(n)) = 1.

Extensions

Extended by Ray Chandler, May 29 2008

A228870 Numbers n such that 2 * (1^n + 2^n + 3^n + ... + n^n) is not 0 (mod n).

Original entry on oeis.org

6, 12, 18, 20, 24, 30, 36, 40, 42, 48, 54, 60, 66, 72, 78, 80, 84, 90, 96, 100, 102, 108, 110, 114, 120, 126, 132, 138, 140, 144, 150, 156, 160, 162, 168, 174, 180, 186, 192, 198, 200, 204, 210, 216, 220, 222, 228, 234, 240, 246, 252, 258, 260, 264, 270, 272
Offset: 1

Author

T. D. Noe, Sep 06 2013

Keywords

Comments

These are the numbers not appearing in A228869; the even numbers not in A226872.
Also, positive integers n such that there exists an odd prime divisor p of n such that (p-1) also divides n (cf. A124240). - Max Alekseyev, Sep 07 2013
This sequence agrees with A088723 for many terms, but they are different.
If n is in the sequence, then so are the multiples of n. See A280187 for primitive members of this sequence. - Charles R Greathouse IV, Dec 28 2016

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Mod[2*Sum[PowerMod[k, #, #], {k, #}], #] > 0 &]
  • PARI
    is(n)=my(f=factor(n)[,1]); for(i=1,#f, if(n%(f[i]-1)==0 && f[i]>2, return(1))); 0 \\ Charles R Greathouse IV, Dec 28 2016

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

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

A291022 Even numbers m such that every odd divisor > 1 of m is the sum of two divisors.

Original entry on oeis.org

6, 12, 18, 20, 24, 30, 36, 40, 42, 48, 54, 80, 96, 100, 108, 140, 150, 156, 160, 162, 192, 198, 200, 220, 264, 272, 280, 294, 312, 320, 324, 342, 384, 396, 400, 440, 486, 500, 510, 520, 528, 544, 546, 560, 624, 640, 684, 702, 714, 750, 768, 798, 800, 880, 912
Offset: 1

Author

Michel Lagneau, Aug 31 2017

Keywords

Comments

The numbers of the form p*2^q (6, 12, 20, ...) where p belongs to the set {3, 5, 17, 257, 65537} (A019434: Fermat primes or primes of the form 2^(2^k) + 1, for some k >= 0) are in the sequence.
The sequence is included in A088723 (Numbers having at least one divisor d>1 such that also d+1 is a divisor).

Examples

			42 is in the sequence because the divisors are {1, 2, 3, 6, 7, 14, 21, 42} and 3 = 2 + 1, 7 = 6 + 1 and 21 = 14 + 7.
		

Crossrefs

Programs

  • Maple
    with(numtheory):EV:=array(1..100):OD:=array(1..100):nn:=5*10^4:
    for n from 2 by 2 to nn do:
      d:=divisors(n):n1:=nops(d):k0:=0:k1:=0:it:=0:
       for i from 1 to n1 do:
        if irem(d[i],2)=0
         then
         k0:=k0+1:EV[k0]:=d[i]:
         else
         k1:=k1+1:OD[k1]:=d[i]:
        fi:
       od:
         for j from 2 to k1 do:
           for k from 1 to k1 do:
             for l from 1 to k0 do:
              if OD[j]=OD[k]+EV[l]
             then
              it:=it+1:
              else
             fi:
           od:
          od:
         od:
         if it>0 and it = k1-1
          then
          printf(`%d, `,n):
          else
         fi:
      od:
Showing 1-10 of 10 results.