A060680
Smallest difference between consecutive divisors of n.
Original entry on oeis.org
1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 12, 1, 2, 1, 16, 1, 18, 1, 2, 1, 22, 1, 4, 1, 2, 1, 28, 1, 30, 1, 2, 1, 2, 1, 36, 1, 2, 1, 40, 1, 42, 1, 2, 1, 46, 1, 6, 1, 2, 1, 52, 1, 4, 1, 2, 1, 58, 1, 60, 1, 2, 1, 4, 1, 66, 1, 2, 1, 70, 1, 72, 1, 2, 1, 4, 1, 78, 1, 2, 1, 82, 1, 4, 1, 2, 1, 88, 1, 6, 1, 2, 1, 4
Offset: 2
For n = 35, divisors = {1,5,7,35}; differences = {4,2,28}; a(35) = smallest difference = 2.
-
a060680 = minimum . a193829_row -- Reinhard Zumkeller, Jun 25 2015
-
read("transforms") :
A060680 := proc(n)
sort(convert(numtheory[divisors](n),list)) ;
DIFF(%) ;
min(op(%)) ;
end proc:
seq(A060680(n),n=2..60) ; # R. J. Mathar, May 23 2018
-
a[n_] := Min@@(Drop[d=Divisors[n], 1]-Drop[d, -1]);
(* Second program: *)
a[n_] := Min[Differences[Divisors[n]]];
Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Oct 16 2024 *)
-
a(n) = {my(m = n, d1); fordiv(n, d, if(d > 1 && d - d1 < m, m = d - d1); d1 = d); m;} \\ Amiram Eldar, Mar 17 2025
A261699
Triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists positive terms interleaved with k-1 zeros, starting in row k(k+1)/2. If k is odd the positive terms of column k are k's, otherwise if k is even the positive terms of column k are the odd numbers greater than k in increasing order.
Original entry on oeis.org
1, 1, 1, 3, 1, 0, 1, 5, 1, 0, 3, 1, 7, 0, 1, 0, 0, 1, 9, 3, 1, 0, 0, 5, 1, 11, 0, 0, 1, 0, 3, 0, 1, 13, 0, 0, 1, 0, 0, 7, 1, 15, 3, 0, 5, 1, 0, 0, 0, 0, 1, 17, 0, 0, 0, 1, 0, 3, 9, 0, 1, 19, 0, 0, 0, 1, 0, 0, 0, 5, 1, 21, 3, 0, 0, 7, 1, 0, 0, 11, 0, 0, 1, 23, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 1, 25, 0, 0, 5, 0, 1, 0, 0, 13, 0, 0
Offset: 1
Triangle begins:
1;
1;
1, 3;
1, 0;
1, 5;
1, 0, 3;
1, 7, 0;
1, 0, 0;
1, 9, 3;
1, 0, 0, 5;
1, 11, 0, 0;
1, 0, 3, 0;
1, 13, 0, 0;
1, 0, 0, 7;
1, 15, 3, 0, 5;
1, 0, 0, 0, 0;
1, 17, 0, 0, 0;
1, 0, 3, 9, 0;
1, 19, 0, 0, 0;
1, 0, 0, 0, 5;
1, 21, 3, 0, 0, 7;
1, 0, 0, 11, 0, 0;
1, 23, 0, 0, 0, 0;
1, 0, 3, 0, 0, 0;
1, 25, 0, 0, 5, 0;
1, 0, 0, 13, 0, 0;
1, 27, 3, 0, 0, 9;
1, 0, 0, 0, 0, 0, 7;
...
From _Omar E. Pol_, Dec 19 2016: (Start)
Illustration of initial terms in a right triangle whose structure is the same as the structure of A237591:
Row _
1 _|1|
2 _|1 _|
3 _|1 |3|
4 _|1 _|0|
5 _|1 |5 _|
6 _|1 _|0|3|
7 _|1 |7 |0|
8 _|1 _|0 _|0|
9 _|1 |9 |3 _|
10 _|1 _|0 |0|5|
11 _|1 |11 _|0|0|
12 _|1 _|0 |3 |0|
13 _|1 |13 |0 _|0|
14 _|1 _|0 _|0|7 _|
15 _|1 |15 |3 |0|5|
16 _|1 _|0 |0 |0|0|
17 _|1 |17 _|0 _|0|0|
18 _|1 _|0 |3 |9 |0|
19 _|1 |19 |0 |0 _|0|
20 _|1 _|0 _|0 |0|5 _|
21 _|1 |21 |3 _|0|0|7|
22 _|1 _|0 |0 |11 |0|0|
23 _|1 |23 _|0 |0 |0|0|
24 _|1 _|0 |3 |0 _|0|0|
25 _|1 |25 |0 _|0|5 |0|
26 _|1 _|0 _|0 |13 |0 _|0|
27 _|1 |27 |3 |0 |0|9 _|
28 |1 |0 |0 |0 |0|0|7|
... (End)
Cf.
A000217,
A000593,
A001227,
A003056,
A005408,
A027750,
A057427,
A182469,
A196020,
A211343,
A236104,
A235791,
A236112,
A237048,
A237591,
A237593,
A261350,
A261697,
A261698,
A285914,
A286013.
-
T[n_, k_?OddQ] /; n == k (k + 1)/2 := k; T[n_, k_?OddQ] /; Mod[n - k (k + 1)/2, k] == 0 := k; T[n_, k_?EvenQ] /; n == k (k + 1)/2 := k + 1; T[n_, k_?EvenQ] /; Mod[n - k (k + 1)/2, k] == 0 := T[n - k, k] + 2; T[, ] = 0; Table[T[n, k], {n, 1, 26}, {k, 1, Floor[(Sqrt[1 + 8 n] - 1)/2]}] // Flatten (* Jean-François Alcover, Sep 21 2015 *)
(* alternate definition using function a237048 *)
T[n_, k_] := If[a237048[n, k] == 1, If[OddQ[k], k, 2n/k], 0] (* Hartmut F. W. Hoft, Oct 25 2015 *)
A007978
Least non-divisor of n.
Original entry on oeis.org
2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3
Offset: 1
Cf. also
A266620 (least non-divisor of n!).
-
import Data.List ((\\))
a007978 = head . ([1..] \\) . a027750_row
-- Reinhard Zumkeller, May 10 2014
-
a:= proc(n) local k;
for k from 2 while n mod k = 0 do od:
k
end proc:
seq(a(n),n=1..100); # Robert Israel, Sep 02 2014
-
Table[k := 1; While[Mod[n, k] == 0, k++]; k, {n, 2000}] (* Clark Kimberling, Jun 16 2012 *)
Join[{2, 3}, Table[Complement[Range[n], Divisors[n]][[1]], {n, 3, 100}]] (* Alonso del Arte, Sep 23 2017 *)
-
a(n) = {my(k=2); while(!(n % k), k++); k;} \\ Michel Marcus, Sep 25 2017
-
def a(n):
k = 2
while not n%k: k += 1
return k
print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Jul 09 2022
-
def A007978(n): return next(filter(lambda d:n%d,range(2,n))) if n>2 else n+1 # Chai Wah Wu, Feb 22 2023
A338156
Irregular triangle read by rows in which row n lists n blocks, where the m-th block consists of A000041(m-1) copies of the divisors of (n - m + 1), with 1 <= m <= n.
Original entry on oeis.org
1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 1, 2, 4, 1, 3, 1, 2, 1, 2, 1, 1, 1, 1, 5, 1, 2, 4, 1, 3, 1, 3, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 3, 6, 1, 5, 1, 2, 4, 1, 2, 4, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 2, 3, 6, 1, 5, 1, 5, 1, 2, 4, 1, 2, 4, 1, 2, 4
Offset: 1
Triangle begins:
[1];
[1,2], [1];
[1,3], [1,2], [1], [1];
[1,2,4], [1,3], [1,2], [1,2], [1], [1], [1];
[1,5], [1,2,4], [1,3], [1,3], [1,2], [1,2], [1,2], [1], [1], [1], [1], [1];
...
For n = 5 the 5th row of A176206 is [5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1] so replacing every term with its divisors we have the 5th row of this triangle.
Also, if the sequence is written as an irregular tetrahedron so the first six slices are:
[1],
-------
[1, 2],
[1],
-------
[1, 3],
[1, 2],
[1],
[1];
----------
[1, 2, 4],
[1, 3],
[1, 2],
[1, 2],
[1],
[1],
[1];
----------
[1, 5],
[1, 2, 4],
[1, 3],
[1, 3],
[1, 2],
[1, 2],
[1, 2],
[1],
[1],
[1],
[1],
[1];
.
The above slices appear in the lower zone of the following table which shows the correspondence between the mentioned divisors and all parts of all partitions of the positive integers.
The table is infinite. It is formed by three zones as follows:
The upper zone shows the partitions of every positive integer in colexicographic order (cf. A026792, A211992).
The lower zone shows the same numbers but arranged as divisors in accordance with the slices of the tetrahedron mentioned above.
Finally the middle zone shows the connection between the upper zone and the lower zone.
For every positive integer the numbers in the upper zone are the same numbers as in the lower zone.
.
|---|---------|-----|-------|---------|------------|---------------|
| n | | 1 | 2 | 3 | 4 | 5 |
|---|---------|-----|-------|---------|------------|---------------|
| P | | | | | | |
| A | | | | | | |
| R | | | | | | |
| T | | | | | | 5 |
| I | | | | | | 3 2 |
| T | | | | | 4 | 4 1 |
| I | | | | | 2 2 | 2 2 1 |
| O | | | | 3 | 3 1 | 3 1 1 |
| N | | | 2 | 2 1 | 2 1 1 | 2 1 1 1 |
| S | | 1 | 1 1 | 1 1 1 | 1 1 1 1 | 1 1 1 1 1 |
----|---------|-----|-------|---------|------------|---------------|
.
|---|---------|-----|-------|---------|------------|---------------|
| | A181187 | 1 | 3 1 | 6 2 1 | 12 5 2 1 | 20 8 4 2 1 |
| | | | | |/| | |/|/| | |/ |/|/| | |/ | /|/|/| |
| L | A066633 | 1 | 2 1 | 4 1 1 | 7 3 1 1 | 12 4 2 1 1 |
| I | | * | * * | * * * | * * * * | * * * * * |
| N | A002260 | 1 | 1 2 | 1 2 3 | 1 2 3 4 | 1 2 3 4 5 |
| K | | = | = = | = = = | = = = = | = = = = = |
| | A138785 | 1 | 2 2 | 4 2 3 | 7 6 3 4 | 12 8 6 4 5 |
| | | | | |\| | |\|\| | |\ |\|\| | |\ |\ |\|\| |
| | A206561 | 1 | 4 2 | 9 5 3 | 20 13 7 4 | 35 23 15 9 5 |
|---|---------|-----|-------|---------|------------|---------------|
.
|---|---------|-----|-------|---------|------------|---------------|
| | A027750 | 1 | 1 2 | 1 3 | 1 2 4 | 1 5 |
| |---------|-----|-------|---------|------------|---------------|
| | A027750 | | 1 | 1 2 | 1 3 | 1 2 4 |
| |---------|-----|-------|---------|------------|---------------|
| D | A027750 | | | 1 | 1 2 | 1 3 |
| I | A027750 | | | 1 | 1 2 | 1 3 |
| V |---------|-----|-------|---------|------------|---------------|
| I | A027750 | | | | 1 | 1 2 |
| S | A027750 | | | | 1 | 1 2 |
| O | A027750 | | | | 1 | 1 2 |
| R |---------|-----|-------|---------|------------|---------------|
| S | A027750 | | | | | 1 |
| | A027750 | | | | | 1 |
| | A027750 | | | | | 1 |
| | A027750 | | | | | 1 |
| | A027750 | | | | | 1 |
|---|---------|-----|-------|---------|------------|---------------|
.
Note that every row in the lower zone lists A027750.
Also the lower zone for every positive integer can be constructed using the first n terms of the partition numbers. For example: for n = 5 we consider the first 5 terms of A000041 (that is [1, 1, 2, 3, 5]) then the 5th slice is formed by a block with the divisors of 5, one block with the divisors of 4, two blocks with the divisors of 3, three blocks with the divisors of 2, and five blocks with the divisors of 1.
Note that the lower zone is also in accordance with the tower (a polycube) described in A221529 in which its terraces are the symmetric representation of sigma starting from the top (cf. A237593) and the heights of the mentioned terraces are the partition numbers A000041 starting from the base.
The tower has the same volume (also the same number of cubes) equal to A066186(n) as a prism of partitions of size 1*n*A000041(n).
The above table shows the correspondence between the prism of partitions and its associated tower since the number of parts in all partitions of n is equal to A006128(n) equaling the number of divisors in the n-th slice of the lower table and equaling the same the number of terms in the n-th row of triangle. Also the sum of all parts of all partitions of n is equal to A066186(n) equaling the sum of all divisors in the n-th slice of the lower table and equaling the sum of the n-th row of triangle.
The product of row n is
A007870(n).
Row n lists the first n rows of
A336812 (a subsequence).
The number of parts k in row n is
A066633(n,k).
The sum of all parts k in row n is
A138785(n,k).
The number of parts >= k in row n is
A181187(n,k).
The sum of all parts >= k in row n is
A206561(n,k).
The number of parts <= k in row n is
A210947(n,k).
The sum of all parts <= k in row n is
A210948(n,k).
Cf.
A000070,
A000041,
A002260,
A026792,
A027750,
A058399,
A127093,
A135010,
A138121,
A176206,
A182703,
A206437,
A207031,
A207383,
A211992,
A221529,
A221530,
A221531,
A245095,
A221649,
A221650,
A237593,
A302246,
A302247,
A336811,
A337209,
A339106,
A339258,
A339278,
A339304,
A340035,
A340061,
A346741.
-
A338156[rowmax_]:=Table[Flatten[Table[ConstantArray[Divisors[n-m],PartitionsP[m]],{m,0,n-1}]],{n,rowmax}];
A338156[10] (* Generates 10 rows *) (* Paolo Xausa, Jan 12 2023 *)
-
A338156(rowmax)=vector(rowmax,n,concat(vector(n,m,concat(vector(numbpart(m-1),i,divisors(n-m+1))))));
A338156(10) \\ Generates 10 rows - Paolo Xausa, Feb 17 2023
A056538
Irregular triangle read by rows: row n lists the divisors of n in decreasing order.
Original entry on oeis.org
1, 2, 1, 3, 1, 4, 2, 1, 5, 1, 6, 3, 2, 1, 7, 1, 8, 4, 2, 1, 9, 3, 1, 10, 5, 2, 1, 11, 1, 12, 6, 4, 3, 2, 1, 13, 1, 14, 7, 2, 1, 15, 5, 3, 1, 16, 8, 4, 2, 1, 17, 1, 18, 9, 6, 3, 2, 1, 19, 1, 20, 10, 5, 4, 2, 1, 21, 7, 3, 1, 22, 11, 2, 1, 23, 1, 24, 12, 8, 6, 4, 3, 2, 1, 25, 5, 1, 26, 13, 2, 1, 27, 9
Offset: 1
Triangle begins:
1;
2, 1;
3, 1;
4, 2, 1;
5, 1;
6, 3, 2, 1;
7, 1;
8, 4, 2, 1;
9, 3, 1;
10, 5, 2, 1;
11, 1;
12, 6, 4, 3, 2, 1;
13, 1;
14, 7, 2, 1;
15, 5, 3, 1;
16, 8, 4, 2, 1;
17, 1;
18, 9, 6, 3, 2, 1;
19, 1;
20, 10, 5, 4, 2, 1;
-
a056538 n k = a056538_tabf !! (n-1) !! (k-1)
a056538_row n = a056538_tabf !! (n-1)
a056538_tabf = map reverse a027750_tabf
-- Reinhard Zumkeller, Sep 28 2014
-
[Reverse(Divisors(n)) : n in [1..30]];
-
map(op,[seq(reverse(sort(divisors(j))),j=1..30)]);
cdr := proc(l) if 0 = nops(l) then ([]) else (l[2..nops(l)]): fi: end:
reverse := proc(l) if 0 = nops(l) then ([]) else [op(reverse(cdr(l))), l[1]]; fi: end:
-
Table[Reverse@ Divisors@ n, {n, 27}] // Flatten (* Michael De Vlieger, Jul 27 2016 *)
-
row(n)=Vecrev(divisors(n)) \\ Charles R Greathouse IV, Sep 02 2015
A086971
Number of semiprime divisors of n.
Original entry on oeis.org
0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 2, 1, 1, 0, 2, 1, 1, 1, 2, 0, 3, 0, 1, 1, 1, 1, 3, 0, 1, 1, 2, 0, 3, 0, 2, 2, 1, 0, 2, 1, 2, 1, 2, 0, 2, 1, 2, 1, 1, 0, 4, 0, 1, 2, 1, 1, 3, 0, 2, 1, 3, 0, 3, 0, 1, 2, 2, 1, 3, 0, 2, 1, 1, 0, 4, 1, 1, 1, 2, 0, 4, 1, 2, 1, 1, 1, 2, 0, 2, 2, 3, 0, 3
Offset: 1
- G. H. Hardy and E. M. Wright, Section 17.10 in An Introduction to the Theory of Numbers, 5th ed., Oxford, England: Clarendon Press, 1979.
- T. D. Noe, Table of n, a(n) for n = 1..10000
- E. A. Bender and J. R. Goldman, On the Applications of Mobius Inversion in Combinatorial Analysis, Amer. Math. Monthly 82, (1975), 789-803.
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, arXiv:math/0205301 [math.CO], 2002; Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210.
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]
- N. J. A. Sloane, Transforms.
- Eric Weisstein's World of Mathematics, Semiprime.
- Eric Weisstein's World of Mathematics, Divisor Function.
- Eric Weisstein's World of Mathematics, Moebius Transform.
Cf.
A001358,
A064911,
A001221,
A000005,
A000010,
A004018,
A007913,
A056170,
A079275,
A001222,
A220264 (least inverse).
-
a086971 = sum . map a064911 . a027750_row
-- Reinhard Zumkeller, Dec 14 2012
-
a:= proc(n) local l, m; l:=ifactors(n)[2]; m:=nops(l);
m*(m-1)/2 +add(`if`(i[2]>1, 1, 0), i=l)
end:
seq(a(n), n=1..120); # Alois P. Heinz, Jul 18 2013
-
semiPrimeQ[n_] := PrimeOmega@ n == 2; f[n_] := Length@ Select[Divisors@ n, semiPrimeQ@# &]; Array[f, 105] (* Zak Seidov, Mar 31 2011 and modified by Robert G. Wilson v, Dec 08 2012 *)
a[n_] := Count[e = FactorInteger[n][[;; , 2]], ?(# > 1 &)] + (o = Length[e])*(o - 1)/2; Array[a, 100] (* _Amiram Eldar, Jun 30 2022 *)
-
/* The following definitions of a(n) are equivalent. */
a(n) = sumdiv(n,d,bigomega(d)==2)
a(n) = f=factor(n); j=matsize(f)[1]; sum(m=1,j,f[m,2]>=2) + binomial(j,2)
a(n) = f=factor(n); j=omega(n); sum(m=1,j,f[m,2]>=2) + binomial(j,2)
a(n) = omega(n/core(n)) + binomial(omega(n),2)
/* Rick L. Shepherd, Mar 06 2006 */
A033273
Number of nonprime divisors of n.
Original entry on oeis.org
1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 2, 4, 1, 4, 1, 4, 2, 2, 1, 6, 2, 2, 3, 4, 1, 5, 1, 5, 2, 2, 2, 7, 1, 2, 2, 6, 1, 5, 1, 4, 4, 2, 1, 8, 2, 4, 2, 4, 1, 6, 2, 6, 2, 2, 1, 9, 1, 2, 4, 6, 2, 5, 1, 4, 2, 5, 1, 10, 1, 2, 4, 4, 2, 5, 1, 8, 4, 2, 1, 9, 2, 2, 2, 6, 1, 9, 2, 4, 2, 2, 2, 10, 1, 4, 4, 7, 1, 5, 1, 6
Offset: 1
-
a033273 = length . filter ((== 0) . a010051) . a027750_row
-- Reinhard Zumkeller, Dec 16 2013
-
[NumberOfDivisors(n) - #PrimeDivisors(n): n in [1..150]]; // Vincenzo Librandi, May 17 2017
-
Table[Length[Select[Divisors[n], ! PrimeQ[#] &]], {n, 104}] (* Jayanta Basu, May 23 2013 *)
Table[DivisorSigma[0, n] - PrimeNu[n], {n, 100}] (* Vincenzo Librandi, May 17 2017 *)
Table[Count[Divisors[n],?CompositeQ],{n,110}]+1 (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale, Jun 11 2019 *)
-
a(n) = numdiv(n) - omega(n); \\ Michel Marcus, Apr 28 2016
A161700
a(n) is the sum of the elements on the antidiagonal of the difference table of the divisors of n.
Original entry on oeis.org
1, 3, 5, 7, 9, 13, 13, 15, 19, 17, 21, 28, 25, 21, 41, 31, 33, 59, 37, 21, 53, 29, 45, 39, 61, 33, 65, 49, 57, 171, 61, 63, 77, 41, 117, 61, 73, 45, 89, -57, 81, 309, 85, 105, 167, 53, 93, -80, 127, 61, 113, 133, 105, 321, 173, 183, 125, 65, 117, -1039, 121, 69, 155, 127, 201, 333, 133, 189, 149, -69, 141, 117, 145, 81, 317, 217, 269
Offset: 1
n=12: A000005(12)=6;
EDP(12,x) = (x^5 - 5*x^4 + 5*x^3 + 5*x^2 + 114*x + 120)/120 = A161701(x) is the interpolating polynomial for {(0,1),(1,2),(2,3),(3,4),(4,6),(5,12)},
{EDP(12,x): 0<=x<6} = {1, 2, 3, 4, 6, 12} = divisors of 12,
a(12) = EDP(12,6) = 28.
From _Peter Luschny_, May 18 2016: (Start)
a(40) = -57 because the sum of the elements on the antidiagonal of DTD(40) is -57.
The DTD(40) is:
[ 1 2 4 5 8 10 20 40]
[ 1 2 1 3 2 10 20 0]
[ 1 -1 2 -1 8 10 0 0]
[ -2 3 -3 9 2 0 0 0]
[ 5 -6 12 -7 0 0 0 0]
[ -11 18 -19 0 0 0 0 0]
[ 29 -37 0 0 0 0 0 0]
[ -66 0 0 0 0 0 0 0]
(End)
Cf.
A000012,
A000027,
A005408,
A000124,
A016813,
A086514,
A016921,
A000125,
A058331,
A002522,
A017281,
A161701,
A017533,
A161702,
A161703,
A000127,
A158057,
A161704,
A161705,
A161706,
A161707,
A161708,
A161709,
A161710,
A080856,
A161711,
A161712,
A161713,
A161714,
A161715,
A128470,
A006261.
-
f:= proc(n)
local D, nD;
D:= sort(convert(numtheory:-divisors(n),list));
nD:= nops(D);
CurveFitting:-PolynomialInterpolation([$0..nD-1],D, nD)
end proc:
map(f, [$1..100]); # Robert Israel, May 18 2016
-
a[n_] := (d = Divisors[n]; t = Table[Differences[d, k], {k, 0, lg = Length[d]}]; Sum[t[[lg - k + 1, k]], {k, 1, lg}]);
Array[a, 77] (* Jean-François Alcover, Jan 25 2018 *)
-
def A161700(n):
D = divisors(n)
T = matrix(ZZ, len(D))
for (m, d) in enumerate(D):
T[0, m] = d
for k in range(m-1, -1, -1) :
T[m-k, k] = T[m-k-1, k+1] - T[m-k-1, k]
return sum(T[k,len(D)-k-1] for k in range(len(D)))
print([A161700(n) for n in range(1,78)]) # Peter Luschny, May 18 2016
A243822
Number of k < n such that rad(k) | n but k does not divide n, where rad = A007947.
Original entry on oeis.org
0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 2, 0, 2, 1, 0, 0, 4, 0, 2, 1, 3, 0, 3, 0, 3, 0, 2, 0, 10, 0, 0, 2, 4, 1, 5, 0, 4, 2, 3, 0, 11, 0, 3, 2, 4, 0, 5, 0, 6, 2, 3, 0, 8, 1, 3, 2, 4, 0, 14, 0, 4, 2, 0, 1, 14, 0, 4, 2, 12, 0, 6, 0, 5, 3, 4, 1, 15, 0, 4, 0, 5, 0, 16, 1, 5, 3, 3, 0, 20, 1, 4, 3, 5, 1, 8, 0, 7, 2, 6
Offset: 1
From _Michael De Vlieger_, Aug 11 2024: (Start)
Let S(n) = row n of A162306 and let D(n) = row n of A027750.a(2) = 0 since S(2) \ D(2) = {1, 2} \ {1, 2} is null.
a(10) = 2 since S(10) \ D(10) = {1, 2, 4, 5, 8, 10} \ {1, 2, 5, 10} = {4, 8}.a(16) = 0 since S(16) \ D(16) = {1, 2, 4, 8, 16} \ {1, 2, 4, 8, 16} is null, etc.Table of a(n) and S(n) \ D(n):
n a(n) row n of A272618.
---------------------------
6 1 {4}
10 2 {4, 8}
12 2 {8, 9}
14 2 {4, 8}
15 1 {9}
18 4 {4, 8, 12*, 16}
20 2 {8, 16}
21 1 {9}
22 3 {4, 8, 16}
24 3 {9, 16, 18*}
26 3 {4, 8, 16}
28 2 {8, 16}
30 10 {4, 8, 9, 12, 16, 18, 20, 24, 25, 27}
Terms in A272618 marked with an asterisk are counted by A355432. All other terms are counted by A361235. (End)
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Exploring Number Bases as Tools, ACM Inroads, March 2012, Vol. 3, No. 1, pp. 4-12.
- Michael De Vlieger, Regular and coregular numbers, ResearchGate, 2024.
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20
Cf.
A000005,
A000961,
A024619,
A027750,
A010846,
A045763,
A162306,
A243823,
A272618,
A304570,
A355432,
A361235.
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
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.
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).
Cf.
A000005,
A001620,
A027750,
A060680,
A088723,
A088725,
A181063,
A199970,
A328165,
A328166,
A328448,
A328450.
-
a137921 n = length $ filter (> 0) $
map ((mod n) . (+ 1)) [d | d <- [1..n], mod n d == 0]
-- Reinhard Zumkeller, Nov 23 2011
-
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
-
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 *)
-
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)
-
a(n)=sumdiv(n,d,(n%(d+1)!=0)); \\ Joerg Arndt, Jan 06 2015
-
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
Comments