A307544 Irregular triangle read by rows: T(n,k) = A087207(A307540(n,k)).
0, 1, 3, 2, 7, 5, 6, 4, 15, 11, 13, 9, 14, 10, 12, 8, 31, 23, 27, 19, 29, 21, 25, 30, 17, 22, 26, 18, 28, 20, 24, 16, 63, 47, 55, 59, 39, 43, 51, 61, 35, 45, 53, 57, 37, 62, 41, 49, 46, 54, 33, 58, 38, 42, 50, 60, 34, 44, 52, 56, 36, 40, 48, 32, 127, 95, 111, 119
Offset: 0
Examples
First terms of this sequence appear bottom to top in the chart below. The values of n appear in the header, values m = T(n,k) followed parenthetically by phi(m)/m appear in column n. In square brackets, we write the multiplicities of primes in positional order with the smallest prime at right (big-endian). The x axis plots k according to primepi(gpf(m)), while the y axis plots k according to phi(m)/m: 0 1 2 3 4 . . . . . --- 1 ------------------------------------------------ (1/1) . . . . [0] . . . . . . . . . . . . . 7 . . . 5 (6/7) . . . (4/5) [1000] . . . [100] . . . . . 35 . . 3 . (24/35) . . (2/3) . [1100] . . [10] . . . . . . . . . . . 21 . . . . (4/7) . . . 15 [1010] . . . (8/15) . . 2 . [110] . . (1/2) . . . . [1] . . 105 . . . . (16/35) . . . . [1110] . . . . 14 . . . 10 (3/7) . . . (2/5) [1001] . . . [101] . . . . . 70 . . 6 . (12/35) . . (1/3) . [1101] . . [11] . 42 . . . 30 (2/7) . . . (4/15) [1011] . . . [111] 210 . . . . (8/35) . . . . [1111] ... a(1) = 0 since T(0,1) = 1 = empty product. a(2) = 1 since T(1,1) = 2 = 2^1 -> binary "1" = decimal 1. a(3) = 3 since T(2,1) = 6 = 2^1 * 3^1 -> binary "11" = decimal 3. a(4) = 2 since T(2,2) = 3 = 2^0 * 3^1 -> binary "10" = decimal 2. a(5) = 7 since T(3,1) = 30 = 2^1 * 3^1 * 5^1 -> binary "111" = decimal 7, etc. Graph of first 32 terms: (Start) x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x (End) From _Antti Karttunen_, Jan 10 2020: (Start) Arranged as a binary tree: 0 | ...................1................... 3 2 7......../ \........5 6......../ \........4 / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ 15 11 13 9 14 10 12 8 31 23 27 19 29 21 25 30 17 22 26 18 28 20 24 16 etc. (End)
Links
- Antti Karttunen, Table of n, a(n) for n = 0..16383
- Michael De Vlieger, Plot comparing A059894 and A307544.
- Antti Karttunen, Data supplement: n, a(n) computed for n = 0..65535 (including terms 0..16384 previously computed by Michael De Vlieger)
- Index entries for sequences related to binary expansion of n
- Index entries for sequences that are permutations of the natural numbers
Crossrefs
Programs
-
Mathematica
Prepend[Array[SortBy[#, Last] &@ Map[{#2, EulerPhi[#1]/#1} & @@ {Times @@ MapIndexed[Prime[First@ #2]^#1 &, Reverse@ #], FromDigits[#, 2]} &, Map[Prepend[Reverse@ #, 1] &, Tuples[{1, 0}, # - 1]]] &, 7], {{0, 0, 1}}][[All, All, 1]] // Flatten
-
PARI
up_to = 1023; rat(n) = { my(m=1, p=2); while(n, if(n%2, m *= (p-1)/p); n >>= 1; p = nextprime(1+p)); (m); }; cmpA307544(a,b) = if(!a,sign(-b),if(!b,sign(a), my(as=logint(a,2), bs=logint(b,2)); if(as!=bs, sign(as-bs), sign(rat(a)-rat(b))))); A307544list(up_to) = vecsort(vector(1+up_to,n,n-1), cmpA307544); v307544 = A307544list(up_to); A307544(n) = v307544[1+n]; \\ Antti Karttunen, Jan 10 2020
Comments