A355090 Square array A(n, k), n >= 0, k > 0, read by antidiagonals upwards; A(n, k) is the unique m such that n/k = fusc(m)/fusc(m+1) (where fusc is Stern's diatomic series A002487).
0, 1, 0, 3, 2, 0, 7, 1, 4, 0, 15, 5, 6, 8, 0, 31, 3, 1, 2, 16, 0, 63, 11, 9, 14, 12, 32, 0, 127, 7, 13, 1, 10, 4, 64, 0, 255, 23, 3, 17, 30, 2, 24, 128, 0, 511, 15, 19, 5, 1, 6, 28, 8, 256, 0, 1023, 47, 27, 29, 33, 62, 18, 20, 48, 512, 0, 2047, 31, 7, 3, 25, 1, 22, 2, 4, 16, 1024, 0
Offset: 0
Examples
Square array A(n, k) begins: n\k| 1 2 3 4 5 6 7 8 9 10 11 12 ---+----------------------------------------------------------------- 0| 0 0 0 0 0 0 0 0 0 0 0 0 1| 1 2 4 8 16 32 64 128 256 512 1024 2048 2| 3 1 6 2 12 4 24 8 48 16 96 32 3| 7 5 1 14 10 2 28 20 4 56 40 8 4| 15 3 9 1 30 6 18 2 60 12 36 4 5| 31 11 13 17 1 62 22 26 34 2 124 44 6| 63 7 3 5 33 1 126 14 6 10 66 2 7| 127 23 19 29 25 65 1 254 46 38 58 50 8| 255 15 27 3 21 9 129 1 510 30 54 6 9| 511 47 7 35 61 5 49 257 1 1022 94 14 10| 1023 31 39 11 3 13 57 17 513 1 2046 62 11| 2047 95 55 59 67 125 37 41 97 1025 1 4094 12| 4095 63 15 7 51 3 45 5 9 33 2049 1
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10152
- Wikipedia, Calkin-Wilf tree
- Index entries for sequences related to Stern's sequences
Programs
-
PARI
A(x,y) = { if (x==0, 0, my (v=0,t=1,a=0,b=1,c=1,d=0); while (1, my (m=a+c, n=b+d); if (x*n==y*m, return (t+v), x*n
Comments