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.

A094761 a(n) = n + (square excess of n).

This page as a plain text file.
%I A094761 #20 Jul 25 2015 03:45:33
%S A094761 0,1,3,5,4,6,8,10,12,9,11,13,15,17,19,21,16,18,20,22,24,26,28,30,32,
%T A094761 25,27,29,31,33,35,37,39,41,43,45,36,38,40,42,44,46,48,50,52,54,56,58,
%U A094761 60,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,64,66,68,70,72,74,76,78
%N A094761 a(n) = n + (square excess of n).
%C A094761 The trajectory of n under iteration of m -> a(m) is eventually constant iff n is a perfect square.
%C A094761 Conjecture (verified up to 727): the numbers not in this sequence are those of A008865. - _R. J. Mathar_, Jan 23 2009
%C A094761 From _Maon Wenders_, Jul 01 2012: (Start)
%C A094761 Proof of conjecture:
%C A094761 (1) (n+2)^2 - n^2 = n^2 + 4n + 4 - n^2 = 4n + 4
%C A094761 (2) (n+1)^2 - n^2 = n^2 + 2n + 1 - n^2 = 2n + 1
%C A094761 (3) (n+1) + square excess of (n+1) - (n + square excess of n) = 2, except when (n+1) is a square, where a(n) collapses back to (n+1)
%C A094761 (4) so, cause of (2) and (3), the sequence has blocks of even and odd numbers starting with an even or odd square, m^2 and of length 2m+1:
%C A094761     0,
%C A094761     1, 3, 5,
%C A094761     4, 6, 8, 10, 12,
%C A094761     9, 11, 13, 15, 17, 19, 21,
%C A094761     16, 18, 20, 22, 24, 26, 28, 30, 32,
%C A094761     ...
%C A094761 (5) such a block of 2m+1 numbers fills in all even or odd numbers between
%C A094761     n^2 and (n+2)^2
%C A094761 (6) but, because a block starts n^2 + 0, n^2 + 2, n^2 + 4, ..., the last number in such a block is n^2 + 2*(2n+1-1) = n^2 + 4n
%C A094761 (7) so the numbers n^2 + 4n + 2 = (n+2)^2 - 2 are missing.
%C A094761 End of proof. (End)
%H A094761 S. H. Weintraub, <a href="http://www.jstor.org/stable/4145074">An interesting recursion</a>, Amer. Math. Monthly, 111 (No. 6, 2004), 528-530.
%F A094761 a(n) = n + A053186(n).
%t A094761 f[n_] := 2 n - (Floor@ Sqrt@ n)^2; Table[f@ n, {n, 0, 71}] (* _Robert G. Wilson v_, Jan 23 2009 *)
%o A094761 (PARI) a(n)=2*n-sqrtint(n)^2 \\ _Charles R Greathouse IV_, Jul 01 2012
%Y A094761 Cf. A053186, A094763, A094764, A094765.
%K A094761 nonn,easy
%O A094761 0,3
%A A094761 _N. J. A. Sloane_, Jun 10 2004