[go: up one dir, main page]

login
Search: a185048 -id:a185048
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(1)=a(2)=0, a(3)=2; thereafter a(n) = Sum( a(n-i-s-a(n-i-1)), i=0..k-1 ), where s=0, k=3.
+10
7
0, 0, 2, 2, 4, 2, 6, 4, 8, 4, 10, 6, 12, 6, 14, 8, 16, 8, 18, 10, 20, 10, 22, 12, 24, 12, 26, 14, 28, 14, 30, 16, 32, 16, 34, 18, 36, 18, 38, 20, 40, 20, 42, 22, 44, 22, 46, 24, 48, 24, 50, 26, 52, 26, 54, 28, 56, 28, 58, 30, 60, 30, 62, 32, 64, 32, 66, 34, 68, 34, 70, 36, 72, 36, 74, 38, 76, 38, 78, 40, 80, 40
OFFSET
1,3
COMMENTS
Is this A185048 with the leading two 1's replaced by 0's? - R. J. Mathar, Apr 17 2014.
This is true, see formulas below. - Bruno Berselli, Apr 18 2014
LINKS
Joseph Callaghan, John J. Chew III, and Stephen M. Tanny, On the behavior of a family of meta-Fibonacci sequences, SIAM Journal on Discrete Mathematics 18.4 (2005): 794-824. See Fig. 1.4.
FORMULA
From Bruno Berselli, Apr 18 2014: (Start)
G.f.: 2*x^3*(1 + x + x^2)/((1 - x)^2*(1 + x)^2*(1 + x^2)).
a(n) = n - 1 - ((-1)^n + 1)*(n - (-1)^floor(n/2) - 1)/4. Therefore:
a(2h+1) = 2h, a(2h) = 2*floor(h/2), or also: a(4h) = a(4h+2) = 2h, a(4h+1) = 4h, a(4h+3) = 4h+2.
a(n) = a(n-2) + a(n-4) - a(n-6) for n>6. (End)
MAPLE
#T_s, k(n) from Callaghan et al. Eq. (1.6).
s:=0; k:=3;
a:=proc(n) option remember; global s, k;
if n <= 2 then 0
elif n = 3 then 2
else
add(a(n-i-s-a(n-i-1)), i=0..k-1);
fi; end;
t1:=[seq(a(n), n=1..100)];
MATHEMATICA
LinearRecurrence[{0, 1, 0, 1, 0, -1}, {0, 0, 2, 2, 4, 2}, 100] (* Vincenzo Librandi, Jul 12 2015 *)
PROG
(Magma) [n le 3 select 2*Floor((n-1)/2) else Self(n-Self(n-1))+Self(n-1-Self(n-2))+Self(n-2-Self(n-3)): n in [1..100]]; // Bruno Berselli, Apr 18 2014
(Magma) [n-1-((-1)^n+1)*(n-(-1)^Floor(n/2)-1)/4: n in [1..80]]; // Vincenzo Librandi, Jul 12 2015
CROSSREFS
Cf. A185048.
KEYWORD
nonn,look,hear,easy
AUTHOR
N. J. A. Sloane, Apr 16 2014
STATUS
approved
a(4*n) = a(4*n+2) = a(2*n+1) = 2*n + 1.
+10
4
1, 1, 1, 3, 3, 5, 3, 7, 5, 9, 5, 11, 7, 13, 7, 15, 9, 17, 9, 19, 11, 21, 11, 23, 13, 25, 13, 27, 15, 29, 15, 31, 17, 33, 17, 35, 19, 37, 19, 39, 21, 41, 21, 43, 23, 45, 23, 47, 25, 49, 25, 51, 27, 53, 27, 55, 29, 57, 29, 59, 31, 61, 31, 63, 33, 65, 33, 67, 35, 69, 35, 71, 37, 73, 37, 75, 39, 77, 39, 79, 41, 81, 41, 83, 43, 85, 43
OFFSET
0,4
COMMENTS
A214282(n) and -A214283(n) are companions. Separately or together, they have many links with the Catalan's numbers A000108(n). Examples:
A214282(n+1) - 2*A214282(n) = -1, -1, 1, 0, -2, -5, 5, 0, -14, -42, 42, 0, -132, ....
2*A214283(n) - A214283(n+1) = 1, 0, -1, -2, 2, 0, -5, -14, 14, 0, -42, -132, 132, ....
A214282(n) + A214283(n) = 1, 0, -1, 0, 2, 0, -5, 0, 14, 0, -42,... (A126120).
The companion to a(n) is b(n) = -A214283(n)/(1,1,1,1,2,2,5,5,...) = 0, 1, 2, 3, 2, 5, 4, 7, 4, 9, 6, ....
a(n) - b(n) = A056594(n).
Discovered as a(n) = A214282(n+1)/A000108([n/2]). See abs(A129996(n-2)).
FORMULA
a(n+3) = (A185048(n+3)=2,2,4,2,... ) + 1.
a(n+2) - a(n) = 0, 2, 2, 2. (Period 4).
a(n) = 2*a(n-4) - a(n-8).
a(2*n) = A109613(n).
a(n+1) - a(n) = 2* (-1)^n * A059169(n).
G.f. : ( 1+x+2*x^3+x^4+x^5 ) / ( (x^2+1)*(x-1)^2*(1+x)^2 ). - Jean-François Alcover, Aug 14 2012
MATHEMATICA
a[n_?EvenQ] := n/2 + Boole[Mod[n, 4] == 0]; a[n_?OddQ] := n; Table[a[n], {n, 0, 86}] (* Jean-François Alcover, Aug 14 2012 *)
LinearRecurrence[{0, 1, 0, 1, 0, -1}, {1, 1, 1, 3, 3, 5}, 50] (* G. C. Greubel, Apr 23 2018 *)
PROG
(PARI) x='x+O('x^30); Vec(( 1+x+2*x^3+x^4+x^5 )/( (x^2+1)*(x-1)^2*(1+x)^2 )) \\ G. C. Greubel, Apr 23 2018
(Magma) I:=[1, 1, 1, 3, 3, 5]; [n le 6 select I[n] else Self(n-2) +Self(n-4) -Self(n-6): n in [1..30]]; // G. C. Greubel, Apr 23 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Aug 13 2012
STATUS
approved

Search completed in 0.061 seconds