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.

A209268 Inverse permutation A054582.

This page as a plain text file.
%I A209268 #33 Feb 16 2025 08:33:16
%S A209268 1,2,3,4,6,5,10,7,15,9,21,8,28,14,36,11,45,20,55,13,66,27,78,12,91,35,
%T A209268 105,19,120,44,136,16,153,54,171,26,190,65,210,18,231,77,253,34,276,
%U A209268 90,300,17,325,104,351,43,378,119,406,25,435,135,465,53,496,152
%N A209268 Inverse permutation  A054582.
%C A209268 Permutation of the natural numbers.
%C A209268 a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
%H A209268 Boris Putievskiy, <a href="/A209268/b209268.txt">Table of n, a(n) for n = 1..10000</a>
%H A209268 Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations [of] Integer Sequences And Pairing Functions</a>, arXiv:1212.2732 [math.CO], 2012.
%H A209268 R. J. Mathar, <a href="http://oeis.org/wiki/User:R._J._Mathar/oeisPy/oeisPy/oeis_bulk.py">oeisPy</a>
%H A209268 Eric W. Weisstein, <a href="https://mathworld.wolfram.com/PairingFunction.html">MathWorld: Pairing functions</a>
%H A209268 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A209268 a(n) = (((A003602)+A007814(n))^2 - A007814(n) + A003602(n))/2.
%F A209268 a(n) = ((x+y)^2-x+y)/2, where x = max {k: 2^k | n}, y = (n+2^x)/2^(x+1).
%e A209268 The start of the sequence for n = 1..32 as table, distributed by exponent of highest power of 2 dividing n:
%e A209268    |   Exponent of highest power of 2 dividing n
%e A209268 n  |--------------------------------------------------
%e A209268    |    0      1      2       3      4         5    ...
%e A209268 ------------------------------------------------------
%e A209268 1  |....1
%e A209268 2  |...........2
%e A209268 3  |....3
%e A209268 4  |..................4
%e A209268 5  |....6
%e A209268 6  |...........5
%e A209268 7  |...10
%e A209268 8  |..........................7
%e A209268 9  |...15
%e A209268 10 |...........9
%e A209268 11 |...21
%e A209268 12 |..................8
%e A209268 13 |...28
%e A209268 14 |..........14
%e A209268 15 |...36
%e A209268 16 |................................11
%e A209268 17 |...45
%e A209268 18 |..........20
%e A209268 19 |...55
%e A209268 20 |.................13
%e A209268 21 |...66
%e A209268 22 |..........27
%e A209268 23 |...78
%e A209268 24 |................................12
%e A209268 25 |...91
%e A209268 26 |..........35
%e A209268 27 |..105
%e A209268 28 |.................19
%e A209268 29 |..120
%e A209268 30 |..........44
%e A209268 31 |..136
%e A209268 32 |.........................................16
%e A209268 . . .
%e A209268 Let r_c be number row inside the column number c.
%e A209268 r_c = (n+2^c)/2^(c+1).
%e A209268 The column number 0 contains numbers r_0*(r_0+1)/2,     A000217,
%e A209268 The column number 1 contains numbers r_1*(r_1+3)/2,     A000096,
%e A209268 The column number 2 contains numbers r_2*(r_2+5)/2 + 1, A034856,
%e A209268 The column number 3 contains numbers r_3*(r_3+7)/2 + 3, A055998,
%e A209268 The column number 4 contains numbers r_4*(r_4+9)/2 + 6, A046691.
%t A209268 a[n_] := (v = IntegerExponent[n, 2]; (1/2)*(((1/2)*(n/2^v + 1) + v)^2 + (1/2)*(n/2^v + 1) - v)); Table[a[n], {n, 1, 55}] (* _Jean-François Alcover_, Jan 15 2013, from 1st formula *)
%o A209268 (Python)
%o A209268 f = open("result.csv", "w")
%o A209268 def A007814(n):
%o A209268 ### author        Richard J. Mathar 2010-09-06 (Start)
%o A209268 ### http://oeis.org/wiki/User:R._J._Mathar/oeisPy/oeisPy/oeis_bulk.py
%o A209268         a = 0
%o A209268         nshft = n
%o A209268         while (nshft %2 == 0):
%o A209268                 a += 1
%o A209268                 nshft >>= 1
%o A209268         return a
%o A209268 ###(End)
%o A209268 for  n in range(1,10001):
%o A209268      x = A007814(n)
%o A209268      y = (n+2**x)/2**(x+1)
%o A209268      m = ((x+y)**2-x+y)/2
%o A209268      f.write('%d;%d;%d;%d;\n' % (n, x, y, m))
%o A209268 f.close()
%Y A209268 Cf. A054582, A003602, A007814, A000217, A000096, A034856, A055998, A046691, A014132.
%K A209268 nonn
%O A209268 1,2
%A A209268 _Boris Putievskiy_, Jan 15 2013