login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A094765 a(n) = n + 2 * square excess of n. 4
0, 1, 4, 7, 4, 7, 10, 13, 16, 9, 12, 15, 18, 21, 24, 27, 16, 19, 22, 25, 28, 31, 34, 37, 40, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Robert Israel, Table of n, a(n) for n = 0..10000

S. H. Weintraub, An interesting recursion, Amer. Math. Monthly, 111 (No. 6, 2004), 528-530.

FORMULA

a(n) = n + 2*A053186(n).

G.f.: 3*x/(1-x)^2 - (2/(1-x)) * Sum_{k>=1} (2*k-1)*x^(k^2).  The sum is related to Jacobi theta functions. - Robert Israel, Oct 23 2015

MAPLE

seq(3*n - 2*floor(sqrt(n))^2, n=0..1000); # Robert Israel, Oct 23 2015

PROG

(PARI) a(n) = 3*n - 2*sqrtint(n)^2; \\ Michel Marcus, Oct 23 2015

CROSSREFS

Cf. A002061, A053186, A094766.

Sequence in context: A254398 A081884 A059143 * A170863 A021682 A242187

Adjacent sequences:  A094762 A094763 A094764 * A094766 A094767 A094768

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Jun 10 2004

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 19 02:06 EST 2018. Contains 299330 sequences. (Running on oeis4.)