OFFSET
1,2
COMMENTS
The provided "HyperbolaTiles" algorithm computes a factorization of n and computes a(n), the number of required iterations to reach this factorization.
If n = 1, the factorization is considered reached with (n=1*1).
If n is prime, the factorization is considered reached with (n=n*1).
If n is composite, the exhibited factorization is (n=p*q) with p least prime divisor of n.
LINKS
FORMULA
PROG
(Java)
package oeis;
public class A {
public static void main(String[] args) {
for (int n = 1; n <= 67; n ++) { hyberbolaTiles(n); }
}
private static void hyberbolaTiles(int n) {
int i = 0, x = 0, y = 0, p = 0, q = n;
do {
i ++;
if (y < 0) { x = y + q; q --; }
if (y > 0) { p ++; x = y - p; }
if (y == 0) {
p ++;
x = 0;
if ((p != 1) || (q == 1)) {
System.out.print("" + i + " // " + n + " = " + p + " * " + q);
break;
}
q --;
}
y = x + p - q;
} while (q > 0);
}
}
CROSSREFS
KEYWORD
nonn
AUTHOR
Luc Rousseau, Jun 20 2017
STATUS
approved