login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A321368 Triangular array read by rows: T(n, k) is the number of (i, j), ordered pairs of integers, satisfying 1 <= i < j <= n and floor(n * (1/i - 1/j)) = k; n >= 1, 0 <= k < n. 2
0, 0, 1, 1, 1, 1, 2, 1, 2, 1, 4, 2, 1, 2, 1, 5, 4, 1, 1, 3, 1, 8, 4, 3, 1, 1, 3, 1, 10, 6, 4, 1, 1, 1, 4, 1, 14, 7, 3, 4, 1, 0, 2, 4, 1, 17, 9, 4, 5, 1, 1, 1, 1, 5, 1, 22, 10, 6, 3, 4, 1, 0, 1, 2, 5, 1, 24, 13, 8, 3, 6, 1, 1, 0, 1, 2, 6, 1, 30, 14, 8, 6, 3, 5 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,7
LINKS
FORMULA
Sum_{k=0..n-1} T(n, k) * k = A321047(n).
EXAMPLE
Array begins:
0
0 1
1 1 1
2 1 2 1
4 2 1 2 1
5 4 1 1 3 1
8 4 3 1 1 3 1
10 6 4 1 1 1 4 1
14 7 3 4 1 0 2 4 1
17 9 4 5 1 1 1 1 5 1
22 10 6 3 4 1 0 1 2 5 1
24 13 8 3 6 1 1 0 1 2 6 1
30 14 8 6 3 5 1 0 1 1 2 6 1
34 18 9 7 2 7 1 1 0 1 1 2 7 1
40 19 12 8 2 4 6 1 0 0 1 1 3 7 1
46 21 14 6 7 2 8 1 1 0 1 0 2 2 8 1
53 24 14 8 8 2 5 6 1 0 0 1 1 1 3 8 1
58 29 13 11 10 2 3 9 1 1 0 0 1 1 1 3 9 1
66 30 17 13 7 6 2 5 7 1 0 0 1 0 1 2 3 9 1
72 34 20 14 5 10 2 3 10 1 1 0 0 1 0 1 2 3 10 1
80 38 21 13 9 11 2 3 5 8 1 0 0 0 1 1 1 1 4 10 1
89 42 21 15 11 8 7 2 3 11 1 1 0 0 1 0 1 1 2 3 11 1
98 44 25 17 12 6 11 1 3 6 8 1 0 0 0 1 0 1 1 2 4 11 1
MATHEMATICA
T[A_, k_] := If[KeyExistsQ[A, k], A[k], 0]
G[n_] := Module[{A = <||>, k, j, i}, For[j = 2, j <= n, j++, For[i = 1, i < j, i++, k = Floor[n*(1/i - 1/j)]; A[k] = T[A, k] + 1]]; A]
For[n = 1, n <= 23, n++, Print[Block[{A = G[n]}, T[A, #] & /@ Range[0, n - 1]]]]
PROG
(Java)
package oeis;
import java.util.*;
public class A {
private static Map<Integer, Integer> g(int n) {
Map<Integer, Integer> map = new HashMap<>();
for (int j = 2; j <= n; j ++) {
for (int i = 1; i < j; i ++) {
int k = (n * (j - i)) / (i * j);
Integer v = map.get(k);
map.put(k, (v == null) ? 1 : v + 1);
}
}
return map;
}
public static void main(String[] args) {
for (int n = 1; n <= 23; n ++) {
Map<Integer, Integer> map = g(n);
for (int k = 0; k < n; k ++) {
Integer v = map.get(k);
v = (v == null ? 0 : v);
System.out.print(String.format("%d, ", v));
}
//System.out.println();
}
}
}
(PARI) T(n, k) = sum(i=1, n-1, sum(j=i+1, n, floor(n * (1/i - 1/j)) == k));
tabl(nn) = for (i=1, nn, for (j=0, i-1, print1(T(i, j), ", ")); print; ) \\ Michel Marcus, Nov 08 2018
CROSSREFS
Cf. A321047.
Sequence in context: A061797 A068341 A360738 * A338508 A100380 A205403
KEYWORD
nonn,tabl
AUTHOR
Luc Rousseau, Nov 07 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 23 10:48 EDT 2024. Contains 374547 sequences. (Running on oeis4.)