login
a(n) = Least i in range [A165478(n),A165478(n+1)] for which abs(A165477(i)) gets the maximum value in that range.
5

%I #2 Mar 31 2012 13:21:19

%S 43690,131070,174761,262141,305832,393212,436903,524283,567974,655354,

%T 699045,786425,830116,917496,961187,1048567,1092258,1179638,1223329,

%U 1310709,1354400,1441780,1485471,1572851,1616542,1703922

%N a(n) = Least i in range [A165478(n),A165478(n+1)] for which abs(A165477(i)) gets the maximum value in that range.

%C The corresponding maximum values are 570,0,570,0,570,0,570,0,570,0,570,0,570,0,570,0,570,0,... (period 2 sequence). Note that also A165477(87380) = 570 (as 131071 is 4k+3 prime), and A165477(65535) = 285 = 570/2.

%F a(n) = floor(n/2)*131071 + (1+2*(n modulo 2))*43690

%o (MIT Scheme:) (define (A165479 n) (+ (* (floor->exact (/ n 2)) 131071) (* (+ 1 (* 2 (modulo n 2))) 43690)))

%K nonn

%O 0,1

%A _Antti Karttunen_, Sep 21 2009