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!)
A215526 a(0)=a(1)=1, a(n) = a(n-2) + a(a(n-1) mod n). 2

%I #9 Sep 08 2017 03:39:53

%S 1,1,2,3,5,4,10,7,17,24,22,25,23,47,27,70,37,73,38,74,65,76,87,114,

%T 125,115,150,185,223,250,245,473,360,718,365,788,725,875,726,1000,727,

%U 1245,912,1269,1787,1629,1861,1852,2084,2002,2086,3863,2156,4588,4312

%N a(0)=a(1)=1, a(n) = a(n-2) + a(a(n-1) mod n).

%C Same formula, seed {0,1} : 0, 1, 1, 2, 2, 3, 4, 5, 7, 10, 7, 15, 9, 25, 24, 35, 26, 45, 36, 90, 43, 91, 45, 136, 71, 227, 161, 388, 232, 388, 464, 852, 507, 861, 522, 1368, 522

%H Ivan Neretin, <a href="/A215526/b215526.txt">Table of n, a(n) for n = 0..10000</a>

%t Fold[Append[#1, #1[[-2]] + #1[[1 + Mod[#1[[-1]], #2]]]] &, {1, 1}, Range[2, 54]] (* _Ivan Neretin_, Sep 07 2017 *)

%o (Python)

%o a = [1]*1000

%o for n in range(2, 77):

%o print a[n-2],

%o a[n] = a[n-2] + a[a[n-1] % n]

%Y Cf. A215525.

%K nonn,easy

%O 0,3

%A _Alex Ratushnyak_, Aug 15 2012

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 August 8 18:48 EDT 2024. Contains 375023 sequences. (Running on oeis4.)