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.

A060736 Array of square numbers read by antidiagonals in up direction.

This page as a plain text file.
%I A060736 #25 Feb 16 2025 08:32:44
%S A060736 1,2,4,5,3,9,10,6,8,16,17,11,7,15,25,26,18,12,14,24,36,37,27,19,13,23,
%T A060736 35,49,50,38,28,20,22,34,48,64,65,51,39,29,21,33,47,63,81,82,66,52,40,
%U A060736 30,32,46,62,80,100
%N A060736 Array of square numbers read by antidiagonals in up direction.
%C A060736 A simple permutation of natural numbers.
%C A060736 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. - _Boris Putievskiy_, Jan 09 2013
%H A060736 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 A060736 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing functions</a>
%H A060736 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A060736 T(n+1, k)=n*n+k, T(k, n+1)=(n+1)*(n+1)+1-k, 1 <= k <= n+1.
%F A060736 a(n)=i^2-j+1 if i >= j, a(n)=(j-1)^2 + i if i <  j, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). - _Boris Putievskiy_, Jan 09 2013
%e A060736 1 4 9 16 .. => a(1)= 1
%e A060736 2 3 8 15 .. => a(2)= 2, a(3)=4
%e A060736 5 6 7 14 .. => a(4)= 5, a(5)=3, a(6)=9
%e A060736 10 11 12 13 .. => a(7)=10, a(8)=6, a(9)=8, a(10)=16
%t A060736 Table[ If[n < 2*k-1, k^2 + k - n, (n-k)^2 + k], {n, 1, 10}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Jan 09 2013 *)
%o A060736 (Python)
%o A060736 t=int((math.sqrt(8*n-7) - 1)/ 2)
%o A060736 i=n-t*(t+1)/2
%o A060736 j=(t*t+3*t+4)/2-n
%o A060736 if i>=j:
%o A060736    result=i**2-j+1
%o A060736 else:
%o A060736    result=(j-1)**2+i
%o A060736 # _Boris Putievskiy_, Jan 09 2013
%Y A060736 Cf. A060734. Inverse permutation: A064788, the first inverse function (numbers of rows) A194258, the second inverse function (numbers of columns) A194195.
%K A060736 nonn,tabl
%O A060736 1,2
%A A060736 _Frank Ellermann_, Apr 23 2001