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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A165754 a(n) = nimsum(n+(n+1)+(n+2)). 1
3, 0, 5, 2, 7, 4, 9, 6, 11, 8, 13, 10, 15, 12, 17, 14, 19, 16, 21, 18, 23, 20, 25, 22, 27, 24, 29, 26, 31, 28, 33, 30, 35, 32, 37, 34, 39, 36, 41, 38, 43, 40, 45, 42, 47, 44, 49, 46, 51, 48, 53, 50, 55, 52, 57, 54, 59, 56, 61, 58, 63, 60, 65, 62, 67, 64, 69, 66, 71, 68, 73, 70 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Start with 3. Then repeat the cycle: subtract 3, add 5. The odd-indexed terms give the odd numbers, beginning with 3. The even-indexed terms give the even numbers, beginning with 0. In the infinite sequence, every positive integer except 1 is listed.

LINKS

Colin Barker, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (1,1,-1).

FORMULA

a(n) = 2*n-a(n-1)+1 (with a(0)=3). - Vincenzo Librandi, Dec 02 2010

a(n) = 1 + n + 2*(-1)^n. - R. J. Mathar, Dec 02 2010

From Colin Barker, Nov 05 2015: (Start)

a(n) = a(n-1) + a(n-2) - a(n-3) for n>2.

G.f.: (2*x^2-3*x+3) / ((x-1)^2*(x+1)).

(End)

EXAMPLE

For n = 3, Nimsum(3 + 4 + 5) = 2, as shown: 011 XOR 100 XOR 101 010.

MAPLE

read("transforms") ; A165754 := proc(n) nimsum(nimsum(n, n+1), n+2) ; end: seq(A165754(n), n=0..120) ; # R. J. Mathar, Sep 28 2009

MATHEMATICA

Flatten[NestList[{Last[#]+5, Last[#]+2}&, {3, 0}, 40]] (* Harvey P. Dale, Dec 04 2011 *)

PROG

(Python) while n < 100 . . . print n^(n+1)^(n+2) . . . n=n+1

(PARI) Vec((2*x^2-3*x+3)/((x-1)^2*(x+1)) + O(x^100)) \\ Colin Barker, Nov 05 2015

CROSSREFS

Cf. A065168. - R. J. Mathar, Sep 28 2009

Sequence in context: A159980 A098496 A175297 * A193067 A177886 A011293

Adjacent sequences:  A165751 A165752 A165753 * A165755 A165756 A165757

KEYWORD

nonn,easy

AUTHOR

Mick Purcell (mickpurcell(AT)gmail.com), Sep 26 2009

EXTENSIONS

Extended by R. J. Mathar, Sep 28 2009

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 June 26 02:24 EDT 2017. Contains 288749 sequences.