login
The OEIS is supported by the many generous donors 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; text; internal format)
OFFSET
1,2
LINKS
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}] (* 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: A233394 A029599 A213064 * A073117 A342695 A039879
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Nov 07 2002
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 3 18:56 EDT 2024. Contains 372222 sequences. (Running on oeis4.)