cp's OEIS Frontend

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.

A330715 a(1), a(2), a(3) = 1; a(n) = (a(n-1) mod a(n-3)) + a(n-2) + 1.

This page as a plain text file.
%I A330715 #20 Jul 18 2025 14:18:15
%S A330715 1,1,1,2,2,3,4,4,6,7,10,12,16,19,24,28,34,39,46,52,60,67,76,84,94,103,
%T A330715 114,124,136,147,160,172,186,199,214,228,244,259,276,292,310,327,346,
%U A330715 364,384,403,424,444,466,487,510,532,556,579,604,628,654,679,706,732
%N A330715 a(1), a(2), a(3) = 1; a(n) = (a(n-1) mod a(n-3)) + a(n-2) + 1.
%H A330715 Matthew Niemiro, <a href="/A330715/b330715.txt">Table of n, a(n) for n = 1..1000</a>
%F A330715 a(1), a(2), a(3) = 1; a(n) = (a(n-1) mod a(n-3)) + a(n-2) + 1.
%F A330715 Conjectures from _Colin Barker_, Dec 28 2019: (Start)
%F A330715 G.f.: x*(1 - x - x^2 + 2*x^3 - x^4 + x^6 - 2*x^7 + 2*x^8) / ((1 - x)^3*(1 + x)).
%F A330715 a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>9.
%F A330715 a(n) = (99 - 3*(-1)^n - 24*n + 2*n^2) / 8 for n>5.
%F A330715 (End)
%t A330715 Nest[Append[#, Mod[#[[-1]], #[[-3]] ] + #[[-2]] + 1] &, {1, 1, 1}, 57] (* _Michael De Vlieger_, Dec 27 2019 *)
%t A330715 nxt[{a_,b_,c_}]:={b,c,Mod[c,a]+b+1}; NestList[nxt,{1,1,1},60][[;;,1]] (* _Harvey P. Dale_, Jul 18 2025 *)
%o A330715 (Python)
%o A330715 x = 1
%o A330715 y = 1
%o A330715 z = 1
%o A330715 for i in range(4, 1001):
%o A330715     new = z % x + y + 1
%o A330715     print(str(i) +" " + str(new))
%o A330715     x = y
%o A330715     y = z
%o A330715     z = new
%K A330715 nonn,hear
%O A330715 1,4
%A A330715 _Matthew Niemiro_, Dec 27 2019
%E A330715 More terms from _Michael De Vlieger_, Dec 27 2019