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.

Showing 1-2 of 2 results.

A380305 Triangle read by rows: T(n,k) = (n - floor((n - k)/k)) mod k, for 0 < k <= n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 1, 0, 0, 0, 2, 2, 1, 0, 0, 1, 0, 3, 2, 1, 0, 0, 1, 1, 3, 3, 2, 1, 0, 0, 0, 1, 0, 4, 3, 2, 1, 0, 0, 0, 2, 1, 4, 4, 3, 2, 1, 0, 0, 1, 0, 2, 0, 5, 4, 3, 2, 1, 0, 0, 1, 0, 2, 1, 5, 5, 4, 3, 2, 1, 0, 0, 0, 1, 3, 2, 0, 6, 5, 4, 3, 2, 1, 0
Offset: 1

Views

Author

Lechoslaw Ratajczak, Jan 19 2025

Keywords

Comments

The triangle is a variant of the triangle in A048158. The period of the k-th column consists of the period of the k-th column in the triangle in A048158 (0,1,2,...,k-1) and its consecutive k-1 right rotations (moving the rightmost element to the left end). Thus the k-th column has period k^2 and the r-th element of this period has the form (r - 1 - floor((r - 1)/k)) mod k (1 <= r <= k^2).
Such as the triangle in A048158 may be the basis for definitions of different kinds of numbers (abundant numbers, perfect numbers, etc.), this triangle may be the basis for definitions of counterparts of these numbers (elements of A375595 as counterparts of abundant numbers, elements of A380153 as counterparts of perfect numbers).

Examples

			Triangle begins:
n\k| 1 2 3 4 5 6 7 8 9 10 11 ...
----------------------------
  1| 0
  2| 0 0
  3| 0 1 0
  4| 0 1 1 0
  5| 0 0 2 1 0
  6| 0 0 2 2 1 0
  7| 0 1 0 3 2 1 0
  8| 0 1 1 3 3 2 1 0
  9| 0 0 1 0 4 3 2 1 0
 10| 0 0 2 1 4 4 3 2 1  0
 11| 0 1 0 2 0 5 4 3 2  1  0
 ...
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=Mod[n - Floor[(n - k)/k], k]; Table[T[n,k], {n,13},{k,n}]//Flatten (* Stefano Spezia, Jan 20 2025 *)
  • Maxima
    (for n:1 thru 25 do
    (for k:1 thru n do
    (T[n,k]:mod(n-floor((n-k)/k),k)),
    print(makelist(T[n,i], i, 1, n))));
    
  • PARI
    row(n) = vector(n, k, (n - floor((n - k)/k)) % k); \\ Michel Marcus, Jan 20 2025

A381060 Numbers t which are the sum of some subset of the values of k satisfying the equation (t - floor((t - k)/k)) mod k = 0 (t > 1, 1 <= k < t).

Original entry on oeis.org

23, 29, 39, 41, 53, 59, 65, 71, 77, 79, 83, 89, 99, 101, 107, 111, 113, 119, 125, 137, 143, 149, 155, 161, 167, 173, 179, 185, 191, 197, 199, 209, 221, 227, 233, 239, 245, 251, 257, 263, 269, 279, 281, 287, 293, 299, 305, 311, 317, 323, 329, 335, 339, 341, 349, 353, 359, 365, 371
Offset: 1

Views

Author

Lechoslaw Ratajczak, Feb 12 2025

Keywords

Comments

The sequence is based on the triangle in A380305, which is a variant of the triangle in A048158. Thus, the elements of this sequence are counterparts of pseudoperfect numbers (A005835), such as the elements of A375595 are counterparts of abundant numbers (A005101).
The sequence includes all elements of A380153.
The first even element of this sequence is a(768) = 4094.

Examples

			23 is in this sequence because the only k's < 23 satisfying the equation (23 - floor((23 - k)/k)) mod k = 0 are: 1, 5, 7, 11, hence: 5+7+11 = 23.
29 is in this sequence because the only k's < 29 satisfying the equation (29 - floor((29 - k)/k)) mod k = 0 are: 1, 2, 3, 5, 9, 14, hence: 1+2+3+9+14 = 29 and 1+5+9+14 = 29.
47 is not in this sequence because the only k's < 47 satisfying the equation (47 - floor((47 - k)/k)) mod k = 0  are: 1, 3, 7, 11, 15, 23 and no subset of these numbers adds to 47.
		

Crossrefs

Programs

  • Maxima
    (kill(all), s(y):=(f(i,j):=mod(i-floor((i-j)/j),j),s:0,x:1,
          for k:1 thru floor(y/2) do
                  (if f(y,k)=0 then
                  (s:s+k, B[x]:k, x:x+1)),
    B:setify(makelist(B[r],r,1,x-1)), s),
    n:1, for t:2 thru 1000 do
                  (if s(t)>=t  then
                         (for b:2 while b<=x-1 and e#t do
                         (C:args(powerset(B,b)),
                                for h:1 while h<=length(C) and e#t do
                                (e:apply("+" , args(C[h])),
                                        if e=t then
                                        (print(n , " " , t), n:n+1))))));
Showing 1-2 of 2 results.