login
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.
1

%I #37 Jun 16 2026 23:24:20

%S 2,6,7,15,17,33,37,69,77,141,157,285,317,573,637,1149,1277,2301,2557,

%T 4605,5117,9213,10237,18429,20477,36861,40957,73725,81917,147453,

%U 163837,294909,327677,589821,655357,1179645,1310717,2359293,2621437,4718589,5242877

%N 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.

%H Carlo Corti, <a href="/A078113/b078113.txt">Table of n, a(n) for n = 1..55</a>

%H Carlo Corti, <a href="https://doi.org/10.5281/zenodo.20677965">A078113: Exact formula-free verification of OEIS sequence A078113 up to 10^9</a>

%F 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 Conjecture: a(n) = 2*a(n-2) + 3, n odd>2 = A154117((n+1)/2). - _Bill McEachen_, Jun 21 2025

%e u(3)=7, Sum_{k>=1} u(k) = 28 is an integer, hence 7 is in the sequence.

%o (PARI)

%o A078113(maxn, maxk) = {

%o u=vector(maxk);

%o u[1]=1; u[2]=1;

%o for(n=1, maxn,

%o u[3]=n;

%o for(k=4, maxk, u[k]=abs(2*u[k-1]-u[k-2]-u[k-3])/2);

%o s=sum(i=1, maxk, u[i]);

%o if(ceil(s)-s < 1E-11, print1(n, ", ")) \\ Arbitrary 1E-11

%o )

%o }

%o A078113(1000000, 200) \\ _Colin Barker_, Aug 14 2013

%Y Cf. A154117, A133257.

%K nonn,changed

%O 1,1

%A _Benoit Cloitre_, Dec 04 2002

%E a(11)-a(33) from _Colin Barker_, Aug 14 2013

%E a(34)-a(41) from _Bill McEachen_, Jun 21 2025