[go: up one dir, main page]

login
Search: a047615 -id:a047615
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers that are congruent to {1, 4} mod 8.
+10
28
1, 4, 9, 12, 17, 20, 25, 28, 33, 36, 41, 44, 49, 52, 57, 60, 65, 68, 73, 76, 81, 84, 89, 92, 97, 100, 105, 108, 113, 116, 121, 124, 129, 132, 137, 140, 145, 148, 153, 156, 161, 164, 169, 172, 177, 180, 185, 188, 193, 196, 201, 204, 209, 212, 217, 220, 225, 228, 233
OFFSET
1,2
COMMENTS
Maximal number of squares that can be covered by a queen on an n X n chessboard. - Reinhard Zumkeller, Dec 15 2008
FORMULA
From R. J. Mathar, Oct 29 2008: (Start)
G.f.: x*(1+3*x+4*x^2)/((1+x)*(1-x)^2).
a(n) = a(n-2) + 8.
a(n) + a(n+1) = A004770(n).
a(n+1) - a(n) = A010703(n). (End)
a(n) = 8*floor((n-1)/2) + 4 - 3*(n mod 2). - Reinhard Zumkeller, Dec 15 2008
a(n) = A153125(n,n). - Reinhard Zumkeller, Dec 20 2008
a(n) = 8*n - a(n-1) - 11 (with a(1)=1). - Vincenzo Librandi, Aug 06 2010
a(n) = 4*n - (7 + (-1)^n)/2. - Arkadiusz Wesolowski, Sep 18 2012
a(1)=1, a(2)=4, a(3)=9, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Jun 18 2013
a(n) = 1 + A004526(n)*3 + A004526(n-1)*5. - Gregory R. Bryant, Apr 16 2014
From Franck Maminirina Ramaharo, Jul 22 2018: (Start)
a(n) = A047470(n) + 1.
E.g.f.: (8 - exp(-x) + (8*x - 7)*exp(x))/2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+1)*Pi/16 + log(2)/4 + sqrt(2)*arccoth(sqrt(2))/8. - Amiram Eldar, Dec 11 2021
MAPLE
seq(coeff(series(factorial(n)*((8-exp(-x)+(8*x-7)*exp(x))/2), x, n+1), x, n), n=1..60); # Muniru A Asiru, Jul 23 2018
MATHEMATICA
Flatten[(#+{1, 4})&/@(8Range[0, 30])] (* or *) LinearRecurrence[ {1, 1, -1}, {1, 4, 9}, 60] (* Harvey P. Dale, Jun 18 2013 *)
CoefficientList[ Series[(4x^2 + 3x + 1)/((x + 1) (x - 1)^2), {x, 0, 58}], x] (* Robert G. Wilson v, Jul 24 2018 *)
PROG
(Maxima) makelist(4*n -(7 + (-1)^n)/2, n, 1, 100); /* Franck Maminirina Ramaharo, Jul 22 2018 */
(GAP) Filtered([1..250], n->n mod 8=1 or n mod 8 =4); # Muniru A Asiru, Jul 23 2018
(Magma) [4*n-3 - ((n+1) mod 2): n in [1..70]]; // G. C. Greubel, Mar 15 2024
(SageMath) [4*n-3 - ((n+1)%2) for n in range(1, 71)] # G. C. Greubel, Mar 15 2024
(Python)
def A047461(n): return (n-1<<2)|(n&1) # Chai Wah Wu, Mar 30 2024
KEYWORD
nonn,easy
STATUS
approved
Numbers that are congruent to {0, 3} mod 8.
+10
21
0, 3, 8, 11, 16, 19, 24, 27, 32, 35, 40, 43, 48, 51, 56, 59, 64, 67, 72, 75, 80, 83, 88, 91, 96, 99, 104, 107, 112, 115, 120, 123, 128, 131, 136, 139, 144, 147, 152, 155, 160, 163, 168, 171, 176, 179, 184, 187, 192, 195, 200, 203, 208, 211, 216, 219, 224, 227, 232
OFFSET
1,2
COMMENTS
Maximum number of squares attacked by a queen on an n X n chessboard. - Stewart Gordon, Mar 23 2001
Equivalently, maximum vertex degree in the n X n queen graph. - Eric W. Weisstein, Jun 20 2017
Number of squares attacked by a queen on a toroidal chessboard. - Diego Torres (torresvillarroel(AT)hotmail.com), May 19 2001
List of squared distances between points of diamond 'lattice' with minimal distance sqrt(3). - Arnold Neumaier (Arnold.Neumaier(AT)univie.ac.at), Aug 01 2003
Draw a figure-eight knot diagram on the plane and assign a list of nonnegative numbers at each crossing as follows. Start with 0 and choose a crossing on the knot. Pick a direction and walk around the knot, appending the following nonnegative number everytime a crossing is visited. Two series of sequences are obtained: this sequence, A047535, A047452, A047617 and A047615, A047461, A047452, A047398 (see example). - Franck Maminirina Ramaharo, Jul 22 2018
LINKS
Eric Weisstein's World of Mathematics, Maximum Vertex Degree.
Eric Weisstein's World of Mathematics, Queen Graph.
FORMULA
a(n) = a(n-1) + 4 + (-1)^n.
a(n) = a(n-1) + a(n-2) - a(n-3).
a(n) = A042948(n) + A005843(n).
G.f.: (3x+5*x^2)/((1-x)*(1-x^2)).
a(n) = 8*n - a(n-1) - 13 (with a(1)=0). - Vincenzo Librandi, Aug 06 2010
a(n+1) = Sum_{k>=0} A030308(n,k)*A171497(k). - Philippe Deléham, Oct 17 2011
a(n) = 4*n -(9 + (-1)^n)/2. - Arkadiusz Wesolowski, Sep 18 2012
E.g.f: (10 - exp(-x) + (8*x - 9)*exp(x))/2. - Franck Maminirina Ramaharo, Jul 22 2018
Sum_{n>=2} (-1)^n/a(n) = (sqrt(2)-1)*Pi/16 + log(2)/2 - sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 11 2021
EXAMPLE
From Franck Maminirina Ramaharo, Jul 22 2018: (Start)
Consider the following equivalent figure-eight knot diagrams:
+---------------------+ +-----------------n
| | | |
| +---------B-----+ | w-----A---e
| | | | | | | |
| n-----C---+ | | | | | |
| | | | | | <=> | +-------B-----s |
| | +---D-----+ | | | | |
| | | | | | | |
w-----A---------e | +---C-------D---------+
| | | |
s---------------------+ +-------+
Uppercases A,B,C,D denote crossings, and lowercases n,s,w,e denote directions. Due to symmetry and ambient isotopy, all possible sequences are obtained by starting from crossing A and choose either direction 'n' or 's'.
Direction 'n':
A: 0, 3, 8, 11, 16, 19, 24, 27, 32, 35, 40, ... (this sequence);
B: 4, 7, 12, 15, 20, 23, 28, 31, 36, 39, 44, ... A047535;
C: 1, 6, 9, 14, 17, 22, 25, 30, 33, 38, 41, ... A047452;
D: 2, 5, 10, 13, 18, 21, 26, 29, 34, 37, 42, ... A047617.
Direction 's':
A: 0, 5, 8, 13, 16, 21, 24, 29, 32, 37, 40, ... A047615;
B: 1, 4, 9, 12, 17, 20, 25, 28, 33, 36, 41, ... A047461;
C: 2, 7, 10, 15, 18, 23, 26, 31, 34, 39, 42, ... A047524;
D: 3, 6, 11, 14, 19, 22, 27, 30, 35, 38, 43, ... A047398.
(End)
MAPLE
a:=n->add(4+(-1)^j, j=1..n):seq(a(n), n=0..64); # Zerinvary Lajos, Dec 13 2008
MATHEMATICA
With[{c = 8 Range[0, 30]}, Sort[Join[c, c + 3]]] (* Harvey P. Dale, Oct 11 2011 *)
Table[(8 n - 9 - (-1)^n)/2, {n, 20}] (* Eric W. Weisstein, Jun 20 2017 *)
LinearRecurrence[{1, 1, -1}, {0, 3, 8}, 20] (* Eric W. Weisstein, Jun 20 2017 *)
CoefficientList[Series[(x (3 + 5 x))/((-1 + x)^2 (1 + x)), {x, 0, 20}], x] (* Eric W. Weisstein, Jun 20 2017 *)
PROG
(PARI) forstep(n=0, 200, [3, 5], print1(n", ")) \\ Charles R Greathouse IV, Oct 17 2011
(GAP) a:=[0, 3, 8];; for n in [4..50] do a[n]:=a[n-1]+a[n-2]-a[n-3]; od; a; # Muniru A Asiru, Jul 23 2018
(Python)
def A047470(n): return (n-1<<2)-(n&1^1) # Chai Wah Wu, Mar 30 2024
KEYWORD
nonn,easy
EXTENSIONS
More terms from Vincenzo Librandi, Aug 06 2010
STATUS
approved
Numbers that are congruent to {1, 6} mod 8.
+10
19
1, 6, 9, 14, 17, 22, 25, 30, 33, 38, 41, 46, 49, 54, 57, 62, 65, 70, 73, 78, 81, 86, 89, 94, 97, 102, 105, 110, 113, 118, 121, 126, 129, 134, 137, 142, 145, 150, 153, 158, 161, 166, 169, 174, 177, 182, 185, 190
OFFSET
1,2
COMMENTS
Except for 1, numbers whose binary reflected Gray code (A014550) ends with 01. - Amiram Eldar, May 17 2021
FORMULA
G.f.: x*(1+5*x+2*x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Dec 07 2011
E.g.f.: (4 + exp(-x) + (8*x - 5)*exp(x))/2. - Ilya Gutkovskiy, May 25 2016
a(n) = A047615(n) + 1. - Franck Maminirina Ramaharo, Jul 23 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+2)*Pi/16 + log(2)/8 + sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 11 2021
MAPLE
seq(coeff(series(factorial(n)*((4+exp(-x)+(8*x-5)*exp(x))/2), x, n+1), x, n), n=1..60); # Muniru A Asiru, Jul 24 2018
MATHEMATICA
Table[(8 n - 5 + (-1)^n)/2, {n, 1, 100}] (* Franck Maminirina Ramaharo, Jul 23 2018 *)
CoefficientList[ Series[(2x^2 + 5x + 1)/((x - 1)^2 (x + 1)), {x, 0, 50}], x] (* or *)
LinearRecurrence[{1, 1, -1}, {1, 6, 9}, 51] (* Robert G. Wilson v, Jul 24 2018 *)
PROG
(Maxima) makelist((8*n - 5 + (-1)^n)/2, n, 1, 100); /* Franck Maminirina Ramaharo, Jul 23 2018 */
(GAP) Filtered([0..250], n->n mod 8=1 or n mod 8=6); # Muniru A Asiru, Jul 24 2018
(Python)
def A047452(n): return (n<<2)-2-(n&1) # Chai Wah Wu, Mar 30 2024
KEYWORD
nonn,easy
STATUS
approved
Numbers that are congruent to {2, 5} mod 8.
+10
19
2, 5, 10, 13, 18, 21, 26, 29, 34, 37, 42, 45, 50, 53, 58, 61, 66, 69, 74, 77, 82, 85, 90, 93, 98, 101, 106, 109, 114, 117, 122, 125, 130, 133, 138, 141, 146, 149, 154, 157, 162, 165, 170, 173, 178, 181, 186, 189, 194, 197, 202, 205, 210, 213, 218, 221, 226, 229, 234
OFFSET
1,1
COMMENTS
Numbers whose binary reflected Gray code (A014550) ends with 11. - Amiram Eldar, May 17 2021
FORMULA
a(n) = 8*n - a(n-1) - 9 (with a(1)=2). - Vincenzo Librandi, Aug 06 2010
a(n) = 4*n - (5 + (-1)^n)/2. - Arkadiusz Wesolowski, Sep 18 2012
G.f.: (2+3*x+3*x^2)/((-1+x)^2*(1+x)). - Harvey P. Dale, Feb 23 2016
a(1)=2, a(2)=5, a(3)=10, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Feb 23 2016
From Franck Maminirina Ramaharo, Jul 22 2018: (Start)
a(n) = A047470(n) + 2.
E.g.f.: (6 - exp(-x) + (8*x - 5)*exp(x))/2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2)*Pi/16 - log(2)/8 + sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 11 2021
MATHEMATICA
Select[Range[300], MemberQ[{2, 5}, Mod[#, 8]]&] (* or *) LinearRecurrence[ {1, 1, -1}, {2, 5, 10}, 80] (* Harvey P. Dale, Feb 23 2016 *)
PROG
(Maxima) makelist(4*n -(5 + (-1)^n)/2, n, 1, 100); /* Franck Maminirina Ramaharo, Jul 22 2018 */
(Python)
def A047617(n): return (n-1<<2)+1+(n&1) # Chai Wah Wu, Mar 30 2024
KEYWORD
nonn,easy
EXTENSIONS
More terms from Vincenzo Librandi, Aug 06 2010
STATUS
approved
Numbers that are congruent to {2, 7} mod 8.
+10
18
2, 7, 10, 15, 18, 23, 26, 31, 34, 39, 42, 47, 50, 55, 58, 63, 66, 71, 74, 79, 82, 87, 90, 95, 98, 103, 106, 111, 114, 119, 122, 127, 130, 135, 138, 143, 146, 151, 154, 159, 162, 167, 170, 175, 178, 183, 186, 191, 194, 199, 202, 207, 210, 215, 218, 223, 226, 231, 234
OFFSET
1,1
COMMENTS
A195605 is a subsequence. - Bruno Berselli, Sep 21 2011
FORMULA
a(n) = 8*n - a(n-1) - 7, n > 1. - Vincenzo Librandi, Aug 06 2010
From R. J. Mathar, Mar 22 2011: (Start)
a(n) = 4*n - 3/2 + (-1)^n/2.
G.f.: x*(2+5*x+x^2) / ( (1+x)*(x-1)^2 ). (End)
From Franck Maminirina Ramaharo, Aug 06 2018: (Start)
a(n) = 4*n - (n mod 2) - 1.
a(n) = A047615(n) + 2.
a(2*n) = A004771(n-1).
a(2*n-1) = A017089(n-1).
E.g.f.: ((8*x - 3)*exp(x) + exp(-x) + 2)/2. (End)
a(n) = a(n-1) + a(n-2) - a(n-3). - Muniru A Asiru, Aug 06 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+2)*Pi/16 - log(2)/8 - sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 11 2021
MAPLE
seq(coeff(series(x*(2+5*x+x^2)/((1+x)*(1-x)^2), x, n+1), x, n), n=1..60); # Muniru A Asiru, Aug 06 2018
MATHEMATICA
Select[Range[300], MemberQ[{2, 7}, Mod[#, 8]]&] (* or *)
LinearRecurrence[ {1, 1, -1}, {2, 7, 10}, 60] (* Harvey P. Dale, Nov 05 2017 *)
CoefficientList[ Series[(x^2 + 5x + 2)/((x - 1)^2 (x + 1)), {x, 0, 60}], x] (* Robert G. Wilson v, Aug 07 2018 *)
PROG
(Maxima) makelist(4*n - mod(n, 2) - 1, n, 1, 100); /* Franck Maminirina Ramaharo, Aug 06 2018 */
(PARI) is(n) = #setintersect([n%8], [2, 7]) > 0 \\ Felix Fröhlich, Aug 06 2018
(GAP) Filtered([0..250], n->n mod 8=2 or n mod 8=7); # Muniru A Asiru, Aug 06 2018
(Python)
def A047524(n): return (n<<2)-1-(n&1) # Chai Wah Wu, Mar 30 2024
KEYWORD
nonn,easy
EXTENSIONS
More terms from Vincenzo Librandi, Aug 06 2010
STATUS
approved
Numbers that are congruent to {4, 7} mod 8.
+10
17
4, 7, 12, 15, 20, 23, 28, 31, 36, 39, 44, 47, 52, 55, 60, 63, 68, 71, 76, 79, 84, 87, 92, 95, 100, 103, 108, 111, 116, 119, 124, 127, 132, 135, 140, 143, 148, 151, 156, 159, 164, 167, 172, 175, 180, 183, 188, 191, 196, 199, 204, 207, 212, 215, 220, 223, 228, 231
OFFSET
1,1
COMMENTS
Union of A004771 and A017113.
FORMULA
a(n) = 8*n - a(n-1) - 5 (with a(1)=4). - Vincenzo Librandi, Aug 06 2010
a(n) = 4*n -(1 + (-1)^n)/2. - Arkadiusz Wesolowski, Sep 18 2012
G.f.: x*(4+3*x+x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Jul 10 2015
From Franck Maminirina Ramaharo, Jul 22 2018: (Start)
a(n) = A047470(n) + 4.
E.g.f.: (2 - exp(-x) + (8*x - 1)*exp(x))/2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+1)*Pi/16 - log(2)/4 - sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 11 2021
MAPLE
A047535:=n->4*n - (1 + (-1)^n)/2; seq(A047535(n), n=1..100); # Wesley Ivan Hurt, Feb 24 2014
MATHEMATICA
Table[4n - (1 + (-1)^n)/2, {n, 100}] (* Wesley Ivan Hurt, Feb 24 2014 *)
PROG
(Maxima) makelist(4*n - (1 + (-1)^n)/2, n, 1, 100); /* Franck Maminirina Ramaharo, Jul 22 2018 */
(Python)
def A047535(n): return (n<<2)-(n&1^1) # Chai Wah Wu, Mar 30 2024
KEYWORD
nonn,easy
STATUS
approved
Numbers that are congruent to {3, 6} mod 8.
+10
16
3, 6, 11, 14, 19, 22, 27, 30, 35, 38, 43, 46, 51, 54, 59, 62, 67, 70, 75, 78, 83, 86, 91, 94, 99, 102, 107, 110, 115, 118, 123, 126, 131, 134, 139, 142, 147, 150, 155, 158, 163, 166, 171, 174, 179, 182, 187, 190, 195, 198, 203, 206, 211, 214, 219, 222, 227, 230
OFFSET
1,1
FORMULA
a(n) = 8*n - a(n-1) - 7, n > 1. - Vincenzo Librandi, Aug 05 2010
From R. J. Mathar, Dec 05 2011: (Start)
a(n) = 4*n - (3 + (-1)^n)/2.
G.f.: x*(3+3*x+2*x^2) / ( (1+x)*(x-1)^2 ). (End)
From Franck Maminirina Ramaharo, Aug 06 2018: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3), n > 3.
a(n) = 4*n + (n mod 2) - 2.
a(n) = A047470(n) + 3.
a(2*n) = A017137(n-1).
a(2*n-1) = A017101(n-1).
E.g.f.: ((8*x - 3)*exp(x) - exp(-x) + 4)/2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2)*Pi/16 + log(2)/8 - sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 18 2021
MAPLE
A047398:=n->4*n-(3+(-1)^n)/2: seq(A047398(n), n=1..100); # Wesley Ivan Hurt, Jan 30 2017
MATHEMATICA
Flatten[# + {3, 6} & /@ (8 Range[0, 28])] (* Arkadiusz Wesolowski, Sep 25 2012 *)
LinearRecurrence[{1, 1, -1}, {3, 6, 11}, 60] (* Harvey P. Dale, Oct 26 2020 *)
PROG
(Maxima) makelist(4*n + mod(n, 2) - 2, n, 1, 100); /* Franck Maminirina Ramaharo, Aug 06 2018 */
(Python)
def A047398(n): return ((n<<2)|(n&1))-2 # Chai Wah Wu, Mar 30 2024
CROSSREFS
KEYWORD
nonn,easy
STATUS
approved
Numbers that are congruent to {0, 2, 5, 7} mod 8.
+10
2
0, 2, 5, 7, 8, 10, 13, 15, 16, 18, 21, 23, 24, 26, 29, 31, 32, 34, 37, 39, 40, 42, 45, 47, 48, 50, 53, 55, 56, 58, 61, 63, 64, 66, 69, 71, 72, 74, 77, 79, 80, 82, 85, 87, 88, 90, 93, 95, 96, 98, 101, 103, 104, 106, 109, 111, 112, 114, 117, 119, 120, 122, 125
OFFSET
1,2
COMMENTS
Complement of A047415.
FORMULA
From Colin Barker, May 14 2012: (Start)
a(n) = (1/4+i/4)*((-3+3*i)-i*(-i)^n+i^n+(4-4*i)*n) where i=sqrt(-1).
G.f.: x^2*(2+x+x^2)/((1-x)^2*(1+x^2)). (End)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4. - Vincenzo Librandi, May 16 2012
a(n) = (-1*((-1)^((n-1)/2-(-1)^n/4-1/4)))/2+2*(n-1)+1/2.
a(n) = cos(n*Pi/2)-1/2*cos((n-1)*Pi/2)-1/2*cos(n*Pi/2)+2*(n-1)+1/2. - Cédric Christian Bernard Gagneux, Mar 05 2014
a(2k) = A047524, a(2k-1) = A047615(k). - Wesley Ivan Hurt, Jun 01 2016
E.g.f.: (2 - sin(x) + cos(x) + (4*x - 3)*exp(x))/2. - Ilya Gutkovskiy, Jun 02 2016
Sum_{n>=2} (-1)^n/a(n) = (3-sqrt(2))*log(2)/8 + sqrt(2)*log(2+sqrt(2))/4 - Pi/16. - Amiram Eldar, Dec 21 2021
MAPLE
A047481:=n->(-1*((-1)^((n-1)/2-(-1)^n/4-1/4)))/2+2*(n-1)+1/2: seq(A047481(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
MATHEMATICA
Select[Range[0, 300], MemberQ[{0, 2, 5, 7}, Mod[#, 8]]&] (* Vincenzo Librandi, May 16 2012 *)
LinearRecurrence[{2, -2, 2, -1}, {0, 2, 5, 7}, 70] (* Harvey P. Dale, May 28 2017 *)
PROG
(Magma) I:=[0, 2, 5, 7, 8]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // Vincenzo Librandi, May 16 2012
(PARI) a(n)=[-1, 0, 2, 5][n%4]+n\4*8 \\ Charles R Greathouse IV, Mar 05 2014
(PARI) x='x+O('x^100); concat(0, Vec(x^2*(2+x+x^2)/((1-x)^2*(1+x^2)))) \\ Altug Alkan, Dec 24 2015
CROSSREFS
KEYWORD
nonn,easy
STATUS
approved
Numbers that are congruent to {0, 4, 5, 6} mod 8.
+10
1
0, 4, 5, 6, 8, 12, 13, 14, 16, 20, 21, 22, 24, 28, 29, 30, 32, 36, 37, 38, 40, 44, 45, 46, 48, 52, 53, 54, 56, 60, 61, 62, 64, 68, 69, 70, 72, 76, 77, 78, 80, 84, 85, 86, 88, 92, 93, 94, 96, 100, 101, 102, 104, 108, 109, 110, 112, 116, 117, 118, 120, 124
OFFSET
1,2
FORMULA
G.f.: x^2*(4+x+x^2+2*x^3) / ( (1+x)*(x^2+1)*(x-1)^2 ). - R. J. Mathar, Dec 07 2011
From Wesley Ivan Hurt, May 25 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (8*n-5+i^(2*n)-(2+i)*i^(-n)-(2-i)*i^n)/4 where i=sqrt(-1).
a(2k) = A047406(k), a(2k-1) = A047615(k). (End)
E.g.f.: (4 - sin(x) - 2*cos(x) + (4*x - 3)*sinh(x) + (4*x - 2)*cosh(x))/2. - Ilya Gutkovskiy, May 25 2016
Sum_{n>=2} (-1)^n/a(n) = sqrt(2)*log(2+sqrt(2))/8 - (2-sqrt(2))*(Pi-log(2))/16. - Amiram Eldar, Dec 23 2021
MAPLE
A047430:=n->(8*n-5+I^(2*n)-(2+I)*I^(-n)-(2-I)*I^n)/4: seq(A047430(n), n=1..100); # Wesley Ivan Hurt, May 25 2016
MATHEMATICA
Table[(8n-5+I^(2n)-(2+I)*I^(-n)-(2-I)*I^n)/4, {n, 80}] (* Wesley Ivan Hurt, May 25 2016 *)
Select[Range[0, 124], MemberQ[{0, 4, 5, 6}, Mod[#, 8]] &] (* Michael De Vlieger, May 25 2016 *)
LinearRecurrence[{1, 0, 0, 1, -1}, {0, 4, 5, 6, 8}, 100] (* Harvey P. Dale, Aug 05 2023 *)
PROG
(Magma) [n : n in [0..150] | n mod 8 in [0, 4, 5, 6]]; // Wesley Ivan Hurt, May 25 2016
CROSSREFS
KEYWORD
nonn,easy
STATUS
approved
Numbers that are congruent to {0, 1, 5, 6} mod 8.
+10
1
0, 1, 5, 6, 8, 9, 13, 14, 16, 17, 21, 22, 24, 25, 29, 30, 32, 33, 37, 38, 40, 41, 45, 46, 48, 49, 53, 54, 56, 57, 61, 62, 64, 65, 69, 70, 72, 73, 77, 78, 80, 81, 85, 86, 88, 89, 93, 94, 96, 97, 101, 102, 104, 105, 109, 110, 112, 113, 117, 118, 120, 121, 125
OFFSET
1,3
FORMULA
a(n+1) = Sum_{k>=0} A030308(n,k)*b(k) with b(0)=1, b(1)=5 and b(k)=2^(k+1) for k>1. - Philippe Deléham, Oct 19 2011
G.f.: x^2*(1+4*x+x^2+2*x^3) / ( (1+x)*(x^2+1)*(x-1)^2 ). - R. J. Mathar, Dec 07 2011
a(n) = Sum_{i=1..n} gcd(i+2, i-2). - Wesley Ivan Hurt, Jan 23 2014
From Wesley Ivan Hurt, May 22 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = 2n+(1+i)*(4i-4-(1-i)*i^(2n)-i^(1-n)+i^n)/4 where i=sqrt(-1).
a(2n) = A047452, a(2n-1) = A047615(n). (End)
Sum_{n>=2} (-1)^n/a(n) = (2*sqrt(2)-1)*Pi/16 + (3-sqrt(2))*log(2)/8 + sqrt(2)*log(2+sqrt(2))/4. - Amiram Eldar, Dec 20 2021
MAPLE
A047439:=n->add(gcd(i+2, i-2), i=1..n); seq(A047439(n), n=0..100); # Wesley Ivan Hurt, Jan 23 2014
MATHEMATICA
Table[Sum[GCD[i + 2, i - 2], {i, n}], {n, 0, 100}] (* Wesley Ivan Hurt, Jan 23 2014 *)
PROG
(Magma) [n : n in [0..150] | n mod 8 in [0, 1, 5, 6]]; // Wesley Ivan Hurt, May 22 2016
CROSSREFS
KEYWORD
nonn,easy
EXTENSIONS
More terms from Wesley Ivan Hurt, May 22 2016
STATUS
approved

Search completed in 0.010 seconds