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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A001670 n appears n times (n even). 5
2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 16, 16, 16 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = 2*floor( 1/2 + sqrt(n)). - Antonio Esposito (antonio.b.esposito(AT)italtel.it), Jan 21 2002

With a different offset: g.f. = Sum(i=0, inf, 2*x^(i^2+i)/(1-x)). - Ralf Stephan (ralf(AT)ark.in-berlin.de), Mar 11 2003

a(1)=2, a(2)=2, a(n)=a(n-a(n-2))+2 [From Branko Curgus (curgus(AT)wwu.edu), May 11 2010]

a(n)=2*round(sqrt(n)) [From Branko Curgus (curgus(AT)wwu.edu), May 11 2010]

MATHEMATICA

a[1]=2, a[2]=2, a[n_]:=a[n]=a[n-a[n-2]]+2 [From Branko Curgus (curgus(AT)wwu.edu), May 11 2010]

PROG

(MAGMA) [2*Round(Sqrt(n)): n in [1..70]]; // Vincenzo Librandi, Jun 23 2011

(PARI) a(n)=round(sqrt(n))<<1 \\ Charles R Greathouse IV, Jun 23 2011

CROSSREFS

Cf. A001650, A000194.

Sequence in context: A080374 A165040 A035683 * A100144 A076222 A177692

Adjacent sequences:  A001667 A001668 A001669 * A001671 A001672 A001673

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com).

EXTENSIONS

The first formula corrected by Branko Curgus (curgus(AT)wwu.edu), May 11 2010

Offset changed from 2 to 1 by Vincenzo Librandi, Jun 23 2011

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

Content is available under The OEIS End-User License Agreement .

Last modified February 14 17:43 EST 2012. Contains 205651 sequences.