A259981 Let b be the n-th composite number, A002808(n); a(n) is number of base-b digits x,y,z such that (xb+y)/(zb+x)=y/z.
1, 2, 2, 2, 4, 4, 2, 6, 7, 4, 4, 10, 6, 6, 6, 4, 6, 10, 6, 4, 8, 6, 6, 21, 2, 6, 18, 6, 4, 18, 10, 8, 10, 10, 12, 12, 6, 16, 22, 14, 6, 10, 2, 12, 21, 12, 20, 4, 10, 22, 10, 2, 12, 20, 14, 24, 8, 24, 8, 10, 28, 6, 6, 18, 10, 28, 16, 10, 6, 6, 30, 4, 24, 37, 6, 6, 46, 14, 10, 6, 18, 24, 6, 18
Offset: 1
Keywords
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
Programs
-
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 *)
-
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
Extensions
Typo in a(61) corrected by Chai Wah Wu, Jul 15 2015
Comments