[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a176895 -id:a176895
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = n / gcd(n,4).
+10
63
1, 1, 3, 1, 5, 3, 7, 2, 9, 5, 11, 3, 13, 7, 15, 4, 17, 9, 19, 5, 21, 11, 23, 6, 25, 13, 27, 7, 29, 15, 31, 8, 33, 17, 35, 9, 37, 19, 39, 10, 41, 21, 43, 11, 45, 23, 47, 12, 49, 25, 51, 13, 53, 27, 55, 14, 57, 29, 59, 15, 61, 31, 63, 16, 65, 33, 67, 17, 69, 35, 71, 18, 73, 37, 75, 19
OFFSET
1,3
COMMENTS
From Peter Bala, Feb 19 2019: (Start)
We make some general remarks about the sequence a(n) = numerator(n/(n + k)) = n/gcd(n,k) for k a fixed positive integer. The present sequence is the case k = 4. Several other cases are listed in the Crossrefs. In addition to being multiplicative these sequences are also strong divisibility sequences, that is, gcd(a(n),a(m)) = a(gcd(n, m)) for n, m >= 1. In particular, it follows that a(n) is a divisibility sequence: if n divides m then a(n) divides a(m).
By the multiplicativeness and strong divisibility property of the sequence a(n) it follows that if gcd(n, m) = 1 then a(a(n)*a(m) ) = a(a(n)) * a(a(m)), a(a(a(n))*a(a(m)) ) = a(a(a(n))) * a(a(a(m))) and so on.
The sequence a(n) has the rational generating function Sum_{d divides k} f(d)*x^d/(1 - x^d)^2, where f(n) is the Dirichlet inverse of the Euler totient function A000010. f(n) is a multiplicative function defined on prime powers p^k by f(p^k) = 1 - p. See A023900. Cf. A181318. (End)
FORMULA
G.f.: x*(1 +x +3*x^2 +x^3 +3*x^4 +x^5 +x^6)/(1 - x^4)^2.
a(n) = 2*a(n-4) - a(n-8).
a(n) = (n/16)*(11 - 5*(-1)^n - i^n - (-i)^n). - Ralf Stephan, Mar 15 2003
a(2*n+1) = a(4*n+2) = 2*n+1, a(4*n+4) = n+1. - Ralf Stephan, Jun 10 2005
Multiplicative with a(2^e) = 2^max(0, e-2), a(p^e) = p^e, p >= 3. - Mitch Harris, Jun 29 2005
a(n) = A167192(n+4,4). - Reinhard Zumkeller, Oct 30 2009
From R. J. Mathar, Apr 18 2011: (Start)
a(n) = A109045(n)/4.
Dirichlet g.f.: zeta(s-1)*(1-1/2^s-1/2^(2s)). (End)
a(n+4) - a(n) = A176895(n). - Paul Curtz, Apr 05 2011
a(n) = numerator(Sum_{k=1..n} 1/((k+1)*(k+2))). This summation has a closed form of 1/2 - 1/(n+2) and denominator of A145979(n). - Gary Detlefs, Sep 16 2011
a((2*n-1)*2^p) = ceiling(2^(p-2))*(2*n-1), p >= 0 and n >= 1. - Johannes W. Meijer, Feb 06 2013
a(n) = n / A109008(n). - Reinhard Zumkeller, Nov 25 2013
a(n) = denominator((2n-4)/n). - Wesley Ivan Hurt, Dec 22 2016
From Peter Bala, Feb 21 2019: (Start)
O.g.f.: Sum_{n >= 0} a(n)*x^n = F(x) - F(x^2) - F(x^4), where F(x) = x/(1 - x)^2.
More generally, Sum_{n >= 0} (a(n)^m)*x^n = F(m,x) + (1 - 2^m)*( F(m,x^2) + F(m,x^4) ), where F(m,x) = A(m,x)/(1 - x)^(m+1) with A(m,x) the m_th Eulerian polynomial: A(1,x) = x, A(2,x) = x*(1 + x), A(3,x) = x*(1 + 4*x + x^2) - see A008292.
Repeatedly applying the Euler operator x*d/dx or its inverse operator to the o.g.f. for the sequence a(n) produces generating functions for the sequences ((n^m)*a(n))n>=1 for m in Z. Some examples are given below.
(End)
Sum_{k=1..n} a(k) ~ (11/32) * n^2. - Amiram Eldar, Nov 25 2022
E.g.f.: x*(8*cosh(x) + sin(x) + 3*sinh(x))/8. - Stefano Spezia, Dec 02 2023
EXAMPLE
From Peter Bala, Feb 21 2019: (Start)
Sum_{n >= 1} n*a(n)*x^n = G(x) - 2*G(x^2) - 4*G(x^4), where G(x) = x*(1 + x)/(1 - x)^3.
Sum_{n >= 1} (1/n)*a(n)*x^n = H(x) - (1/2)*H(x^2) - (1/4)*H(x^4), where H(x) = x/(1 - x).
Sum_{n >= 1} (1/n^2)*a(n)*x^n = L(x) - (1/2^2)*L(x^2) - (1/4^2)*L(x^4), where L(x) = Log(1/(1 - x)).
Sum_{n >= 1} (1/a(n))*x^n = L(x) + (1/2)*L(x^2) + (1/2)*L(x^4). (End)
MAPLE
A060819 := n -> numer(1/2-1/(n+2)): seq(A060819(n), n=1..75); # Gary Detlefs, Sep 16 2011
MATHEMATICA
f[n_]:= n/GCD[n, 4]; Array[f, 80]
PROG
(Sage) [lcm(n, 4)/4 for n in (1..80)] # Zerinvary Lajos, Jun 07 2009
(PARI) { for (n=1, 1000, write("b060819.txt", n, " ", n / gcd(n, 4)); ) } \\ Harry J. Smith, Jul 12 2009
(Haskell)
a060819 n = n `div` a109008 n -- Reinhard Zumkeller, Nov 25 2013
(Magma) [n/GCD(n, 4): n in [1..80]]; // G. C. Greubel, Sep 19 2018
(GAP) List([1..80], n->n/Gcd(n, 4)); # Muniru A Asiru, Feb 20 2019
CROSSREFS
Cf. A026741, A051176, A060791, A060789. Cf. Other sequences given by the formula numerator(n/(n + k)): A106608 thru A106612 (k = 7 thru 11), A051724 (k = 12), A106614 thru A106621 (k = 13 thru 20).
KEYWORD
nonn,mult,easy
AUTHOR
Len Smiley, Apr 30 2001
STATUS
approved
a(4*n) = n, a(1+2*n) = 4+8*n, a(2+4*n) = 2+4*n.
+10
6
0, 4, 2, 12, 1, 20, 6, 28, 2, 36, 10, 44, 3, 52, 14, 60, 4, 68, 18, 76, 5, 84, 22, 92, 6, 100, 26, 108, 7, 116, 30, 124, 8, 132, 34, 140, 9, 148, 38, 156, 10, 164, 42, 172, 11, 180, 46, 188, 12, 196, 50, 204, 13, 212, 54, 220, 14, 228, 58, 236, 15, 244, 62
OFFSET
0,2
FORMULA
a(n) = 2*a(n-4) - a(n-8) for n>7.
a(n) = A176895(n) * A060819(n).
a(n) = (4*A061037(n+2))/(n+4).
a(n) = 4*n / A146160(n).
a(2*n) = A064680(n).
a(1+2*n) = A017113(n).
a(4*n) = a(-4+4*n) + 1.
a(1+4*n) = a(-3+4*n) + 16.
a(2+4*n) = a(-2+4*n) + 4.
a(3+4*n) = a(-1+4*n) + 16. See A177499.
From Bruno Berselli, Mar 22 2011: (Start)
G.f.: x*(4+2*x+12*x^2+x^3+12*x^4+2*x^5+4*x^6)/(1-x^4)^2.
a(n) = (64-3*(1+(-1)^n)*(9+i^n))*n/16 with i=sqrt(-1).
a(n)/a(n-4) = n/(n-4) for n>4. (End)
a(n) = 8*n/(11 + 9*cos(Pi*n) + 12*cos(n*Pi/2)). - Wesley Ivan Hurt, Jul 06 2016
a(n) = lcm(4,n)/gcd(4,n). - R. J. Mathar, Feb 12 2019
Sum_{k=1..n} a(k) ~ (37/32)*n^2. - Amiram Eldar, Oct 07 2023
MAPLE
A188134:=n->8*n/(11 + 9*cos(Pi*n) + 12*cos(n*Pi/2)): seq(A188134(n), n=0..100); # Wesley Ivan Hurt, Jul 06 2016
MATHEMATICA
Table[8 n/(11 + 9 Cos[Pi*n] + 12 Cos[n*Pi/2]), {n, 0, 80}] (* Wesley Ivan Hurt, Jul 06 2016 *)
CoefficientList[Series[x*(4+2*x+12*x^2+x^3+12*x^4+2*x^5+4*x^6)/(1-x^4)^2, {x, 0, 50}], x] (* G. C. Greubel, Sep 20 2018 *)
LinearRecurrence[{0, 0, 0, 2, 0, 0, 0, -1}, {0, 4, 2, 12, 1, 20, 6, 28}, 70] (* Harvey P. Dale, Aug 14 2019 *)
PROG
(Magma) [(64-3*(1+(-1)^n)*(9+(-1)^(n div 2)))*n/16 : n in [0..80]]; // Wesley Ivan Hurt, Jul 06 2016
(PARI) x='x+O('x^50); concat([0], Vec(x*(4+2*x+12*x^2+x^3+12*x^4+ 2*x^5 +4*x^6)/(1-x^4)^2)) \\ G. C. Greubel, Sep 20 2018
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Mar 21 2011
STATUS
approved
a(4*n) = n*(16*n^2-1)/3, a(2*n+1) = n*(n+1)*(2*n+1)/6, a(4*n+2) = (4*n+1)*(4*n+2)*(4*n+3)/6.
+10
5
0, 0, 1, 1, 5, 5, 35, 14, 42, 30, 165, 55, 143, 91, 455, 140, 340, 204, 969, 285, 665, 385, 1771, 506, 1150, 650, 2925, 819, 1827, 1015, 4495, 1240, 2728, 1496, 6545, 1785, 3885, 2109, 9139, 2470, 5330, 2870, 12341, 3311, 7095, 3795, 16215, 4324
OFFSET
0,5
COMMENTS
a(n+2) is divisible by A060819(floor(n/3)).
a(n) is divisible by A176672(floor(n/3)).
Denominator of a(n)/n is of period 24: 1,1,3,4,1,6,1,4,3,1,1,12,1,2,3,4,1,3,1,4,3,2,1,12 (two successive palindromes).
This is the fifth column of the triangle A107711, hence the formula involving gcd(n+2,4) given below follows. - Wolfdieter Lang, Feb 24 2014
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,4,0,0,0,-6,0,0,0,4,0,0,0,-1).
FORMULA
a(n) = 4*a(n-4) - 6*a(n-8) + 4*a(n-12) - a(n-16).
a(n+1) = A002415(n+1)/A145979(n-1).
a(n) = A051724(n-1) * A051724(n) * A051724(n+1).
a(n) = A060819(n-1) * A060819(n) * A060819(n+1) / 3.
a(n) * a(n+4) = A061037(n+1) * A061037(n+2) * A061037(n+3) / 9.
a(n) = A138190(n)/A000034(n) for n > 0.
a(n) = A000292(n-1)/A176895(n+2) for n > 0.
a(n)/a(n+4) = n*(n^2-1)/((n+3)*(n+4)*(n+5)).
a(n)/a(n+12) = (n-1)*n*(n+1)/((n+11)*(n+12)*(n+13)).
G.f.: (x^2 + x^3 + 5*x^4 + 5*x^5 + 31*x^6 + 10*x^7 + 22*x^8 + 10*x^9 + 31*x^10 + 5*x^11 + 5*x^12 + x^13 + x^14) / ((1-x)^4*(1+x)^4*(1 + 4*x^2 + 6*x^4 + 4*x^6 + x^8)). - R. J. Mathar, Mar 10 2012
From Wolfdieter Lang, Feb 24 2014: (Start)
G.f.: (1 + x^12 + x*(1+x^10) + 5*x^2*(1+x^8) + 5*x^3*(1+x^7) + 31*x^4*(1+x^4) + 10*x^5*(1+x^2) + 22*x^6)/(1-x^4)^4. This is the preceding g.f. rewritten.
a(n) = binomial(n+1,3)*gcd(n+2,4)/4, n >= 0. From the g.f., see a comment above on A107711. (End)
a(n) = (n*(n-1)*((n+1)*(4+2*(-1)^n + (1+(-1)^n)*(-1)^((2*n+3+(-1)^n)/4))))/48. - Luce ETIENNE, Jan 01 2015
Sum_{n>=2} 1/a(n) = 12 - 27*log(2)/2. - Amiram Eldar, Aug 12 2022
MATHEMATICA
CoefficientList[Series[(x^2 + x^3 + 5 x^4 + 5 x^5 + 31 x^6 + 10 x^7 + 22 x^8 + 10 x^9 + 31 x^10 + 5 x^11 + 5 x^12 + x^13 + x^14)/((1 - x)^4 (1 + x)^4 (1 + 4 x^2 + 6 x^4 + 4 x^6 + x^8)), {x, 0, 47}], x] (* Bruno Berselli, Mar 11 2012 *)
PROG
(Maxima) A208950(n) := block(
[a, npr] ,
if equal(mod(n, 4), 0) then (
a : n/12*(n^2-1)
) else if equal(mod(n, 2), 0) then (
a : (n-1)*n*(n+1)/6
) else (
npr : (n-1)/2,
a : npr*(npr+1)*n/6
) ,
return(a)
)$ /* R. J. Mathar, Mar 10 2012 */
(PARI) vector(50, n, n--; binomial(n+1, 3)*gcd(n+2, 4)/4) \\ G. C. Greubel, Sep 20 2018
(Magma) [Binomial(n+1, 3)*GCD(n+2, 4)/4: n in [0..50]]; // G. C. Greubel, Sep 20 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Mar 03 2012
STATUS
approved
Period 4: repeat [1, 16, 4, 16].
+10
4
1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16, 1, 16, 4, 16
OFFSET
0,2
COMMENTS
From Klaus Brockhaus, May 14 2010: (Start)
Interleaving of A000012, A010855, A010709 and A010855.
Continued fraction expansion of (44+sqrt(2442))/88. (End)
FORMULA
From Klaus Brockhaus, May 14 2010: (Start)
a(n+2) - a(n) = A010674(n).
a(n) = a(n-4) for n > 3.
G.f.: (1+16*x+4*x^2+16*x^3)/(1-x^4). (End)
a(n) = A176895(n)^2. - Paul Curtz, Mar 21 2011
a(n) = (37 - 6*cos(n*Pi/2) - 27*cos(n*Pi) - 27*I*sin(n*Pi))/4. - Wesley Ivan Hurt, Jul 09 2016
MAPLE
seq(op([1, 16, 4, 16]), n=0..50); # Wesley Ivan Hurt, Jul 09 2016
MATHEMATICA
Table[{1, 16, 4, 16}, {21}] // Flatten (* Jean-François Alcover, May 24 2013 *)
PROG
(Magma) &cat[[1, 16, 4, 16]^^26]; // Klaus Brockhaus, May 14 2010
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, May 10 2010
STATUS
approved
Denominators of the Inverse semi-binomial transform of A001477(n) read downwards antidiagonals.
+10
4
1, 1, 1, 1, 2, 1, 1, 1, 4, 4, 1, 2, 2, 8, 2, 1, 1, 4, 1, 16, 16, 1, 2, 1, 8, 8, 32, 16, 1, 1, 4, 4, 16, 8, 64, 64, 1, 2, 2, 8, 4, 32, 32, 128, 16, 1, 1, 4, 2, 16, 16, 64, 8, 256, 256, 1, 2, 1, 8, 8, 32, 4, 128, 128, 512, 256, 1, 1, 4, 4, 16, 2, 64, 64, 256, 128, 1024, 1024
OFFSET
0,5
COMMENTS
Starting from any sequence a(k) in the first row, define the array T(n,k) of the inverse semi-binomial transform by T(0,k) = a(k), T(n,k) = T(n-1,k+1) -T(n-1,k)/2, n>=1.
Here, where the first row is the nonnegative integers, the array is
0 1 2 3 4 5 6 7 8 =A001477(n)
1 3/2 2 5/2 3 7/2 4 9/2 5 =A026741(n+2)/A000034(n)
1 5/4 3/2 7/4 2 9/4 5/2 11/4 3 =A060819(n+4)/A176895(n)
3/4 7/8 1 9/8 5/4 11/8 3/2 13/8 7/4 =A106609(n+6)/A205383(n+6)
1/2 9/16 5/8 11/16 3/4 13/16 7/8 15/16 1 =A106617(n+8)/TBD
5/16 11/32 3/8 13/32 7/16 15/32 1/2 17/32 9/16
3/16 13/64 7/32 15/64 1/4 17/64 9/32 19/64 5/16
7/64 15/128 1/8 17/128 9/64 19/128 5/32 21/128 11/64
1/16 17/256 9/128 19/256 5/64 21/256 11/128 23/256 3/32.
The first column contains 0, followed by fractions A000265/A084623, that is Oresme numbers n/2^n multiplied by 2 (see A209308).
EXAMPLE
The array of denominators starts:
1 1 1 1 1 1 1 1 1 1 1 ...
1 2 1 2 1 2 1 2 1 2 1 ...
1 4 2 4 1 4 2 4 1 4 2 ...
4 8 1 8 4 8 2 8 4 8 1 ...
2 16 8 16 4 16 8 16 1 16 8 ...
16 32 8 32 16 32 2 32 16 32 8 ...
16 64 32 64 4 64 32 64 16 64 32 ...
64 128 8 128 64 128 32 128 64 128 16 ...
16 256 128 256 64 256 128 256 32 256 128 ...
256 512 128 512 256 512 64 512 256 512 128 ...
All entries are powers of 2.
MAPLE
A213268frac := proc(n, k)
if n = 0 then
return k ;
else
return procname(n-1, k+1)-procname(n-1, k)/2 ;
end if;
end proc:
A213268 := proc(n, k)
denom(A213268frac(n, k)) ;
end proc: # R. J. Mathar, Jun 30 2012
MATHEMATICA
T[0, k_] := k; T[n_, k_] := T[n, k] = T[n-1, k+1] - T[n-1, k]/2; Table[T[n-k, k] // Denominator, {n, 0, 11}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Sep 12 2014 *)
KEYWORD
nonn,frac,tabl
AUTHOR
Paul Curtz, Jun 08 2012
STATUS
approved
a(4*n) = n*(4*n-1); a(2*n+1) = n*(n+1)/2; a(4*n+2) = (2*n+1)*(4*n+1).
+10
2
0, 0, 1, 1, 3, 3, 15, 6, 14, 10, 45, 15, 33, 21, 91, 28, 60, 36, 153, 45, 95, 55, 231, 66, 138, 78, 325, 91, 189, 105, 435, 120, 248, 136, 561, 153, 315, 171, 703, 190, 390, 210, 861, 231, 473, 253, 1035, 276, 564, 300, 1225, 325
OFFSET
0,5
COMMENTS
a(n) is divisible by the n-th term of the sequence 3, 3, 1, 1, 3, 3 (periodically repeated with period 6).
a(n) is divisible by b(floor((n-1)/3)), where b(n) = 1, 3, 2, 3, 7, 3, 5, 3, 13, 3, 8, 3, 19, 3,... , n>=0, is defined by inserting a 3 after each entry of A165355.
(n+1)*(n+2)*(n+3)/2=3*A000292(n+1) is divisible by a(n+2), so there is an integer sequence c(n)= 3*A000292(n+1)/a(n+2) = 3, 12, 10, 20, 7, 28, 18,... with c(2*n)=A123167(n+1) and c(n)/A109613(n+2)=A176895(n).
The sequence of denominators of a(n+2)/n has period length 8: 1, 2, 1, 4, 1, 1, 1, 4.
A table T(k,c) = a(1+c*(1+2k)) of (2*k+1)-sections starts as follows:
0 1 1 3 3 15...
0 3 6 45 21 60...
0 15 15 60 55 325...
0 14 28 231 105 315...
0 45 45 189 171 1035...
The table of T'(k,c) = T(k,c)/(2k+1), columns c>=0, looks as follows, construction similar to A165943:
0 1 1 3 3 15 6 14 k=0
0 1 2 15 7 20 15 77 k=1
0 3 3 12 11 65 24 63 k=2
0 2 4 33 15 45 33 175 k=3
0 5 5 21 19 115 42 112 k=4
0 3 6 51 23 70 51 273 k=5
The entries T'(k,c) are divisible by A060819(c).
Differences are T'(2,c)-T'(0,c) = T'(4,c)-T'(2,c) = 0, 2, 2, 9, 8, 50, 18, 49, 32, ... which is A168077(c) multiplied by the c-th term of the period-4 sequence 2, 2, 2, 1.
Differences are T'(3,c)- T'(1,c) = T'(5,c)-T'(3,c) = 0, 1, 2, 18, 8, 25, 18, 98, 32,... which is A168077(c) multiplied by the period-4 sequence 2, 1, 2, 2.
The reduced fractions T'(0,c)/T'(1,c) = 1, 1/2, 1/5, 3/7, 3/4, 2/5, 2/11, 5/13, 5/7, 3/8, 3/17, 7/19, .., c>=1, have a numerator sequence A026741(floor(c/2)+1). The denominator sequence is f(c) = 1, 2, 5, 7, 4, 5,.. = A001651(c+1)/A130658(c+1), with f(2*c+1) +f(2*c+2) = 3, 12, 9, 24 .. =3*A022998(c).
FORMULA
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12).
a(2*n) = A064038(2*n), a(2*n+1) = A000217(n).
a(n) = 3*A208950(n)/A109613(n).
a(n+1) = A060819(n) * A026741(n+2)(floor(n/2)).
G.f.: -x^2*(3*x^8+x^7+5*x^6+3*x^5+12*x^4+3*x^3+3*x^2+x+1)/ ((x-1)^3*(x+1)^3*(x^2+1)^3). - R. J. Mathar, Mar 22 2012
a(n) = (4*n^2-3*n-1+(2*n^2-3*n+1)*(-1)^n + n*(n-1)*(1+(-1)^n)*(-1)^((2*n-3-(-1)^n)/4))/16. - Luce ETIENNE, May 13 2016
Sum_{n>=2} 1/a(n) = 2 - Pi/4 + 7*log(2)/2. - Amiram Eldar, Aug 12 2022
MAPLE
A185138 := proc(n)
if n mod 4 = 0 then
return n/4*(n-1) ;
elif n mod 2 = 1 then
return (n-1)*(n+1)/8 ;
else
return (n-1)*n/2 ;
end if;
end proc: # R. J. Mathar, Apr 05 2012
MATHEMATICA
Clear[b]; b[1] = 0; b[2] = 0; b[3] = 1; b[4] = 1; b[5] = 3; b[6] = 3; b[7] = 15; b[8] = 6; b[n_Integer] := b[n] = ((-2 + n) (-4 (-4 + n) (-3 + n) (-2 + n) (8 + n (-9 + 2 n)) b[-3 + n] + (-5 + n) ((-3 +n) ((-4 + n) (211 + 2 n (-215 + n (147 + n (-41 + 4 n)))) - 4 (-1 + n) (19 + n (-13 + 2 n)) b[-2 + n]) - 4 (-4 + n)^2 (8 + n (-9 + 2 n)) b[-1 + n])))/(4 (-5 + n) (-4 + n) (-3 + n)^2 (19 + n (-13 + 2 n)))
a = Table[b[n], {n, 1, 52}] (* Roger L. Bagula, Mar 14 2012 *)
LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {0, 0, 1, 1, 3, 3, 15, 6, 14, 10, 45, 15}, 60] (* Harvey P. Dale, Nov 23 2015 *)
PROG
(PARI) x='x+O('x^50); concat([0, 0], Vec(-x^2*(3*x^8+x^7+5*x^6+3*x^5+12*x^4+3*x^3+3*x^2+x+1)/ ((x-1)^3*(x+1)^3*(x^2+1)^3))) \\ G. C. Greubel, Jun 23 2017
KEYWORD
nonn,easy,less
AUTHOR
Paul Curtz, Mar 12 2012
STATUS
approved
A permutation of essentially the duplicate nonnegative numbers: a(4n) = n + 1/2 - (-1)^n/2, a(2n+1) = a(4n+2) = 2n+1.
+10
2
0, 1, 1, 3, 2, 5, 3, 7, 2, 9, 5, 11, 4, 13, 7, 15, 4, 17, 9, 19, 6, 21, 11, 23, 6, 25, 13, 27, 8, 29, 15, 31, 8, 33, 17, 35, 10, 37, 19, 39, 10, 41, 21, 43, 12, 45, 23, 47, 12, 49, 25, 51, 14, 53, 27, 55, 14, 57, 29, 59, 16, 61, 31, 63, 16
OFFSET
0,4
COMMENTS
A permutation of A004526 (n > 0).
0 is at its own place. Distance between the two (2*k+1)'s: 2*k+1 terms. 0 is in position 0, the first 1 in position 1, the second 1 in position 2, the first 2 in position 4, the second 2 in position 8. Hence, r(n) = 0, 1, 2, 4, 8, 3, 6, 12, 16, 5, 10, 20, 24, ..., a permutation of A001477. See A225055. The recurrence r(n) = r(n-4) + r(n-8) - r(n-12) is the same as for a(n).
A061037(n+3) is divisible by a(n+5) (= 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 3, ...). Hence a link, via A212831 and A214282, between the Catalan numbers A000108 and the Balmer series.
FORMULA
a(n) = 3*a(n-8) - 3*a(n-16) + a(n-24).
a(n+4) = a(n) + period 8: repeat [2, 4, 2, 4, 0, 4, 2, 4].
a(n+8) = a(n) + period 4: repeat [2, 8, 4, 8] (= 2 * A176895).
a(2n) = A212831(n).
a(n) = n*(1+floor((2-n)/4)+floor((n-2)/4))/2+n*(1+floor((1-n)/2)+floor((n-1)/2))+(-n-2+2*(-1)^(n/4))*(ceiling(n/4)-floor(n/4)-1)/4. - Wesley Ivan Hurt, Sep 14 2014
a(n) = a(n-4) + a(n-8) - a(n-12). - Charles R Greathouse IV, Sep 14 2014
G.f.: x*(x^10+x^9+3*x^8+4*x^6+2*x^5+4*x^4+2*x^3+3*x^2+x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2*(x^4+1)). - Colin Barker, Sep 15 2014
MAPLE
A246416:=n->n*(1+floor((2-n)/4)+floor((n-2)/4))/2+n*(1+floor((1-n)/2)+floor((n-1)/2))+(-n-2+2*(-1)^(n/4))*(ceil(n/4)-floor(n/4)-1)/4: seq(A246416(n), n=0..50); # Wesley Ivan Hurt, Sep 14 2014
MATHEMATICA
Table[n (1 + Floor[(2 - n)/4] + Floor[(n - 2)/4])/2 + n (1 + Floor[(1 - n)/2] + Floor[(n - 1)/2]) + (-n - 2 + 2 (-1)^(n/4)) (Ceiling[n/4] - Floor[n/4] - 1)/4, {n, 0, 50}] (* Wesley Ivan Hurt, Sep 14 2014 *)
a[n_] := Switch[Mod[n, 4], 0, n/4-(-1)^(n/4)/2+1/2, 1|3, n, 2, n/2]; Table[a[n], {n, 0, 64}] (* Jean-François Alcover, Oct 09 2014 *)
LinearRecurrence[{0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, -1}, {0, 1, 1, 3, 2, 5, 3, 7, 2, 9, 5, 11}, 70] (* Harvey P. Dale, Mar 23 2015 *)
PROG
(PARI) a(n)=if(n%4, n/(2-n%2), if(n%8, 1, 0)+n/4) \\ Charles R Greathouse IV, Sep 14 2014
(Magma) I:=[0, 1, 1, 3, 2, 5, 3, 7, 2, 9, 5, 11, 4, 13, 7, 15, 4, 17, 9, 19, 6, 21, 11, 23]; [n le 24 select I[n] else 3*Self(n-8)-3*Self(n-16)+Self(n-24): n in [1..80]]; // Vincenzo Librandi, Oct 15 2014
KEYWORD
nonn,easy,less
AUTHOR
Paul Curtz, Sep 14 2014
STATUS
approved
a(4n) = n + 1/2 - (-1)^n/2 + (-1)^n, a(2n+1) = 2*n + 5, a(4n+2) = 2*n + 3.
+10
2
1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 3, 17, 9, 19, 5, 21, 11, 23, 5, 25, 13, 27, 7, 29, 15, 31, 7, 33, 17, 35, 9, 37, 19, 39, 9, 41, 21, 43, 11, 45, 23, 47, 11, 49, 25, 51, 13, 53, 27, 55, 13, 57, 29, 59, 15, 61, 31, 63, 15, 65, 33, 67
OFFSET
0,2
COMMENTS
Essentially a permutation of A129756 (odd numbers repeated four times).
a(-1) = 3, a(-2) = a(-3) = 1.
Distance between the first two (2*k+1)'s: 2*k+1 terms. Distance between the last two (2*n+1)'s: 4 terms. Essentially same distances as in -a(-n) = -1, -3, -1, -1, 1, 1, 1, 3, 1, 5, 3, 7, 3, 9, 5, 11, 3, 13, 7, 15, 5, 17, 9, 19, 5, 21, 11, 23, 7, 25, 13, 27, 7, ... .
FORMULA
a(n) = a(n-4) + a(n-8) - a(n-12).
a(n) * A246416(n) = A061037(n+2).
A246416(n+4) - a(n) = sequence of period 4: [1, 0, 0, 0].
a(n+4) - a(n) = sequence of period 8: [0, 4, 2, 4, 2, 4, 2, 4].
G.f.: -(3*x^11+x^10+x^9-x^8-4*x^7-2*x^6-4*x^5-7*x^3-3*x^2-5*x-1) / ((x-1)^2*(x+1)^2*(x^2+1)^2*(x^4+1)). - Colin Barker, Sep 21 2014
a(n) = a(n-8) + sequence of period 4: [2, 8, 4, 8] (= 2*A176895(n)).
a(-n) * A246416(-n) = A061037(n-2).
a(n) = (n+4)*(1-ceiling((2-n)/4)-ceiling((n-2)/4))/2+(n+4)*(1+floor((1-n)/2)+floor((n-1)/2))-(n+2+2(-1)^(n/4))*(ceiling(n/4)-floor(n/4)-1)/4. - Wesley Ivan Hurt, Sep 21 2014
MAPLE
A247617:=n->(n+4)*(1-ceil((2-n)/4)-ceil((n-2)/4))/2+(n+4)*(1+floor((1-n)/2)+floor((n-1)/2))-(n+2+2*(-1)^(n/4))*(ceil(n/4)-floor(n/4)-1)/4: seq(A247617(n), n=0..50); # Wesley Ivan Hurt, Sep 21 2014
MATHEMATICA
Table[(n + 4) (1 - Ceiling[(2 - n)/4] - Ceiling[(n - 2)/4])/2 + (n + 4) (1 + Floor[(1 - n)/2] + Floor[(n - 1)/2]) - (n + 2 + 2 (-1)^(n/4)) (Ceiling[n/4] - Floor[n/4] - 1)/4, {n, 0, 50}] (* Wesley Ivan Hurt, Sep 21 2014 *)
PROG
(PARI) Vec(-(3*x^11+x^10+x^9-x^8-4*x^7-2*x^6-4*x^5-7*x^3-3*x^2-5*x-1)/((x-1)^2*(x+1)^2*(x^2+1)^2*(x^4+1)) + O(x^100)) \\ Colin Barker, Sep 21 2014
(Magma) I:=[1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15]; [n le 12 select I[n] else Self(n-4)+Self(n-8)-Self(n-12): n in [1..80]]; // Vincenzo Librandi, Oct 15 2014
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Sep 21 2014
STATUS
approved
a(4*n) = n-1. a(2*n+1) = a(4*n+2) = 2*n+1.
+10
1
-1, 1, 1, 3, 0, 5, 3, 7, 1, 9, 5, 11, 2, 13, 7, 15, 3, 17, 9, 19, 4, 21, 11, 23, 5, 25, 13, 27, 6, 29, 15, 31, 7, 33, 17, 35, 8, 37, 19, 39, 9, 41, 21, 43, 10, 45, 23, 47, 11, 49, 25, 51, 12, 53, 27, 55, 13, 57, 29, 59, 14, 61, 31, 63, 15, 65, 33, 67, 16, 69
OFFSET
0,4
COMMENTS
Consider the family of sequences with recurrence a(n) = 2*a(n-4)-a(n-8) where a(0) and a(4) move up in steps of 1. This here is characterized by a(0)=-1, a(4)=0:
-2, 1, 1, 3, -1, 5, 3, 7, 0, 9, 5, 11,...
-1, 1, 1, 3, 0, 5, 3, 7, 1, 9, 5, 11,... = a(n)
0, 1, 1, 3, 1, 5, 3, 7, 2, 9, 5, 11,... = A060819
1, 1, 1, 3, 2, 5, 3, 7, 3, 9, 5, 11,... = b(n)
2, 1, 1, 3, 3, 5, 3, 7, 4, 9, 5, 11,... .
a(n+4)+b(n) = A145979(n).
a(n+4)*b(n) = A061037(n+2).
a(n+4)-b(n) = repeat -1, 4, 2, 4 with period of length 4.
FORMULA
a(n) = 2*a(n-4) - a(n-8).
a(n+4) - a(n) = A176895(n).
G.f.: (-1+x+x^2+3*x^3+3*x^5+x^6+x^7+2*x^4)/((-1+x)^2*(1+x)^2*(x^2+1)^2). - R. J. Mathar, Apr 28 2013
MATHEMATICA
a[n_] := 1/16*(11*n-(-1)^n*(5*n+4)-2*(n+4)*Re[I^n]-4); Table[a[n], {n, 0, 47}] (* Jean-François Alcover, Apr 30 2013 *)
LinearRecurrence[{0, 0, 0, 2, 0, 0, 0, -1}, {-1, 1, 1, 3, 0, 5, 3, 7}, 80] (* Harvey P. Dale, Jul 14 2019 *)
PROG
(PARI) x='x+O('x^50); Vec((-1+x+x^2+3*x^3+3*x^5+x^6+x^7+2*x^4)/((-1+x)^2*(1+x)^2*(x^2+1)^2)) \\ G. C. Greubel, Sep 20 2018
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((-1+x+x^2+3*x^3+3*x^5+x^6+x^7+2*x^4)/((-1+x)^2*(1+x)^2*(x^2+1)^2))); // G. C. Greubel, Sep 20 2018
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Apr 26 2013
STATUS
approved
a(n) = n^2 / gcd(n+2, 4).
+10
1
0, 1, 1, 9, 8, 25, 9, 49, 32, 81, 25, 121, 72, 169, 49, 225, 128, 289, 81, 361, 200, 441, 121, 529, 288, 625, 169, 729, 392, 841, 225, 961, 512, 1089, 289, 1225, 648, 1369, 361, 1521, 800, 1681, 441, 1849, 968, 2025, 529, 2209, 1152, 2401, 625, 2601, 1352
OFFSET
0,4
COMMENTS
A061038(n), which appears in 4*a(n) formula, is a permutation of n^2.
Origin. In December 2010, I wrote in my 192-page Exercise Book no. 5, page 41, the array (difference table of the first row):
1 0, 1/3, 1, 9/5, 8/3, 25/7, 9/2, 49/9, ...
-1, 1/3, 2/3, 4/5, 13/15, 19/21, 13/14, 17/18, 43/45, ...
Numerators are listed in A176126, denominators are in A064038, and denominator - numerator = 2, 2, 1, 1,... (A014695).
4/3, 1/3, 2/15, 1/15, 4/105, 1/42, 1/63, 1/90, 4/495, ...
-1, -1/5, -1/15, -1/35, -1/70, -1/126, -1/210, -1/330, -1/495, ...
where the denominators of the second row are listed in A000332.
Also for those of the inverse binomial transform
1, -1, 4/3, -1, 4/5, -2/3, 4/7, -1/2, 4/9, -2/5, 4/11, -1/3, ... ?
a(n) is the (n+1)-th term of the numerators of the first row.
FORMULA
a(n) = n^2/(period 4: repeat 2, 1, 4, 1).
a(4n) = 8*n^2, a(2n+1) = a(4n+2) = (2*n+1)^2.
a(n+4) = a(n) + 8*A060819(n).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12), n>11.
4*a(n) = (period 4: repeat 2, 1, 4, 1) * A061038(n).
G.f.: -x*(x^10+x^9+9*x^8+8*x^7+22*x^6+6*x^5+22*x^4+8*x^3+9*x^2+x+1) / ((x-1)^3*(x+1)^3*(x^2+1)^3). - Colin Barker, May 14 2015
a(2n) = A181900(n), a(2n+1) = A016754(n). [Bruno Berselli, May 14 2015]
a(n) = ( 1 - (1/16)*(1+(-1)^n)*(5-(-1)^(n/2)) )*n^2. - Bruno Berselli, May 14 2015
Sum_{n>=1} 1/a(n) = 13*Pi^2/48. - Amiram Eldar, Aug 12 2022
EXAMPLE
a(0) = 0/2, a(1) = 1/1, a(2) = 4/4, a(3) = 9/1.
MAPLE
seq(seq((4*i+j-1)^2/[2, 1, 4, 1][j], j=1..4), i=0..30); # Robert Israel, May 14 2015
MATHEMATICA
f[n_] := Switch[ Mod[n, 4], 0, n^2/2, 1, n^2, 2, n^2/4, 3, n^2]; Array[f, 50, 0] (* or *) Table[(4 i + j - 1)^2/{2, 1, 4, 1}[[j]], {i, 0, 12}, {j, 4}] // Flatten (* after Robert Israel *) (* or *) LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {0, 1, 1, 9, 8, 25, 9, 49, 32, 81, 25, 121}, 53] (* or *) CoefficientList[ Series[-((x (1 + x (1 + x (9 + x (8 + x (22 + x (6 + x (22 + x (8 + x (9 + x + x^2))))))))))/(-1 + x^4)^3), {x, 0, 52}], x] (* Robert G. Wilson v, May 19 2015 *)
PROG
(PARI) concat(0, Vec(-x*(x^10 + x^9 + 9*x^8 + 8*x^7 + 22*x^6 + 6*x^5 + 22*x^4 + 8*x^3 + 9*x^2 + x + 1) / ((x-1)^3*(x+1)^3*(x^2+1)^3) + O(x^100))) \\ Colin Barker, May 14 2015
(Magma) [(1-(1/16)*(1+(-1)^n)*(5-(-1)^(n div 2)) )*n^2: n in [0..60]]; // Vincenzo Librandi, Jun 12 2015
KEYWORD
nonn,easy,mult
AUTHOR
Paul Curtz, May 08 2015
EXTENSIONS
Missing term (1521) inserted in the sequence by Colin Barker, May 14 2015
Definition uses a formula by Jean-François Alcover, Jul 01 2015
Keyword:mult added by Andrew Howroyd, Aug 06 2018
STATUS
approved

Search completed in 0.012 seconds