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.

A288969 Triangular array read by rows: row n is the list of the 2*n-1 successive values taken by the function z = n - floor(x) * floor(y) along the hyperbola with equation y = n/x, for 1 <= x <= n.

This page as a plain text file.
%I A288969 #36 Oct 13 2017 05:51:56
%S A288969 0,0,1,0,0,1,2,1,0,0,1,2,0,2,1,0,0,1,2,3,1,3,2,1,0,0,1,2,3,0,2,0,3,2,
%T A288969 1,0,0,1,2,3,4,1,3,1,4,3,2,1,0,0,1,2,3,4,0,2,4,2,0,4,3,2,1,0,0,1,2,3,
%U A288969 4,5,1,3,0,3,1,5,4,3,2,1,0
%N A288969 Triangular array read by rows: row n is the list of the 2*n-1 successive values taken by the function z = n - floor(x) * floor(y) along the hyperbola with equation y = n/x, for 1 <= x <= n.
%C A288969 See A288966's links for explanations about the algorithm used to go along an hyperbola of equation y = n/x, with 1 <= x <= n.
%C A288969 When represented as a triangular array, internal zeros "0" correspond to factorizations of n.
%C A288969 This array appears to resemble a version of the sieve of Eratosthenes with zeros aligned.
%C A288969 A053186 and A293497 appear to intertwine into this sequence. The following will be denoted "assumption (1)": with t indexing columns, t=0 being central: T(n, 2k) = A053186(n+k^2) and T(n, 2k+1) = A293497(n+k(k+1)). - _Luc Rousseau_, Oct 11 2017
%C A288969 It would be nice to have a larger b-file, or an a-file. - _N. J. A. Sloane_, Oct 13 2017
%H A288969 Luc Rousseau, <a href="/A288969/a288969.txt">The first 25 lines of the triangle array, formatted</a>
%F A288969 From _Luc Rousseau_, Oct 11 2017: (Start)
%F A288969 (All formulas under assumption (1))
%F A288969 With t indexing columns, t=0 being central,
%F A288969 T(n, 2k) = A053186(n+k^2).
%F A288969 T(n, 2k+1) = A293497(n+k(k+1)).
%F A288969 T(n, t) = n - x*(x+t) where x = floor((-t+sqrt(t^2+4n))/2).
%F A288969 With A293578 viewed as a 2D array T',
%F A288969 T'(n,t)=T(n-1,t)-T(n,t)+1 (define T(0,0) as 0).
%F A288969 (End)
%e A288969 Array begins:
%e A288969                 0
%e A288969               0 1 0
%e A288969             0 1 2 1 0
%e A288969           0 1 2 0 2 1 0
%e A288969         0 1 2 3 1 3 2 1 0
%e A288969       0 1 2 3 0 2 0 3 2 1 0
%e A288969     0 1 2 3 4 1 3 1 4 3 2 1 0
%e A288969   0 1 2 3 4 0 2 4 2 0 4 3 2 1 0
%t A288969 (* Under assumption (1) *)
%t A288969 A288969[n_, t_] := Module[{x},
%t A288969   x = Floor[(-t + Sqrt[t^2 + 4 n])/2];
%t A288969   n - x (t + x)
%t A288969 ] (* _Luc Rousseau_, Oct 11 2017 *)
%t A288969 (* or *)
%t A288969 FEven[x_] := x^ 2
%t A288969 InvFEven[x_] := Sqrt[x]
%t A288969 GEven[n_] := n - FEven[Floor[InvFEven[n]]]
%t A288969 FOdd[x_] := x*(x + 1)
%t A288969 InvFOdd[x_] := (Sqrt[1 + 4 x] - 1)/2
%t A288969 GOdd[n_] := n - FOdd[Floor[InvFOdd[n]]]
%t A288969 A288969[n_, t_] := Module[
%t A288969   {e, k, x},
%t A288969   e = EvenQ[t];
%t A288969   k = If[e, t/2, (t - 1)/2];
%t A288969   x = n + If[e, FEven[k], FOdd[k]];
%t A288969   If[e, GEven[x], GOdd[x]]
%t A288969 ] (* _Luc Rousseau_, Oct 11 2017 *)
%o A288969 (Java)
%o A288969 package oeis;
%o A288969 public class B {
%o A288969 public static void main(String[] args) {
%o A288969 for (int n = 1; n <= 8; n ++) {
%o A288969 hyberbolaTiles(n);
%o A288969 }
%o A288969 }
%o A288969 private static void hyberbolaTiles(int n) {
%o A288969 int x = 0, y = 0, p = 0, q = n;
%o A288969 do {
%o A288969 if (p != 0) {
%o A288969 System.out.println(n - p * q);
%o A288969 }
%o A288969 if (y < 0) { x = y + q; q --; }
%o A288969 if (y > 0) { p ++; x = y - p; }
%o A288969 if (y == 0) {
%o A288969 p ++;
%o A288969 x = 0; System.out.println("0");
%o A288969 q --;
%o A288969 }
%o A288969 y = x + p - q;
%o A288969 } while (q > 0);
%o A288969 }
%o A288969 }
%o A288969 (PARI) htrow(n) = {my(x = 0, y = 0, p = 0, q = n); while (q>0, if (p, print1(n-p*q, ", ")); if (y < 0, x = y + q; q --); if (y > 0, p ++; x = y - p); if (y == 0, p++; x = 0; print1(0, ", "); q --;); y = x + p - q;);}
%o A288969 tabf(nn) = for (n=1, nn, htrow(n); print()); \\ _Michel Marcus_, Jun 21 2017
%Y A288969 Cf. A053186, A288966, A293497, A293578.
%K A288969 nonn,tabf
%O A288969 1,7
%A A288969 _Luc Rousseau_, Jun 20 2017
%E A288969 More terms from _Michel Marcus_, Jun 21 2017