A060764 Number of divisors of n which are not also differences between consecutive divisors (ordered by increasing magnitude) of n.
1, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 3, 2, 2, 4, 1, 2, 3, 2, 2, 4, 2, 2, 4, 3, 2, 4, 2, 2, 4, 2, 1, 4, 2, 4, 4, 2, 2, 4, 4, 2, 4, 2, 2, 6, 2, 2, 5, 3, 3, 4, 2, 2, 4, 4, 4, 4, 2, 2, 5, 2, 2, 6, 1, 4, 4, 2, 2, 4, 5, 2, 6, 2, 2, 6, 2, 4, 4, 2, 5, 5, 2, 2, 7, 4, 2, 4, 2, 2, 6, 4, 2, 4, 2, 4, 6, 2, 3, 6, 3, 2, 4, 2, 2, 8
Offset: 1
Keywords
Examples
For n=70, divisors={1,2,5,7,10,14,35,70}; differences={1,3,2,3,4,21,35}; the divisors {5,7,10,14,70} are not differences, so a(70)=5.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Programs
-
Mathematica
a[n_] := Length[Complement[d=Divisors[n], Drop[d, 1]-Drop[d, -1]]]
-
PARI
A060764(n) = { my(divs=divisors(n), diffs=vecsort(vector(#divs-1,i,divs[i+1]-divs[i]), ,8), c=#divs); for(i=1,#diffs,if(!(n%diffs[i]),c--)); (c); }; \\ Antti Karttunen, Sep 21 2018
-
Python
from itertools import pairwise from sympy import divisors def A060764(n): e = map(lambda x:x[1]-x[0],pairwise(d:=divisors(n))) return len(set(d)-set(e)) # Chai Wah Wu, Feb 21 2023
Extensions
Edited by Dean Hickerson, Jan 22 2002
Comments