This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A330615 #21 Apr 16 2025 21:13:04 %S A330615 1,1,2,3,5,4,9,7,8,15,12,6,10,21,19,14,22,23,9,20,16,38,44,52,21,40, %T A330615 57,24,22,65,48,26,79,78,18,17,32,102,136,41,23,53,58,26,76,83,150,47, %U A330615 56,54,14,22,63,56,17,24,44,97,117,253,118,112,58,171,143,74 %N A330615 a(0) = 1; a(1) = 1; a(n) = a(a(n - 1) mod n) + a(a(n - 2) mod n). %C A330615 Periodic with period 63584 starting at n = 441329. %H A330615 Jack Kiuttu, <a href="/A330615/b330615.txt">Table of n, a(n) for n = 0..10000</a> %e A330615 n = 8: a(7) = 7, a(6) = 9, so a(8) = a(a(7) mod 8) + a(a(6) mod 8) = a(7 mod 8) + a(9 mod 8) = a(7) + a(1) = 7 + 1 = 8. %t A330615 a[0] = a[1] = 1; a[n_] := a[n] = a[Mod[a[n-1], n]] + a[Mod[a[n-2], n]]; Array[a, 66, 0] (* _Amiram Eldar_, Dec 21 2019 *) %o A330615 (Python) # Lists terms up to given n. %o A330615 def a_list(n): %o A330615 a=[1,1] %o A330615 for k in range(2,n+1): %o A330615 a.append(a[a[-1]%k]+a[a[-2]%k]) %o A330615 return a %Y A330615 Cf. A308818 (similar sequence with initial conditions a(0) = 2, a(1) = 3). %K A330615 nonn %O A330615 0,3 %A A330615 _Jack Kiuttu_, Dec 20 2019