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.

Showing 1-4 of 4 results.

A166277 Inverse permutation to A161919.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 8, 9, 12, 10, 19, 13, 20, 11, 14, 15, 21, 16, 30, 22, 31, 17, 45, 32, 46, 23, 67, 33, 47, 18, 24, 25, 34, 26, 48, 35, 49, 27, 68, 50, 69, 36, 97, 51, 70, 28, 98, 71, 99, 52, 139, 72, 100, 37, 195, 101, 140, 53, 196, 73, 102, 29, 38, 39, 54, 40, 74, 55
Offset: 1

Views

Author

Antti Karttunen, Oct 12 2009

Keywords

Crossrefs

Inverse: A161919.
Cf. A166276.

A161924 Permutation of natural numbers: sequence A126441 without zeros.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 6, 11, 15, 16, 17, 10, 19, 13, 23, 31, 32, 33, 18, 35, 12, 21, 14, 39, 27, 47, 63, 64, 65, 34, 67, 20, 37, 22, 71, 25, 43, 29, 79, 55, 95, 127, 128, 129, 66, 131, 36, 69, 38, 135, 24, 41, 26, 75, 45, 30, 143, 51, 87, 59, 159, 111, 191, 255, 256
Offset: 1

Views

Author

Alford Arnold, Jun 23 2009

Keywords

Comments

Values appear in the order determined by A004760(n+1)and A062383(n).
The graph of this sequence looks very elegant.

Examples

			The table begins:
1.2.4..8.16.32.64.128.256.512.1024
..3.5..9.17.33.65.129.257.513.1025
.......6.10.18.34..66.130.258..514
....7.11.19.35.67.131.259.515.1027
............12.20..36..68.132..260
.........13.21.37..69.133.261..517
............14.22..38..70.134..262
......15.23.39.71.135.263.519.1031
...................24..40..72..136
...............25..41..73.137..265
...................26..42..74..138
............27.43..75.139.267..523
.......................28..44...76
...............29..45..77.141..269
...................30..46..78..142
.........31.47.79.143.271.527.1039
...........................48...80
.......................49..81..145
...........................50...82
...................51..83.147..275
This can be viewed as an irregular table, where row r (>= 1) has A000041(r) elements, that is, as 1; 2,3; 4,5,7; 8,9,6,11,15; 16,17,10,19,13,23,31; etc. A125106 illustrates how each number is mapped to a partition.
		

Crossrefs

Inverse: A166276. a(n) = A126441(A166274(n)). See A161919 for the version with each row sorted into ascending order.
A161511(a(n)) = A036042(n).

Programs

  • Mathematica
    columns = 9; row[n_] := n - 2^Floor[Log2[n]]; col[0] = 0; col[n_] := If[EvenQ[n], col[n/2] + DigitCount[n/2, 2, 1], col[(n - 1)/2] + 1]; Clear[T]; T[, ] = 0; Do[T[row[k], col[k]] = k, {k, 1, 2^columns}]; Table[DeleteCases[Table[T[n - 1, k], {n, 1, 2^(k - 1)}], 0], {k, 1, columns}] // Flatten (* Jean-François Alcover, Sep 09 2017 *)

Extensions

Edited and extended by Antti Karttunen, Oct 12 2009

A253564 Permutation of natural numbers: a(n) = A156552(A122111(n)).

Original entry on oeis.org

0, 1, 3, 2, 7, 5, 15, 4, 6, 11, 31, 9, 63, 23, 13, 8, 127, 10, 255, 19, 27, 47, 511, 17, 14, 95, 12, 39, 1023, 21, 2047, 16, 55, 191, 29, 18, 4095, 383, 111, 35, 8191, 43, 16383, 79, 25, 767, 32767, 33, 30, 22, 223, 159, 65535, 20, 59, 71, 447
Offset: 1

Views

Author

Antti Karttunen, Jan 03 2015

Keywords

Comments

Note the indexing.
a(n) (n>=2) can be obtained by the composition of a bijection between {2,3,4,...} and the set of integer partitions and a bijection between the set of integer partitions and {1,2,3,4,...}. Explanation on the example n=18. Write 18 = 3*3*2 = 2'*2'*1', where m' = m-th prime. Consider the partition p = (2,2,1) and let b denote the southeast border of the Ferrers board of p. Form a binary number by replacing each east step of b by 1 and each north step of b, with the exception of the last one, by 0: 1010. Its value is a(18) = 10. - Emeric Deutsch, Sep 08 2016.

Crossrefs

