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

A132881 a(n) is the number of isolated divisors of n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Sep 03 2007

Keywords

Comments

A divisor d of n is isolated if neither d-1 nor d+1 divides n.
The convention for 1 is that it is an isolated divisor iff n is odd. - Olivier Gérard, Sep 22 2007

Examples

			The positive divisors of 56 are 1,2,4,7,8,14,28,56. Of these, 1 and 2 are adjacent and 7 and 8 are adjacent. The isolated divisors are therefore 4,14,28,56. There are 4 of these, so a(56) = 4.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local div, ISO, i: div:=divisors(n): ISO:={}: for i to tau(n) do if member(div[i]-1, div)=false and member(div[i]+1, div)=false then ISO:=`union`(ISO,{div[i]}) end if end do end proc; 1, 0, seq(nops(a(j)), j=3..105); # Emeric Deutsch, Oct 02 2007
  • Mathematica
    Table[Length@Select[Divisors[n],(#==1||Mod[n,#-1]>0)&&Mod[n,#+1]>0&],{n,1,200}] (* Olivier Gérard Sep 22 2007 *)
    id[n_]:=DivisorSigma[0,n]-Length[Union[Flatten[Select[Partition[Divisors[ n],2,1],#[[2]]-#[[1]]==1&]]]]; Array[id,110] (* Harvey P. Dale, Jun 04 2018 *)

Formula

a(n) = A000005(n) - A132747(n).

Extensions

More terms from Olivier Gérard, Sep 22 2007

A133779 Irregular array: n-th row lists the "isolated divisors" of n. A positive divisor k of n is isolated if neither k-1 nor k+1 divides n.

Original entry on oeis.org

1, 0, 1, 3, 4, 1, 5, 6, 1, 7, 4, 8, 1, 3, 9, 5, 10, 1, 11, 6, 12, 1, 13, 7, 14, 1, 3, 5, 15, 4, 8, 16, 1, 17, 6, 9, 18, 1, 19, 10, 20, 1, 3, 7, 21, 11, 22, 1, 23, 6, 8, 12, 24, 1, 5, 25, 13, 26, 1, 3, 9, 27, 4, 7, 14, 28, 1, 29, 10, 15, 30, 1, 31, 4, 8, 16, 32, 1, 3, 11, 33, 17, 34, 1, 5, 7, 35, 6
Offset: 1

Views

Author

Leroy Quet, Sep 23 2007

Keywords

Comments

The second term of the sequence, which corresponds to the second row of the array, is 0 simply as a placeholder, since 2 has no isolated divisors.
The number of terms in the n-th row of the array is A132881(n) (with the exception of row 2, which has 0 elements, but is represented here as 0).

Examples

			The positive divisors of 20 are 1,2,4,5,10,20. Of these, 1 and 2 are adjacent and 4 and 5 are adjacent. So the isolated divisors of 20 are 10 and 20.
Triangle begins:
1
-
1,3
4
1,5
6
1,7
4,8
1,3,9
5,10
1,11
6,12
1,13
7,14
1,3,5,15
4,8,16
...
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local div,ISO,i: div:=divisors(n): ISO:={}: for i to tau(n) do if member(div[i]-1, div)=false and member(div[i]+1, div)=false then ISO:=`union`(ISO,{div[i]}) end if end do end proc: 1; 0; for j from 3 to 30 do seq(a(j)[i],i=1..nops(a(j)))end do; # yields sequence in the form of an array - Emeric Deutsch, Oct 02 2007
  • Mathematica
    Table[Select[Divisors@ n, NoneTrue[# + {-1 + 2 Boole[# == 1], 1}, Divisible[n, #] &] &] /. {} -> {0}, {n, 36}] // Flatten (* Michael De Vlieger, Aug 19 2017 *)

Extensions

More terms from Emeric Deutsch, Oct 02 2007
Extended by Ray Chandler, Jun 24 2008

A132748 a(n) = the sum of the positive non-isolated divisors of n.

Original entry on oeis.org

0, 3, 0, 3, 0, 6, 0, 3, 0, 3, 0, 10, 0, 3, 0, 3, 0, 6, 0, 12, 0, 3, 0, 10, 0, 3, 0, 3, 0, 17, 0, 3, 0, 3, 0, 10, 0, 3, 0, 12, 0, 19, 0, 3, 0, 3, 0, 10, 0, 3, 0, 3, 0, 6, 0, 18, 0, 3, 0, 21, 0, 3, 0, 3, 0, 6, 0, 3, 0, 3, 0, 27, 0, 3, 0, 3, 0, 6, 0, 12, 0, 3, 0, 23, 0, 3, 0, 3, 0, 36, 0, 3, 0, 3, 0, 10, 0, 3
Offset: 1

Views

Author

Leroy Quet, Aug 27 2007

Keywords

Comments

A divisor, d, of n is non-isolated if either (d-1) or (d+1) divides n.
a(2n-1) = 0 for all n >= 1.

Examples

			The positive divisors of 20 are 1,2,4,5,10,20. Of these, 1 and 2 are next to each other and 4 and 5 are next to each other. So a(20) = 1+2+4+5 = 12.
		

Crossrefs

Programs

  • Mathematica
    Table[Plus @@ (Select[Divisors[n], If[ # > 1,Mod[n, #*(# - 1)] == 0] || Mod[n, #*(# + 1)] == 0 &]), {n, 1, 80}] (* Stefan Steinerberger, Nov 01 2007 *)
  • PARI
    A132748(n) = sumdiv(n,d,((!(n%(1+d)))||((d>1)&&(!(n%(d-1)))))*d); \\ Antti Karttunen, Dec 19 2018

Formula

a(n) = A000203(n) - A132882(n), where A000203 is sigma(n), sum of divisors of n.

Extensions

More terms from Stefan Steinerberger, Nov 01 2007
Extended by Ray Chandler, Jun 24 2008

A243984 Sum of non-twin divisors of n.

Original entry on oeis.org

1, 3, 0, 1, 6, 8, 8, 9, 9, 18, 12, 12, 14, 24, 15, 25, 18, 35, 20, 36, 28, 36, 24, 36, 31, 42, 36, 50, 30, 63, 32, 57, 44, 54, 36, 75, 38, 60, 52, 66, 42, 92, 44, 78, 69, 72, 48, 100, 57, 93, 68, 92, 54, 116, 72, 114, 76, 90, 60, 125, 62, 96, 84, 121, 84, 140, 68, 120
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 16 2014

Keywords

Comments

See A243917 for definition of non-twin divisor.

Examples

			The divisors of 40 are 1, 2, 4, 5, 8, 10, 20, 40. Of these, 1, 5, 20, 40 are non-twin divisors. So a(40) = the sum of these divisors, which is 66.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d; d:= numtheory[divisors](n); convert(d minus map(`+`,d,2) minus map(`+`,d,-2),`+`) end proc:
    map(f, [$1..100]); # Robert Israel, Aug 17 2014
  • Mathematica
    a243984[n_Integer] := Total[Select[Divisors[n], If[And[# <= 2 || Divisible[n, # - 2] == False, Divisible[n, # + 2] == False], True, False] &]]; a243984 /@ Range[68] (* Michael De Vlieger, Aug 17 2014 *)
  • PARI
    a(n) = s=0; fordiv(n, d, if(!((d>2 && n%(d-2)==0) || (d<=n-2 && n%(d+2)==0)), s+=d)); s
    for(n=1, 200, print1(a(n), ", ")) \\ Colin Barker, Jun 29 2014

Formula

a(n) = A000203(n) - A243983(n).
Showing 1-4 of 4 results.