cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A374870 Let e(m) be the sum of all values of k satisfying the equation: (m mod k = floor((m - k)/k) mod k), minus 2*m (1 <= k <= m); then a(n) is the smallest m for which e(m) = n, or 0 if no e(m) has value n.

This page as a plain text file.
%I A374870 #11 Oct 21 2024 14:36:00
%S A374870 39,23,5847,735,65,29,35,77,111,173,415,185,79,47,113,137,317,867,307,
%T A374870 543,4843,2153,1203,161,59,159,351,531,1577,475,617,89,5321,95,11405,
%U A374870 1371,107,83,219,197,199,1855,365,6521,3667,8597,131
%N A374870 Let e(m) be the sum of all values of k satisfying the equation: (m mod k = floor((m - k)/k) mod k), minus 2*m (1 <= k <= m); then a(n) is the smallest m for which e(m) = n, or 0 if no e(m) has value n.
%C A374870 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:
%C A374870     z    |   n_1   |   n_2   |   n_3   |
%C A374870 ----------------------------------------
%C A374870 10^5     |   309   |   343   |   352   |
%C A374870 2*10^5   |   394   |   556   |   558   |
%C A374870 3*10^5   |   647   |   706   |   755   |
%C A374870 4*10^5   |   941   |   951   |   962   |
%C A374870 5*10^5   |   951   |   964   |  1069   |
%C A374870 Are there any values of n for which a(n) = 0?
%e A374870 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.
%e A374870 The triangle begins:
%e A374870 i\j | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
%e A374870 -----------------------------------------
%e A374870   1 | 1
%e A374870   2 | 1 1
%e A374870   3 | 1 0 1
%e A374870   4 | 1 0 0 1
%e A374870   5 | 1 1 0 0 1
%e A374870   6 | 1 1 0 0 0 1
%e A374870   7 | 1 0 1 0 0 0 1
%e A374870   8 | 1 0 0 0 0 0 0 1
%e A374870   9 | 1 1 0 1 0 0 0 0 1
%e A374870  10 | 1 1 0 0 0 0 0 0 0 1
%e A374870  11 | 1 0 1 0 1 0 0 0 0 0 1
%e A374870  12 | 1 0 1 0 0 0 0 0 0 0 0 1
%e A374870  13 | 1 1 0 0 0 1 0 0 0 0 0 0 1
%e A374870  14 | 1 1 0 1 0 0 0 0 0 0 0 0 0 1
%e A374870  15 | 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1
%e A374870  ...
%e A374870 The j-th column has period j^2. Consecutive elements of this period are j X j identity matrix entries, read by rows.
%e A374870 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)).
%e A374870 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)).
%o A374870 (VBA)
%o A374870 Sub calcul()
%o A374870 For m = 1 To 500000
%o A374870 s = 0
%o A374870       For k = 1 To WorksheetFunction.Floor(m / 2, 1)
%o A374870             If (m - WorksheetFunction.Floor((m - k) / k, 1)) Mod k = 0 Then
%o A374870             s = s + k
%o A374870             End If
%o A374870       Next k
%o A374870                    If s > m Then
%o A374870                    e = s - m
%o A374870                    v = WorksheetFunction.Ceiling(e / 1000000, 1)
%o A374870                         If IsEmpty(Cells(e - (v - 1) * 1000000, v)) = False Then
%o A374870                         Else
%o A374870                         Cells(e - (v - 1) * 1000000, v).Value = m
%o A374870                         End If
%o A374870                    End If
%o A374870 Next m
%o A374870 End Sub
%Y A374870 Cf. A005101, A033880, A051731, A294347, A375007, A375595.
%K A374870 nonn
%O A374870 0,1
%A A374870 _Lechoslaw Ratajczak_, Sep 16 2024