OFFSET
1,2
COMMENTS
R. P. Boas writes (slightly edited): The problem originated in the rather silly observation that 64/16 = 4/1 ("cancel" the 6's). I once asked what happens in base b, i.e., when is (xb+y)/(zb+x) = y/z? There are no nontrivial instances of the cancellation phenomenon when b is prime, so we restrict b to A002808; the sequence gives the number of instances of the phenomenon for each composite b. When b-1 is prime the only instances have x=b-1 and the number of them is the number of proper divisors of b (see A144925). A259983 is the subsequence of this sequence corresponding to bases b in A005381.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..1000
R. P. Boas & N. J. A. Sloane, Correspondence, 1974
Eric Weisstein's World of Mathematics, Anomalous Cancellation
MATHEMATICA
Table[Count[Flatten[Table[(x b + y) z == y (z b + x), {x, b}, {y, b}, {z, y - 1}], 2], True], {b, Select[Range[115], CompositeQ]}] (* Eric W. Weisstein, Oct 16 2015 *)
PROG
(Python)
from sympy import primepi
def A002808(n):
....m = n
....while m != primepi(m) + 1 + n:
........m += 1
....return m
def A259981(n):
....b, c = A002808(n), 0
....for x in range(1, b):
........for y in range(1, b):
............if x != y:
................w = b*(x-y)
................for z in range(1, b):
....................if x != z:
........................if z*w == y*(x-z):
............................c += 1
....return c # Chai Wah Wu, Jul 15 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 12 2015, following a suggestion from R. P. Boas, May 19 1974
EXTENSIONS
Typo in a(61) corrected by Chai Wah Wu, Jul 15 2015
STATUS
approved