login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 3
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, 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, 4, 5, 1, 3, 0, 3, 1, 5, 4, 3, 2, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,7

COMMENTS

See A288966's links for explanations about the algorithm used to go along an hyperbola of equation y = n/x, with 1 <= x <= n.

When represented as a triangular array, internal zeros "0" correspond to factorizations of n.

This array appears to resemble a version of the sieve of Eratosthenes with zeros aligned.

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

It would be nice to have a larger b-file, or an a-file. - N. J. A. Sloane, Oct 13 2017

LINKS

Table of n, a(n) for n=1..81.

Luc Rousseau, The first 25 lines of the triangle array, formatted

FORMULA

From Luc Rousseau, Oct 11 2017: (Start)

(All formulas under assumption (1))

With t indexing columns, t=0 being central,

T(n, 2k) = A053186(n+k^2).

T(n, 2k+1) = A293497(n+k(k+1)).

T(n, t) = n - x*(x+t) where x = floor((-t+sqrt(t^2+4n))/2).

With A293578 viewed as a 2D array T',

T'(n,t)=T(n-1,t)-T(n,t)+1 (define T(0,0) as 0).

(End)

EXAMPLE

Array begins:

                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 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

MATHEMATICA

(* Under assumption (1) *)

A288969[n_, t_] := Module[{x},

  x = Floor[(-t + Sqrt[t^2 + 4 n])/2];

  n - x (t + x)

] (* Luc Rousseau, Oct 11 2017 *)

(* or *)

FEven[x_] := x^ 2

InvFEven[x_] := Sqrt[x]

GEven[n_] := n - FEven[Floor[InvFEven[n]]]

FOdd[x_] := x*(x + 1)

InvFOdd[x_] := (Sqrt[1 + 4 x] - 1)/2

GOdd[n_] := n - FOdd[Floor[InvFOdd[n]]]

A288969[n_, t_] := Module[

  {e, k, x},

  e = EvenQ[t];

  k = If[e, t/2, (t - 1)/2];

  x = n + If[e, FEven[k], FOdd[k]];

  If[e, GEven[x], GOdd[x]]

] (* Luc Rousseau, Oct 11 2017 *)

PROG

(Java)

package oeis;

public class B {

public static void main(String[] args) {

for (int n = 1; n <= 8; n ++) {

hyberbolaTiles(n);

}

}

private static void hyberbolaTiles(int n) {

int x = 0, y = 0, p = 0, q = n;

do {

if (p != 0) {

System.out.println(n - p * q);

}

if (y < 0) { x = y + q; q --; }

if (y > 0) { p ++; x = y - p; }

if (y == 0) {

p ++;

x = 0; System.out.println("0");

q --;

}

y = x + p - q;

} while (q > 0);

}

}

(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; ); }

tabf(nn) = for (n=1, nn, htrow(n); print()); \\ Michel Marcus, Jun 21 2017

CROSSREFS

Cf. A053186, A288966, A293497, A293578.

Sequence in context: A262709 A107628 A268389 * A305355 A218380 A152815

Adjacent sequences:  A288966 A288967 A288968 * A288970 A288971 A288972

KEYWORD

nonn,tabf

AUTHOR

Luc Rousseau, Jun 20 2017

EXTENSIONS

More terms from Michel Marcus, Jun 21 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 23 02:40 EST 2019. Contains 319365 sequences. (Running on oeis4.)