OFFSET
0,1
COMMENTS
The three smallest values of n (n_1, n_2, n_3) for which a(n) is unknown after computing consecutive e(t) for 1 <= t <= z:
z | n_1 | n_2 | n_3 |
----------------------------------------
10^5 | 309 | 343 | 352 |
2*10^5 | 394 | 556 | 558 |
3*10^5 | 647 | 706 | 755 |
4*10^5 | 941 | 951 | 962 |
5*10^5 | 951 | 964 | 1069 |
Are there any values of n for which a(n) = 0?
EXAMPLE
Let T(i,j) be the triangle read by rows: T(i,j) = 1 if i mod j = floor((i - j)/j) mod j, T(i,j) = 0 otherwise, for 1 <= j <= i.
The triangle begins:
i\j | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
-----------------------------------------
1 | 1
2 | 1 1
3 | 1 0 1
4 | 1 0 0 1
5 | 1 1 0 0 1
6 | 1 1 0 0 0 1
7 | 1 0 1 0 0 0 1
8 | 1 0 0 0 0 0 0 1
9 | 1 1 0 1 0 0 0 0 1
10 | 1 1 0 0 0 0 0 0 0 1
11 | 1 0 1 0 1 0 0 0 0 0 1
12 | 1 0 1 0 0 0 0 0 0 0 0 1
13 | 1 1 0 0 0 1 0 0 0 0 0 0 1
14 | 1 1 0 1 0 0 0 0 0 0 0 0 0 1
15 | 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1
...
The j-th column has period j^2. Consecutive elements of this period are j X j identity matrix entries, read by rows.
a(0) = 39 because 39 is the smallest m for which e(m) = 0 (only k's satisfying the equation: 39 mod k = floor((39 - k)/k) mod k are: 1, 3, 7, 9, 19, 39, hence: 1+3+7+9+19+39-2*39 = 0 = e(39)).
a(2) = 5847 because 5847 is the smallest m for which e(m) = 2 (only k's satisfying the equation: 5847 mod k = floor((5847 - k)/k) mod k are: 1, 85, 135, 171, 343, 730, 1461, 2923, 5847, hence: 1+85+135+171+343+730+1461+2923+5847-2*5847 = 2 = e(5847)).
PROG
(VBA)
Sub calcul()
For m = 1 To 500000
s = 0
For k = 1 To WorksheetFunction.Floor(m / 2, 1)
If (m - WorksheetFunction.Floor((m - k) / k, 1)) Mod k = 0 Then
s = s + k
End If
Next k
If s > m Then
e = s - m
v = WorksheetFunction.Ceiling(e / 1000000, 1)
If IsEmpty(Cells(e - (v - 1) * 1000000, v)) = False Then
Else
Cells(e - (v - 1) * 1000000, v).Value = m
End If
End If
Next m
End Sub
CROSSREFS
KEYWORD
nonn
AUTHOR
Lechoslaw Ratajczak, Sep 16 2024
STATUS
approved