login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224909 a(1) = a(2) = 1; a(n) = (a(n-1) + a(n-2)) mod (n - a(n-1)). 2
1, 1, 0, 1, 1, 2, 3, 0, 3, 3, 6, 3, 9, 2, 11, 3, 0, 3, 3, 6, 9, 2, 11, 0, 11, 11, 6, 17, 11, 9, 20, 5, 25, 3, 28, 7, 5, 12, 17, 6, 23, 10, 0, 10, 10, 20, 3, 23, 0, 23, 23, 17, 4, 21, 25, 15, 40, 1, 41, 4, 45, 15, 12, 27, 1, 28, 29, 18, 47, 19, 14, 33, 7, 40 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,6

COMMENTS

Performing the modulus operation, the smallest nonnegative residue is to be taken.

a(A226483(n)) = n and a(m) <> n for m < A226483(n). - Reinhard Zumkeller, Jun 09 2013

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

EXAMPLE

a(8) = (a(7) + a(6)) mod (8 - a(7)) = (2+3) mod (8-3) = 5 mod 5 = 0.

MATHEMATICA

a[1]=1; a[2]=1; a[n_] := a[n] = Mod[a[n-1] + a[n-2], n - a[n-1]]; Array[a, 74] (* Giovanni Resta, Jun 08 2013 *)

nxt[{n_, a_, b_}] := {n + 1, b, Mod[a + b, n + 1 - b]}; NestList[nxt, {2, 1, 1}, 80][[All, 2]] (* Harvey P. Dale, Mar 14 2020 *)

PROG

(Haskell)

a224909 n = a224909_list !! (n-1)

a224909_list = 1 : 1 : zipWith mod

   (zipWith (+) a224909_list $ tail a224909_list)

   (zipWith (-) [3..] $ tail a224909_list)

-- Reinhard Zumkeller, Jun 09 2013

CROSSREFS

Sequence in context: A131900 A082116 A079777 * A227536 A047773 A279416

Adjacent sequences:  A224906 A224907 A224908 * A224910 A224911 A224912

KEYWORD

nonn,changed

AUTHOR

David S. Newman, Apr 19 2013

EXTENSIONS

a(31)-a(74) from Giovanni Resta, Jun 08 2013

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 20:44 EDT 2020. Contains 333103 sequences. (Running on oeis4.)