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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A076466 a(1)=1 a(n) = a(n-1) + ((-1)^a(n-1)*a(n-1)) mod n. 0
1, 2, 4, 4, 8, 10, 13, 16, 23, 30, 38, 40, 41, 42, 54, 60, 69, 72, 87, 100, 116, 122, 129, 144, 163, 182, 202, 208, 213, 240, 263, 288, 312, 318, 321, 324, 352, 362, 373, 400, 431, 462, 494, 504, 513, 552, 587, 624, 660, 670, 677, 728, 767, 810, 850, 860, 865 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

FORMULA

a(n) is asymptotic to 4n^2/15; a(n)=4n^2/15 if n is of the form 30*(2k+1) hence a(60k+30) = 1800*(2k+1)^2

EXAMPLE

a(8) = a(7) + ( (-1)^a(7)*a(7)) mod 8 = 13 + (- 13) mod 8 = 13 + 3 = 16

MATHEMATICA

RecurrenceTable[{a[1]==1, a[n]==a[n-1]+Mod[(-1)^a[n-1] a[n-1], n]}, a, {n, 60}] (* From Harvey P. Dale, Nov 09 2011 *)

PROG

(PARI) a(n)=a(n-1)+((-1)^a(n-1)*a(n-1))%n

CROSSREFS

Sequence in context: A188824 A181212 A029599 * A073117 A039879 A125204

Adjacent sequences:  A076463 A076464 A076465 * A076467 A076468 A076469

KEYWORD

nonn

AUTHOR

Benoit Cloitre (benoit7848c(AT)orange.fr), Nov 07 2002

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 17 05:54 EST 2012. Contains 205985 sequences.