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

%I #13 Sep 08 2017 03:41:15

%S 1,1,2,3,5,8,16,17,18,36,54,57,73,81,84,100,105,205,305,405,413,429,

%T 634,734,788,824,842,926,928,1854,2782,3606,6388,6424,9206,9611,10453,

%U 11381,11384,17772,18560,18965,30349,30351,36775,37204,37633,38559,38560,75764

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

%C Same formula, seed {0,1} : 0, 1, 1, 2, 3, 4, 6, 9, 15, 15, 19, 22, 31, 46, 48, 49, 49, 98, 144, 146, 149, 298, 396, 792, 823, 921, 1019, 1021, 1043, 1049, 1841, 2860

%C Same formula, seed {1,2} : 1, 2, 4, 8, 9, 17, 25, 33, 35, 60, 77, 94, 111, 119, 238, 476, 714, 715, 826, 937, 962, 1081, 1795, 1796, 2733, 3814, 3822, 3855, 4093, 7948

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

%F a(0)=a(1)=1, for n>=2, a(n) = a(n-1) + a(a(n-2) mod n).

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

%o (Python)

%o a = [1]*1000

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

%o ..print(a[n-2],end=', ')

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

%o # Corrected by _Derek Orr_, Sep 25 2014

%Y Cf. A215488.

%K nonn,easy

%O 0,3

%A _Alex Ratushnyak_, Aug 14 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 May 5 20:30 EDT 2024. Contains 372287 sequences. (Running on oeis4.)