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.
%I A366412 #92 Dec 31 2023 00:56:07 %S A366412 0,0,1,0,5,0,2,2,8,0,12,0,9,13,7,0,16,0,13,19,15,0,17,6,14,6,24,0,46, %T A366412 0,4,18,21,15,48,0,14,18,35,0,56,0,17,36,32,0,28,10,35,33,29,0,32,31, %U A366412 46,33,28,0,79,0,21,31,21,25,114,0,17,30,109,0,36,0,16,40,48,28,132 %N A366412 Number of nontrivial solutions to the P^*_k problem in base n. %C A366412 For a given fixed base, the number [a_1 a_2 ... a_(2*k+1)] is said to satisfy the property P_k^* if [a_1 ... a_k]*[a_(k+1) ... a_(2*k+1)] = [a_1 ... a_(k+1)]*[a_(k+2) ... a_(2*k+1)], where [...] is to be interpreted as a block of digits. %C A366412 The property P^*_k is a subcase of a mathematically inaccurate method where cancelling the common digits of the numerator and denominator correctly reduces it (usually known as anomalous cancellation). This sequence deals only with those anomalously cancellable fractions where there are equal numbers of digits in the numerator and denominator, and the last digit of the numerator is cancelled with the first digit of the denominator. %C A366412 This is also equivalent to solving the Diophantine equation (a*B + b)*c = a*(b*B^k + c) with 0 < b < B and 0 < a,c < B^k. %C A366412 All the solutions of a(p^n) where p^n is a prime power are three-digit solutions (proved in the paper by Saha et al.). For example, see Example section. %C A366412 For a given base B, the number of solutions of P_k^* become constant beyond k=max{5, 2*log_2(B - 1) + 2} (proved in the paper by Saha et al.). %C A366412 If [a_1 ... a_k b c_1 ... c_k] is a solution, then so is [a_1 ... a_k b b b c_1 ... c_k]. The latter is called an extension of the former, and is counted as a trivial solution. See Proposition 1 of Saha et al. link. %C A366412 A solution is always of the form [a_1 ... a_k b...b c_k] (see Theorem 2 in the paper by Saha et al.). %C A366412 It has been conjectured that for a given composite base B, if there are no new nontrivial solutions (except for extensions) in (2k + 1) digits, then there would be no new solutions in (2k + 3) digits (see Saha et al. link). %H A366412 R. P. Boas, <a href="https://www.jstor.org/stable/3026913">Anomalous Cancellation</a>, The Two-Year College Mathematics Journal, Vol. 3, No. 2 (Autumn, 1972), pp. 21-24. %H A366412 Shalosh B. Ekhad, <a href="https://arxiv.org/abs/1709.03379">Automated Generation of Anomalous Cancellations</a>, arXiv:1709.03379 [math.HO], 2017. %H A366412 Satvik Saha, Sohom Gupta, Sayan Dutta, and Sourin Chatterjee, <a href="https://arxiv.org/abs/2302.00479">Characterising Solutions of Anomalous Cancellation</a>, arXiv:2302.00479 [math.HO], 2023. %F A366412 a(p) = 0 if and only if p is a prime (see Theorem 3 of Saha et al. link). %F A366412 a(n) <= (n-2)*(n-3)/2 (see Proposition 4 of Saha et al. link). %e A366412 For n = 10, the a(10) = 8 solutions correspond to 16/64 = 1/4, 26/65 = 2/5, 19/95 = 1/5, 49/98 = 4/8, 217/775 = 21/75, 249/996 = 24/96, 1249/9992 = 124/992 and 34027/77776 = 3402/7776. %e A366412 For n = 9 = 3^2, the only two solutions are 14/43 and 28/86. %o A366412 (Python) %o A366412 import math %o A366412 LEN = 79 %o A366412 carr=[] %o A366412 for base in range(2, LEN): %o A366412 k = int(2 * math.log(base - 1) / math.log(2) + 2) + 1 %o A366412 k = max(k, 5) %o A366412 I = (base ** k - 1) // (base - 1) - 1 %o A366412 count = 0 %o A366412 for b in range(2, base): %o A366412 for c_k in range(1, b): %o A366412 c = b * I + c_k %o A366412 a = b * c // (b * base - (base - 1) * c_k) %o A366412 if a < base ** (k - 1): %o A366412 continue %o A366412 if (a * base + b) * c == a * (b * base**k + c): %o A366412 count += 1 %o A366412 carr.append(count) %o A366412 print(carr) %Y A366412 Cf. A159975/A159976, A291093/A291094, A291965/A291966. %K A366412 nonn,base %O A366412 2,5 %A A366412 _Sayan Dutta_, Oct 09 2023