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.

A118011 Complement of the Connell sequence (A001614); a(n) = 4*n - A001614(n).

This page as a plain text file.
%I A118011 #36 Oct 19 2024 22:06:13
%S A118011 3,6,8,11,13,15,18,20,22,24,27,29,31,33,35,38,40,42,44,46,48,51,53,55,
%T A118011 57,59,61,63,66,68,70,72,74,76,78,80,83,85,87,89,91,93,95,97,99,102,
%U A118011 104,106,108,110,112,114,116,118,120,123,125,127,129,131,133,135,137,139
%N A118011 Complement of the Connell sequence (A001614); a(n) = 4*n - A001614(n).
%C A118011 a(n) is the position of the second appearance of n in A117384, where A117384(m) = A117384(k) and k = 4*A117384(m) - m. The Connell sequence (A001614) is generated as: 1 odd, 2 even, 3 odd, ...
%F A118011 A001614(n) = A118012(a(n)).
%F A118011 a(n) = 2n+[(1+sqrt(8n-7))/2]. - _Juri-Stepan Gerasimov_ Aug 25 2009
%F A118011 a(n) = 2*n+round(sqrt(2*n)). - _Gerald Hillier_, Apr 16 2015
%F A118011 From _Robert Israel_, Apr 20 2015 (Start):
%F A118011 a(n) = 2*n + 1 + Sum_{j=0..n-2} A023531(j).
%F A118011 G.f.: 2*x/(1-x)^2 + x/(1-x) * Sum_{j=0..oo} x^(j*(j+1)/2) = 2*x/(1-x)^2 + x^(7/8)/(2-2*x) * Theta2(0,sqrt(x)), where Theta2 is a Jacobi theta function. (End)
%F A118011 a(n) = n+A014132(n). - _Chai Wah Wu_, Oct 19 2024
%t A118011 Table[2 n + Round[Sqrt[2 n]], {n, 70}] (* _Vincenzo Librandi_, Apr 16 2015 *)
%o A118011 (Magma) [2*n+Round(Sqrt(2*n)): n in [1..70]]; // _Vincenzo Librandi_, Apr 16 2015
%o A118011 (Python)
%o A118011 from math import isqrt
%o A118011 def A118011(n): return (m:=n<<1)+(k:=isqrt(m))+int((m<<2)>(k<<2)*(k+1)+1) # _Chai Wah Wu_, Jul 26 2022
%Y A118011 Cf. A001614, A014132, A023531, A117384, A118012.
%Y A118011 A171152 gives partial sums.
%K A118011 nonn
%O A118011 1,1
%A A118011 _Paul D. Hanna_, Apr 10 2006