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 A078113 #29 Jun 27 2025 17:06:17 %S A078113 2,6,7,15,17,33,37,69,77,141,157,285,317,573,637,1149,1277,2301,2557, %T A078113 4605,5117,9213,10237,18429,20477,36861,40957,73725,81917,147453, %U A078113 163837,294909,327677,589821,655357,1179645,1310717,2359293,2621437,4718589,5242877 %N A078113 Let u(1)=u(2)=1, u(3)=n, u(k) = (1/2)*abs(2*u(k-1) -u(k-2)-u(k-3)); sequence gives values of n such that Sum_{k>=1} u(k) is an integer. %C A078113 u(3)=7, Sum_{k>=1} u(k) = 28 is an integer, hence 7 is in the sequence. %F A078113 Conjecture: a(n) = -3+2^(1/2*(-5+n))*(10-10*(-1)^n+9*sqrt(2)+9*(-1)^n*sqrt(2)). a(n) = a(n-1)+2*a(n-2)-2*a(n-3). G.f.: x*(3*x^2-4*x-2) / ((x-1)*(2*x^2-1)). - _Colin Barker_, Aug 14 2013 %F A078113 Conjecture: a(n) = 2*a(n-2) + 3, n odd>2 = A154117((n+1)/2). - _Bill McEachen_, Jun 21 2025 %o A078113 (PARI) %o A078113 A078113(maxn, maxk) = { %o A078113 u=vector(maxk); %o A078113 u[1]=1; u[2]=1; %o A078113 for(n=1, maxn, %o A078113 u[3]=n; %o A078113 for(k=4, maxk, u[k]=abs(2*u[k-1]-u[k-2]-u[k-3])/2); %o A078113 s=sum(i=1, maxk, u[i]); %o A078113 if(ceil(s)-s < 1E-11, print1(n, ", ")) \\ Arbitrary 1E-11 %o A078113 ) %o A078113 } %o A078113 A078113(1000000, 200) \\ _Colin Barker_, Aug 14 2013 %Y A078113 Cf. A154117, A133257. %K A078113 nonn,more %O A078113 1,1 %A A078113 _Benoit Cloitre_, Dec 04 2002 %E A078113 a(11)-a(33) from _Colin Barker_, Aug 14 2013 %E A078113 a(34)-a(41) from _Bill McEachen_, Jun 21 2025