Programs

  • Maple
    a:= proc(n) local i, l, r; r, l:= 0, [0, sort(map(i->
          numtheory[pi](i[1])$i[2], ifactors(n)[2]))[]];
          for i to nops(l)-1 do
            r:= 2*((x-> 2*x+1)@@(l[i+1]-l[i]))(r)
          od; r/2
        end:
    seq(a(n), n=1..120);  # Alois P. Heinz, Jul 21 2017
  • Mathematica
    Table[Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[ Table[ 2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ #]] &[If[n == 1, 1, Module[{l = #, m = 0}, Times @@ Power @@@ Table[l -= m; l = DeleteCases[l, 0]; {Prime@ Length@ l, m = Min@ l}, Length@ Union@ l]] &@ Catenate[ConstantArray[PrimePi[#1], #2] & @@@ FactorInteger@ n]]], {n, 57}] (* Michael De Vlieger, Sep 08 2016, after JungHwan Min at A122111 *)
  • Scheme
    (define (A253564 n) (A156552 (A122111 n)))

Formula

a(n) = A156552(A122111(n)).
As a composition of other permutations:
a(n) = A054429(A253566(n)).

A171426 Row sum of column n in A126441 or A161924.

Original entry on oeis.org

1, 5, 16, 49, 129, 341, 833, 2029, 4760, 11068, 25182, 56888, 126661, 280169, 613893, 1337386, 2893793, 6232013, 13352607, 28497552, 60580905, 128368080, 271153740, 571224871, 1200298631, 2516483260, 5264785310, 10993631034, 22915508186, 47688470005
Offset: 1

Views

Author

Alford Arnold, Dec 12 2009

Keywords

Comments

From Emeric Deutsch, Sep 06 2017: (Start)
Row sums of the triangle A161919.
a(n) = sum of the viabin numbers of the partitions of n. The viabin number of an integer partition is defined in the following way. Consider the southeast border of the Ferrers board of the integer partition and consider the binary number obtained by replacing each east step with 1 and each north step, except the last one, with 0. The corresponding decimal form is, by definition, the viabin number of the given integer partition. "Viabin" is coined from "via binary". For example, consider the integer partition [3,1,1] of 5. The southeast border of its Ferrers board yields 10011, leading to the viabin number 19. (End)

Examples

			The values 8,9,6,11,15 map to 1111,211,22,31,4, respectively; so a(4) = 8+9+6+11+15 = 49.
		

Crossrefs

Programs

  • Maple
    with(combinat): a := proc (n) local ff, partovi: ff := proc (X) local s: s := [1, seq(0, j = 1 .. X[2])]: s := map(convert, s, string): return cat(op(s)) end proc: partovi := proc (P) local X, n, Y, i: X := convert(P, multiset): n := X[-1][1]: Y := map(proc (t) options operator, arrow: t[1] end proc, X): for i to n do if member(i, Y) = false then X := [op(X), [i, 0]] end if end do: X := sort(X, proc (s, t) options operator, arrow: evalb(s[1] < t[1]) end proc): X := map(ff, X); X := cat(op(X)): n := parse(X): n := convert(n, decimal, binary): (1/2)*n end proc: add(partovi(partition(n)[j]), j = 1 .. numbpart(n)) end proc: seq(a(n), n = 1 .. 27); # the subprogram partovi (due to W. Edwin Clark) yields the viabin number of a given partition. # Emeric Deutsch, Sep 06 2017
    # second Maple program:
    b:= proc(n, i, l, r) option remember; `if`(n=0, r, `if`(i>n, 0,
          b(n, i+1, l, r)+b(n-i, i$2, ((x-> 2*x+1)@@(i-l))(2*r))))
        end:
    a:= n-> b(n, 1, 0$2):
    seq(a(n), n=1..30);  # Alois P. Heinz, Mar 01 2021
  • Mathematica
    b[n_, i_, l_, r_] := b[n, i, l, r] = If[n == 0, r, If[i>n, 0,
         b[n, i+1, l, r] + b[n-i, i, i, Nest[2#+1&, 2r, i-l]]]];
    a[n_] := b[n, 1, 0, 0];
    Array[a, 30] (* Jean-François Alcover, Mar 02 2021, after Alois P. Heinz *)

Extensions

Ninth term corrected by Alford Arnold, Jan 22 2010
Offset changed to 1 and a(17)-a(27) from Emeric Deutsch, Sep 06 2017
a(28)-a(30) from Alois P. Heinz, Sep 07 2017
Showing 1-4 of 4 results.