login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Let b_i(k) = 1 for k <= i; for n > i, b_i(n) = b_i(t(n)) + b_i(n-t(n)) where t = A063882. a(n) = 3*b_2(n)-2*n if n is even, a(n) = 3*b_4(n)-n if n is odd.
2

%I #16 Sep 27 2018 05:03:21

%S 2,-1,0,1,1,0,-1,-1,0,1,1,0,2,-1,0,1,-2,0,2,-1,0,1,1,0,2,-1,0,1,-2,0,

%T -1,-1,0,-2,1,0,-1,2,-3,1,1,-3,2,-1,3,-2,1,0,-1,-1,0,1,-2,0,2,-1,0,-2,

%U 1,0,-1,-1,0,-2,1,0,-1,2,0,1,-2,3,-1,-1,3,-2,1,-3,2,-1,0,1,-2,0,2,-4,3,-2,4,-3,2,-1,0,-2

%N Let b_i(k) = 1 for k <= i; for n > i, b_i(n) = b_i(t(n)) + b_i(n-t(n)) where t = A063882. a(n) = 3*b_2(n)-2*n if n is even, a(n) = 3*b_4(n)-n if n is odd.

%H Altug Alkan, <a href="/A319020/b319020.txt">Table of n, a(n) for n = 1..9216</a>

%o (PARI) t=f=g=vector(200); t[1]=t[2]=t[3]=t[4]=1; for(n=5, #t, t[n] = t[n-t[n-1]]+t[n-t[n-4]]); f[1]=f[2]=1; for(n=3, #f, f[n] = f[t[n]]+f[n-t[n]]); g[1]=g[2]=g[3]=g[4]=1; for(n=5, #g, g[n] = g[t[n]]+g[n-t[n]]); vector(200, n, if(n%2==0, 3*f[n]-2*n,3*g[n]-n))

%Y Cf. A063882, A317686, A317754, A317854.

%K sign,look

%O 1,1

%A _Altug Alkan_, Sep 08 2018