cp's OEIS Frontend

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.

A383188 Irregular table, read by rows, where row z = 2, 3, 4, ... lists pairs (y, x) such that x + y/z = concat(y, x)/z with 0 < y < z, gcd(y, z) = 1, and primitive x, cf. comments.

This page as a plain text file.
%I A383188 #14 May 16 2025 18:11:43
%S A383188 1,9,2,9,1,3,3,9,4,9,5,9,2,3,4,6,6,9,1,142857,3,428571,5,714285,7,9,8,
%T A383188 9,3,3,7,7,9,9,10,9,5,45,7,63,11,9,4,3,8,6,12,9,3,230769,5,384615,7,
%U A383188 538461,11,846153,13,9,2,142857,4,285714,8,571428,14,9,5,3,15,9,16,9,5,2941176470588235,7,4117647058823529,11,6470588235294117,13,7647058823529411,17,9,2,1,4,2,6,3,8,4,10,5,12,6,14,7,16,8,18,9
%N A383188 Irregular table, read by rows, where row z = 2, 3, 4, ... lists pairs (y, x) such that x + y/z = concat(y, x)/z with 0 < y < z, gcd(y, z) = 1, and primitive x, cf. comments.
%C A383188 The numbers x + y/z = concat(y,x) / z have been called "Harry Potter numbers" by Romy Aran, cf. link to SeqFan post.
%C A383188 concat(y, x) := y*10^Lx + x, with Lx = floor(log_10(x))+1 = A055642(x) = number of decimal digits of x.
%C A383188 For any solution (x, y, z), any triple (x*{k}, y, z) is again a solution, where x*{k} = concat(x*{k-1}, x), x*{1} = x. Therefore we consider only "primitive" x, which are not of this form with some k > 1.
%C A383188 For any z there is the solution (x, y, z) = (9, z-1, z), which is usually listed last in each row, so the '9's preceded by y = z-1 are convenient "end-of-line" markers for reading the flattened sequence as a table.
%H A383188 Romy Aran, <a href="https://groups.google.com/d/msgid/seqfan/CAEQRRze9B_Q6fpzaqTQYa1hhrT2WcbskuYtSuHPvMkYHfsMZzA%40mail.gmail.com">Harry Potter numbers</a>, post to the SeqFan google group, May 1, 2025.
%e A383188 For any z > 1, we have the solution (x, y) = (9, z-1), and well as non-primitive x = 99, 999, ... (not listed in the table), for example:
%e A383188 z = 2, y = 1: 9 + 1/2 = 19/2, and 99 + 1/2 = 199/2, 999 + 1/2 = 1999/2, ...
%e A383188 z = 3, y = 2: 9 + 2/3 = 29/3, and 99 + 2/3 = 299/3, 999 + 2/3 = 2999/3, ...
%e A383188 z = 4, y = 3: 9 + 3/4 = 39/4, and 99 + 3/4 = 399/4, 999 + 3/4 = 3999/4, ...
%e A383188 But in row z = 4 we first list the solution y = 1, x = 3, viz: 3 + 1/4 = 13/4 (and 3...3 + 1/4 = 13...3 / 4).
%e A383188 In row z = 7 we first list the solution y = 2, x = 3, viz: 3...3 + 2/7 = 23...3 / 7, then y = 4, x = 6, viz: 6...6 + 4/7 = 46...6 / 7.
%e A383188 In row 8, we have the solutions 142857...142857 + 1/8 = 1142857...142857 / 8, 428571...428571 + 3/8 = 3428571...428571 / 8, 714285...714285 + 5/8 = 5714285...714285 / 8, 9...9 + 7/8 = 79...9 / 8.
%e A383188 The table starts:
%e A383188    z  |  pairs (y, x) (= sequence data)
%e A383188 ------+--------------------------------
%e A383188    2  |  1, 9
%e A383188    3  |  2, 9
%e A383188    4  |  1, 3; 3, 9   (representing 3...3 + 1/4, and 9...9 + 3/4)
%e A383188    5  |  4, 9
%e A383188    6  |  5, 9
%e A383188    7  |  2, 3; 4, 6; 6, 9
%e A383188    8  |  1, 142857; 3, 428571; 5, 714285; 7, 9
%e A383188    9  |  8, 9
%e A383188   10  |  3, 3; 7, 7; 9, 9   (representing 3...3 + 3/10 = 33...3 / 10, etc.)
%e A383188   11  |  10, 9              (representing 9...9 + 10/11 = 109...9 / 11)
%e A383188   12  |  5, 45; 7, 63; 11, 9   (e.g., 63...63 + 7/12 = 763...63 / 12, etc.)
%e A383188   13  |  4, 3; 8, 6; 12, 9
%e A383188   14  |  3, 230769; 5, 384615; 7, 538461; 11, 846153; 13, 9
%e A383188   15  |  2, 142857; 4, 285714; 8, 571428; 14, 9
%e A383188   16  |  5, 3; 15, 9
%e A383188   17  |  16, 9
%e A383188   18  |  5, 2941176470588235; 7, 4117647058823529; 11, 6470588235294117;
%e A383188       |  13, 7647058823529411; 17, 9
%e A383188   19  |  2, 1; 4, 2; 6, 3; 8, 4; 10, 5; 12, 6; 14, 7; 16, 8; 18, 9
%o A383188 (PARI) /* brute-force search, for illustration */
%o A383188 row(z, L=99, S=[]) = { for ( y = max(1, (z-1)\10+1), z-1, gcd(y, z) > 1 && next;
%o A383188    my ( zz = Mod(10,z-1) ); for ( Lx = 1, L, y*(zz^Lx-1) && next;
%o A383188    my ( x = y*(10^Lx-1)/(z-1) ); logint(x, 10)+1 == Lx || next;
%o A383188    foreach ( S, xx, x%xx[2] && next;
%o A383188       x\xx[2] == 10^Lx\(10^(logint(xx[2], 10)+1)-1) && next(2));
%o A383188    S = concat(S,[[y, x]]) )/*for Lx*/ )/*for y*/; concat(S) }
%Y A383188 Cf. A036275 and A060284 (periodic part of the decimal expansion of 1/n).
%K A383188 nonn
%O A383188 2,2
%A A383188 _M. F. Hasler_, May 03 2025