login
Inverse to A256997 considered as a permutation of natural numbers, with the assumed fixed term a(1) = 1.
4

%I #8 Apr 19 2015 00:54:23

%S 1,2,4,7,3,5,11,6,8,9,16,12,17,23,10,13,30,14,22,38,47,18,24,57,31,15,

%T 68,80,93,107,19,39,122,20,29,138,155,48,58,173,25,32,192,212,233,69,

%U 40,255,21,81,278,302,94,108,327,123,26,353,380,408,437,467,49,139,498,27,37,530,563,156,174,597,59,70,632,668,705,193,33,743,41

%N Inverse to A256997 considered as a permutation of natural numbers, with the assumed fixed term a(1) = 1.

%H Antti Karttunen, <a href="/A256998/b256998.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F a(1) = 1, and for n > 1: a(n) = (1/2) * ((c+r)^2 - r - 3*c + 4), where r = A256989(n), and c = A256990(n).

%o (Scheme) (define (A256998 n) (if (= 1 n) n (let ((row (A256989 n)) (col (A256990 n))) (+ 1 (* (/ 1 2) (- (expt (+ row col) 2) row col col col -2))))))

%Y Inverse: A256997.

%Y Cf. A256989, A256990.

%Y Cf. also A256996, A255558.

%K nonn

%O 1,2

%A _Antti Karttunen_, Apr 14 2015