proposed
approved
proposed
approved
editing
proposed
a(n) = is the number of isolated divisors of n.
The convention for 1 is that it is an isolated divisor iff n is odd. - Olivier Gérard , Sep 22 2007.
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.
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
More terms from Olivier Gérard , Sep 22 2007.
approved
editing
editing
approved
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 *)
approved
editing
__Leroy Quet__, , Sep 03 2007
__Leroy Quet_, _, Sep 03 2007
_Leroy Quet, _, Sep 03 2007
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 (deutsch(AT)duke.poly.edu), _, Oct 02 2007
The convention for 1 is that it is an isolated divisor iff n is odd. - _Olivier Gerard (olivier.gerard(AT)gmail.com) Gérard_ Sep 22 2007.
Table[Length@Select[Divisors[n], (#==1||Mod[n, #-1]>0)&&Mod[n, #+1]>0&], {n, 1, 200}] - _Olivier Gerard (olivier.gerard(AT)gmail.com) Gérard_ Sep 22 2007.
More terms from _Olivier Gerard (olivier.gerard(AT)gmail.com) Gérard_ Sep 22 2007.