A356223
Position of n-th appearance of 2n in the sequence of prime gaps (A001223). If 2n does not appear at least n times, set a(n) = -1.
Original entry on oeis.org
2, 6, 15, 79, 68, 121, 162, 445, 416, 971, 836, 987, 2888, 1891, 1650, 5637, 5518, 4834, 9237, 8152, 10045, 21550, 20248, 20179, 29914, 36070, 24237, 53355, 52873, 34206, 103134, 90190, 63755, 147861, 98103, 117467, 209102, 206423, 124954, 237847, 369223
Offset: 1
We need the first 15 prime gaps (1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6) before we reach the 3rd appearance of 6, so a(6) = 15.
A073491 lists numbers with gapless prime indices.
A356224 counts divisors with gapless prime indices, complement
A356225.
A356226 = gapless interval lengths of prime indices, run-lengths
A287170.
-
nn=1000;
gaps=Differences[Array[Prime,nn]];
Table[Position[gaps,2*n][[n,1]],{n,Select[Range[nn],Length[Position[gaps,2*#]]>=#&]}]
A259366
Numbers for which the differences between consecutive divisors (ordered by size) are not distinct.
Original entry on oeis.org
6, 12, 15, 18, 20, 24, 30, 36, 40, 42, 45, 48, 54, 56, 60, 63, 66, 70, 72, 75, 78, 80, 84, 90, 91, 96, 99, 100, 102, 105, 108, 110, 112, 114, 120, 126, 130, 132, 135, 138, 140, 144, 150, 156, 160, 162, 165, 168, 174, 180, 182, 186, 189, 192, 195, 198, 200
Offset: 1
. n | A193829(n,*) | A027750(n,*) |
. ----+--------------------+-----------------------+------------
. 10 | {1,3,5} | {1,2,5,10} |
. 11 | {10} | {1,11} |
. 12 | {1,1,1,2,6} | {1,2,3,4,6,12} | a(2) = 12
. 13 | {12} | {1,13} |
. 14 | {1,5,7} | {1,2,7,14} |
. 15 | {2,2,10} | {1,3,5,15} | a(3) = 15
. 16 | {1,2,4,8} | {1,2,4,8,16} |
. 17 | {16} | {1,17} |
. 18 | {1,1,3,3,9} | {1,2,3,6,9,18} | a(4) = 18
. 19 | {18} | {1,19} |
. 20 | {1,2,1,5,10} | {1,2,4,5,10,20} | a(5) = 20
. 21 | {2,4,14} | {1,3,7,21} |
. 22 | {1,9,11} | {1,2,11,22} |
. 23 | {22} | {1,23} |
. 24 | {1,1,1,2,2,4,12} | {1,2,3,4,6,8,12,24} | a(6) = 24
. 25 | {4,20} | {1,5,25} | .
-
a259366 n = a259366_list !! (n-1)
a259366_list = filter (\x -> a060682 x < a000005' x - 1) [2..]
-
q[k_] := Module[{d = Differences[Divisors[k]]}, CountDistinct[d] < Length[d]]; Select[Range[200], q] (* Amiram Eldar, Jan 27 2025 *)
A328025
Irregular triangle read by rows where row n gives the differences between consecutive divisors of n in weakly decreasing order.
Original entry on oeis.org
1, 2, 2, 1, 4, 3, 1, 1, 6, 4, 2, 1, 6, 2, 5, 3, 1, 10, 6, 2, 1, 1, 1, 12, 7, 5, 1, 10, 2, 2, 8, 4, 2, 1, 16, 9, 3, 3, 1, 1, 18, 10, 5, 2, 1, 1, 14, 4, 2, 11, 9, 1, 22, 12, 4, 2, 2, 1, 1, 1, 20, 4, 13, 11, 1, 18, 6, 2, 14, 7, 3, 2, 1, 28, 15, 5, 4, 2, 1, 1, 1
Offset: 1
Triangle begins:
{}
1
2
2 1
4
3 1 1
6
4 2 1
6 2
5 3 1
10
6 2 1 1 1
12
7 5 1
10 2 2
8 4 2 1
16
9 3 3 1 1
18
10 5 2 1 1
For example, the divisors of 18 are {1,2,3,6,9,18}, with differences {1,1,3,3,9}, so row 18 is {9,3,3,1,1}.
Same as
A193829 with rows sorted in weakly decreasing order.
Same as
A328027 with rows reversed.
A328027
Irregular triangle read by rows where row n lists, in weakly increasing order, the differences between consecutive divisors of n.
Original entry on oeis.org
1, 2, 1, 2, 4, 1, 1, 3, 6, 1, 2, 4, 2, 6, 1, 3, 5, 10, 1, 1, 1, 2, 6, 12, 1, 5, 7, 2, 2, 10, 1, 2, 4, 8, 16, 1, 1, 3, 3, 9, 18, 1, 1, 2, 5, 10, 2, 4, 14, 1, 9, 11, 22, 1, 1, 1, 2, 2, 4, 12, 4, 20, 1, 11, 13, 2, 6, 18, 1, 2, 3, 7, 14, 28, 1, 1, 1, 2, 4, 5, 15
Offset: 1
Triangle begins:
{}
1
2
1 2
4
1 1 3
6
1 2 4
2 6
1 3 5
10
1 1 1 2 6
12
1 5 7
2 2 10
1 2 4 8
16
1 1 3 3 9
18
1 1 2 5 10
2 4 14
1 9 11
22
1 1 1 2 2 4 12
For example, the divisors of 18 are {1,2,3,6,9,18}, with differences {1,1,3,3,9}, which is row 18.
Same as
A193829 with rows sorted in increasing order.
Same as
A328025 with rows reversed.
A057449
Product of differences between consecutive positive divisors of n.
Original entry on oeis.org
1, 1, 2, 2, 4, 3, 6, 8, 12, 15, 10, 12, 12, 35, 40, 64, 16, 81, 18, 100, 112, 99, 22, 192, 80, 143, 216, 588, 28, 600, 30, 1024, 352, 255, 224, 1944, 36, 323, 520, 2400, 40, 3087, 42, 3388, 2880, 483, 46, 12288, 252, 5625, 952, 6084, 52, 19683, 1056, 14112, 1216
Offset: 1
Since positive divisors of 12 are 1, 2, 3, 4, 6 and 12, a(12) = (2-1) *(3-2) *(4-3) *(6-4) *(12-6) = 1 *1 *1 *2 *6 = 12.
-
a057449 = product . a193829_row -- Reinhard Zumkeller, Jun 23 2013
-
Times@@Differences[Divisors[#]]&/@Range[80] (* Harvey P. Dale, Apr 20 2011 *)
-
a(n) = {my(d = divisors(n)); prod(i=1, #d-1, d[i+1] - d[i]);} \\ Michel Marcus, May 15 2014
A330492
a(n) = sum of second differences of the sorted divisors of n.
Original entry on oeis.org
0, 0, 1, 0, 2, 0, 3, 4, 4, 0, 5, 0, 6, 8, 7, 0, 8, 0, 9, 12, 10, 0, 11, 16, 12, 16, 13, 0, 14, 0, 15, 20, 16, 24, 17, 0, 18, 24, 19, 0, 20, 0, 21, 28, 22, 0, 23, 36, 24, 32, 25, 0, 26, 40, 27, 36, 28, 0, 29, 0, 30, 40, 31, 48, 32, 0, 33, 44, 34, 0, 35, 0, 36
Offset: 2
a(12) = 5 because the divisors of 12 are {1, 2, 3, 4, 6, 12} and {D(i)} = {d(i+1)-d(i)} ={1, 1, 1, 2, 6}, Sum_{D(i), i = 1..4} {D(i+1)-D(i)} = 0 + 0 + 1 + 4 = 5.
-
with(numtheory):nn:=100:
for n from 2 to nn do:
d:=divisors(n):n0:=nops(d):T:=array(1..n0-1,[0$n0-1]):
for j from 1 to n0-1 do:
T[j]:=d[j+1]-d[j]:
od:
s:=sum(āT[i+1]-T[i] ā,āiā=1..n0-2): printf(`%d, `,s):
od:
*** alternative program using the formula ***
with(numtheory):nn:=100:
for n from 2 to nn do:
d:=divisors(n):t:=tau(n):s:=d[t]-d[t-1]+d[1]-d[2] :
printf(`%d, `,s):
od:
-
Array[Total@ Differences[Divisors@ #, 2] &, 73, 2] (* Michael De Vlieger, Dec 16 2019 *)
-
a(n) = my(d=divisors(n)); d[#d] - d[#d-1] + d[1] - d[2]; \\ Michel Marcus, Feb 05 2020
-
from sympy import primefactors
def a(n): p = primefactors(n)[0]; return (n//p - 1) * (p - 1)
print([a(n) for n in range(2, 75)]) # Michael S. Branicky, Apr 04 2021
A337806
Numbers that are a divisor of the product of the differences of its consecutive divisors.
Original entry on oeis.org
8, 12, 16, 20, 24, 27, 28, 30, 32, 36, 40, 44, 45, 48, 52, 56, 60, 63, 64, 68, 70, 72, 76, 80, 81, 84, 88, 90, 92, 96, 99, 100, 104, 105, 108, 112, 116, 117, 120, 124, 125, 126, 128, 132, 135, 136, 140, 144, 148, 150, 152, 153, 154, 156, 160, 164, 165, 168, 171, 172, 175, 176, 180, 182, 184
Offset: 1
8 is a term as the divisors of 8 are 1,2,4,8, the differences of which are 1,2,4, and 1*2*4 = 8 which is a multiple of 8.
20 is a term as the divisors of 20 are 1,2,4,5,10,20, the differences of which are 1,2,1,5,10, and 1*2*1*5*10 = 100 which is a multiple of 20.
27 is a term as the divisors of 27 are 1,3,9,27, the differences of which are 2,6,18, and 2*6*18 = 216 which is a multiple of 27.
99 is a term as the divisors of 99 are 1,3,9,11,33,99, the difference of which are 2,6,2,22,66, and 2*6*2*22*66 = 34848 which is a multiple of 99.
-
filter:= proc(n) local R,p;
R:= sort(convert(numtheory:-divisors(n),list));
p:= convert(R[2..-1]-R[1..-2],`*`);
p mod n = 0
end proc:
select(filter, [$2..1000]); # Robert Israel, Sep 27 2020
-
Select[Range[2, 200], Divisible[Times @@ Differences @ Divisors[#], #] &] (* Amiram Eldar, Sep 23 2020 *)
-
isok(k) = my(d=divisors(k)); (#d > 1) && (vecprod(vector(#d-1, k, d[k+1]-d[k])) % k) == 0; \\ Michel Marcus, Sep 23 2020
A356221
Position of second appearance of 2n in the sequence of prime gaps A001223; if 2n does not appear at least twice, a(n) = -1.
Original entry on oeis.org
3, 6, 11, 72, 42, 47, 62, 295, 180, 259, 297, 327, 446, 462, 650, 1315, 1059, 1532, 4052, 2344, 3732, 3861, 8805, 7234, 4754, 2810, 4231, 14124, 5949, 9834, 17200, 10229, 19724, 25248, 15927, 30765, 42673, 28593, 24554, 50523, 44227, 44390, 29040, 89715, 47350
Offset: 1
The position of the first (instead of second) appearance of 2n is
A038664.
The position of the n-th appearance of 2n is
A356223.
A073491 lists numbers with gapless prime indices.
A274121 counts appearances of the n-th prime gap in those prior.
A356226 gives the lengths of maximal gapless intervals of prime indices.
-
nn=1000;
gaps=Differences[Array[Prime,nn]];
mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
Table[Position[gaps,2*n][[2,1]],{n,mnrm[Select[Range[nn],Length[Position[gaps,2*#]]>=2&]]}]
A356222
Array read by antidiagonals upwards where A(n,k) is the position of the k-th appearance of 2n in the sequence of prime gaps A001223. If A001223 does not contain 2n at least k times, set A(n,k) = -1.
Original entry on oeis.org
2, 4, 3, 9, 6, 5, 24, 11, 8, 7, 34, 72, 15, 12, 10, 46, 42, 77, 16, 14, 13, 30, 47, 53, 79, 18, 19, 17, 282, 62, 91, 61, 87, 21, 22, 20, 99, 295, 66, 97, 68, 92, 23, 25, 26, 154, 180, 319, 137, 114, 80, 94, 32, 27, 28, 189, 259, 205, 331, 146, 121, 82, 124, 36, 29, 33
Offset: 1
Array begins:
k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9
n=1: 2 3 5 7 10 13 17 20 26
n=2: 4 6 8 12 14 19 22 25 27
n=3: 9 11 15 16 18 21 23 32 36
n=4: 24 72 77 79 87 92 94 124 126
n=5: 34 42 53 61 68 80 82 101 106
n=6: 46 47 91 97 114 121 139 168 197
n=7: 30 62 66 137 146 150 162 223 250
n=8: 282 295 319 331 335 378 409 445 476
n=9: 99 180 205 221 274 293 326 368 416
For example, the positions in A001223 of appearances of 2*3 begin: 9, 11, 15, 16, 18, 21, 23, ..., which is row n = 3 (A320701).
The row containing n is
A028334(n).
The column containing n is
A274121(n).
A073491 lists numbers with gapless prime indices.
A356224 counts even divisors with gapless prime indices, complement
A356225.
-
gapa=Differences[Array[Prime,10000]];
Table[Position[gapa,2*(k-n+1)][[n,1]],{k,6},{n,k}]
Comments