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.

A028392 a(n) = n + floor(sqrt(n)).

This page as a plain text file.
%I A028392 #40 May 16 2023 17:28:43
%S A028392 0,2,3,4,6,7,8,9,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,
%T A028392 30,31,32,33,34,35,36,37,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,
%U A028392 54,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,74,75,76,77,78,79
%N A028392 a(n) = n + floor(sqrt(n)).
%C A028392 A171746 gives number of iterations to reach a square. - _Reinhard Zumkeller_, Oct 14 2010
%C A028392 From _Carmine Suriano_, Oct 15 2010: (Start)
%C A028392 Also the sequence of integers left after performing the following procedure:
%C A028392 1. Remove the element at 1st position (1) and compact the sequence;
%C A028392 2. Remove the element at 4th (2^2-th) position (5) and compact the sequence;
%C A028392 3. Remove the element at 9th (3^2-th) position (11) and compact the sequence;
%C A028392 ....
%C A028392 n. Remove the element at (n-square)th position (n^2 + n - 1) and compact the sequence;
%C A028392 (End)
%H A028392 Reinhard Zumkeller, <a href="/A028392/b028392.txt">Table of n, a(n) for n = 0..10000</a>
%H A028392 L. F. Klosinski, G. L. Alexanderson and A. P. Hillman, <a href="https://www.jstor.org/stable/2322570">The William Lowell Putnam Mathematical Competition: Problem B4</a>, Amer. Math. Monthly 91 (1984), 487-495.
%F A028392 a(n) = 2*n - A028391(n).
%F A028392 G.f.: x / (1 - x)^2 + (theta3(x) - 1) / (2 * (1 - x)). - _Michael Somos_, Mar 24 2012
%e A028392 G.f. = 2*x + 3*x^2 + 4*x^3 + 6*x^4 + 7*x^5 + 8*x^6 + 9*x^7 + 10*x^8 + 12*x^9 + ...
%t A028392 Table[n + Floor[Sqrt[n]], {n, 0, 99}] (* _Vladimir Joseph Stephan Orlovsky_, Mar 29 2010 *)
%o A028392 (PARI) {a(n) = if( n<0, 0, n + sqrtint(n))}; /* _Michael Somos_, Jun 11 2003 */
%o A028392 (Haskell)
%o A028392 a028392 n = n + a000196 n  -- _Reinhard Zumkeller_, Oct 28 2012
%o A028392 (Scala) (0 to 99).map(n => (n + Math.floor(Math.sqrt(n))).toInt) // _Alonso del Arte_, Nov 03 2019
%o A028392 (Python)
%o A028392 from math import isqrt
%o A028392 def A028392(n): return n+isqrt(n) # _Chai Wah Wu_, May 16 2023
%Y A028392 Complement of A028387.
%Y A028392 Cf. A000196. - _Reinhard Zumkeller_, Oct 14 2010
%K A028392 nonn,easy
%O A028392 0,2
%A A028392 _N. J. A. Sloane_