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.
%I A380305 #18 Feb 05 2025 13:22:01 %S A380305 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, %T A380305 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, %U A380305 0,2,1,5,5,4,3,2,1,0,0,0,1,3,2,0,6,5,4,3,2,1,0 %N A380305 Triangle read by rows: T(n,k) = (n - floor((n - k)/k)) mod k, for 0 < k <= n. %C A380305 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). %C A380305 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). %e A380305 Triangle begins: %e A380305 n\k| 1 2 3 4 5 6 7 8 9 10 11 ... %e A380305 ---------------------------- %e A380305 1| 0 %e A380305 2| 0 0 %e A380305 3| 0 1 0 %e A380305 4| 0 1 1 0 %e A380305 5| 0 0 2 1 0 %e A380305 6| 0 0 2 2 1 0 %e A380305 7| 0 1 0 3 2 1 0 %e A380305 8| 0 1 1 3 3 2 1 0 %e A380305 9| 0 0 1 0 4 3 2 1 0 %e A380305 10| 0 0 2 1 4 4 3 2 1 0 %e A380305 11| 0 1 0 2 0 5 4 3 2 1 0 %e A380305 ... %t A380305 T[n_,k_]:=Mod[n - Floor[(n - k)/k], k]; Table[T[n,k], {n,13},{k,n}]//Flatten (* _Stefano Spezia_, Jan 20 2025 *) %o A380305 (Maxima) %o A380305 (for n:1 thru 25 do %o A380305 (for k:1 thru n do %o A380305 (T[n,k]:mod(n-floor((n-k)/k),k)), %o A380305 print(makelist(T[n,i], i, 1, n)))); %o A380305 (PARI) row(n) = vector(n, k, (n - floor((n - k)/k)) % k); \\ _Michel Marcus_, Jan 20 2025 %Y A380305 Cf. A048158, A375595, A378275, A380153. %K A380305 nonn,tabl %O A380305 1,13 %A A380305 _Lechoslaw Ratajczak_, Jan 19 2025