login
Given the series (1, 2, 1, 2, 1, 2, ...), let (1 + 2x + x^2 + 2x^3 + ...) * (1 + 2x^2 + x^3 + 2x^4 + ...) = (1 + 2x + 3x^2 + 7x^3 + ...)
1

%I #25 Jul 06 2019 16:44:51

%S 1,2,3,7,7,12,11,17,15,22,19,27,23,32,27,37,31,42,35,47,39,52,43,57,

%T 47,62,51,67,55,72,59,77,63,82,67,87,71,92,75,97,79,102,83,107,87,112,

%U 91,117,95,122,99,127,103,132,107,137,111,142,115,147,119,152,123,157,127,162

%N Given the series (1, 2, 1, 2, 1, 2, ...), let (1 + 2x + x^2 + 2x^3 + ...) * (1 + 2x^2 + x^3 + 2x^4 + ...) = (1 + 2x + 3x^2 + 7x^3 + ...)

%C The offset has been selected as "1" to accommodate the conjectured property of the sequence: 3 divides a(n) iff n == 0 mod 3. Example: 3 divides (3, 12, 15, 27, 27, 42, ...) but not other terms through n = 18.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1).

%F (1 + 2x + 3x^2 + 7x^3 + ...) = (1 + 2x + x^2 + 2x^3 + ...) * (1 + 2x^2 + x^3 + 2x^4 + ...).

%F Let M = a triangle with (1, 2, 1, 2, 1, 2, ...) in every column with the leftmost column shifted upwards one row. Then A179894 = leftmost column of M^2.

%F a(1)=1; for odd n > 1, a(n) = 2*n - 3; for even n, a(n) = 5*n/2 - 3. So it is true that 3 divides a(n) iff 3 divides n. - _Jon E. Schoenfield_, Jul 31 2010

%F From _Colin Barker_, Oct 28 2012: (Start)

%F a(n) = ((9 + (-1)^n)*n - 12)/4 for n > 1.

%F a(n) = 2*a(n-2) - a(n-4) for n > 5.

%F G.f.: x*(2*x+1)*(x^3+x^2+1)/((x-1)^2*(x+1)^2). (End)

%p t1:=add(x^(2*n),n=0..50)+2*add(x^(2*n+1),n=0..50);

%p t2:=2*add(x^(2*n),n=0..50)-1+add(x^(2*n+1),n=0..50)-x;

%p t3:=t1*t2;

%p series(t3,x,100);

%p seriestolist(%);

%K nonn,easy

%O 1,2

%A _Gary W. Adamson_, Jul 31 2010

%E Edited, corrected and extended by _N. J. A. Sloane_ and _Jon E. Schoenfield_, Sep 06 2010