1, 2, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19, 22, 21, 24, 23, 26, 25, 28, 27, 30, 29, 32, 31, 34, 33, 36, 35, 38, 37, 40, 39, 42, 41, 44, 43, 46, 45, 48, 47, 50, 49, 52, 51, 54, 53, 56, 55, 58, 57, 60, 59, 62, 61, 64, 63, 66, 65, 68, 67, 70, 69, 72, 71
Offset: 1
A141310
The odd numbers interlaced with the constant-2 sequence.
Original entry on oeis.org
1, 2, 3, 2, 5, 2, 7, 2, 9, 2, 11, 2, 13, 2, 15, 2, 17, 2, 19, 2, 21, 2, 23, 2, 25, 2, 27, 2, 29, 2, 31, 2, 33, 2, 35, 2, 37, 2, 39, 2, 41, 2, 43, 2, 45, 2, 47, 2, 49, 2, 51, 2, 53, 2, 55, 2, 57, 2, 59, 2, 61, 2, 63, 2, 65, 2, 67, 2, 69, 2, 71, 2, 73, 2, 75, 2, 77, 2, 79, 2, 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, 97
Offset: 0
Cf.
A000004,
A000012,
A000142,
A005408,
A008586,
A017593,
A059841,
A060747,
A109613,
A140811,
A211374,
A319702 (rgs-transform).
-
a:= n-> n+1-(n-1)*(n mod 2): seq(a(n), n=0..96); # Wesley Ivan Hurt, Jun 05 2013
-
Flatten[Table[{2 n - 1, 2}, {n, 40}]] (* Alonso del Arte, Jun 15 2013 *)
Riffle[Range[1, 79, 2], 2] (* Alonso del Arte, Jun 14 2013 *)
Table[((-1)^n (n - 1) + n + 3)/2, {n, 0, 20}] (* Eric W. Weisstein, Apr 11 2018 *)
Table[Floor[(n + 1)/2]/(n + 1), {n, 0, 20}] // Denominator (* Eric W. Weisstein, Apr 11 2018 *)
LinearRecurrence[{0, 2, 0, -1}, {2, 3, 2, 5}, {0, 20}] (* Eric W. Weisstein, Apr 11 2018 *)
CoefficientList[Series[(1 + 2 x + x^2 - 2 x^3)/(-1 + x^2)^2, {x, 0, 20}], x] (* Eric W. Weisstein, Apr 11 2018 *)
-
A141310(n) = if(n%2,2,1+n); \\ (for offset=0 version) - Antti Karttunen, Oct 02 2018
-
A141310off1(n) = if(n%2,n,2); \\ (for offset=1 version) - Antti Karttunen, Oct 02 2018
-
def A141310(n): return 2 if n % 2 else n + 1 # Chai Wah Wu, May 24 2022
A262666
Irregular table read by rows: T(n,k) is the number of binary bisymmetric n X n matrices with exactly k 1's; n>=0, 0<=k<=n^2.
Original entry on oeis.org
1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 0, 4, 0, 8, 0, 12, 0, 14, 0, 12, 0, 8, 0, 4, 0, 1, 1, 1, 4, 4, 10, 10, 20, 20, 31, 31, 40, 40, 44, 44, 40, 40, 31, 31, 20, 20, 10, 10, 4, 4, 1, 1, 1, 0, 6, 0, 21, 0, 56, 0, 120, 0, 216, 0, 336, 0, 456, 0
Offset: 0
Irregular table begins:
n\k 0 1 2 3 4 5 6 7 8 9 ...
0: 1
1: 1 1
2: 1 0 2 0 1
3: 1 1 2 2 2 2 2 2 1 1
4: 1 0 4 0 8 0 12 0 14 0 ...
5: 1 1 4 4 10 10 20 20 31 31 ...
...
-
T:= n-> seq(coeff((t->(1+x^2)^(n-t)*(1+x)^t*(1+x^4)^
(((n-2)*n+t)/4))(irem(n, 2)), x, i), i=0..n^2):
seq(T(n), n=0..6); # Alois P. Heinz, Sep 27 2015
A115718
Inverse of number triangle A115717; a divide-and-conquer related triangle.
Original entry on oeis.org
1, 0, 1, -3, 1, 1, 0, 0, 0, 1, -3, -3, 1, 1, 1, 0, 0, 0, 0, 0, 1, -3, -3, -3, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, -3, -3, -3, -3, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -3, -3, -3, -3, -3, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -3, -3, -3, -3, -3, -3, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0
Triangle begins
1;
0, 1;
-3, 1, 1;
0, 0, 0, 1;
-3, -3, 1, 1, 1;
0, 0, 0, 0, 0, 1;
-3, -3, -3, 1, 1, 1, 1;
0, 0, 0, 0, 0, 0, 0, 1;
-3, -3, -3, -3, 1, 1, 1, 1, 1;
0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
-3, -3, -3, -3, -3, 1, 1, 1, 1, 1, 1;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
-3, -3, -3, -3, -3, -3, 1, 1, 1, 1, 1, 1, 1;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
-3, -3, -3, -3, -3, -3, -3, 1, 1, 1, 1, 1, 1, 1, 1;
-
T[n_, k_]:= If[OddQ[n], If[kG. C. Greubel, Nov 29 2021 *)
-
def A115718(n,k):
if (n%2==0): return 0 if (kA115718(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Nov 29 2021
A322506
Factorial expansion of 1/exp(2) = Sum_{n>=1} a(n)/n!.
Original entry on oeis.org
0, 0, 0, 3, 1, 1, 3, 0, 6, 4, 7, 5, 2, 9, 9, 8, 10, 8, 9, 1, 13, 18, 1, 2, 8, 15, 26, 10, 22, 1, 18, 9, 20, 10, 2, 6, 13, 19, 16, 38, 38, 3, 32, 5, 39, 24, 7, 27, 14, 41, 20, 39, 32, 7, 20, 35, 44, 50, 24, 34, 51, 14, 39, 47, 49, 15, 61, 54, 60, 52, 34, 60, 32, 72, 48, 12, 67, 52, 22, 48
Offset: 1
1/exp(2) = 0 + 0/2! + 0/3! + 3/4! + 1/5! + 1/6! + 3/7! + 0/8! + 6/9! +...
-
SetDefaultRealField(RealField(250)); [Floor(Exp(-2))] cat [Floor(Factorial(n)*Exp(-2)) - n*Floor(Factorial((n-1))*Exp(-2)) : n in [2..80]];
-
With[{b = 1/E^2}, Table[If[n == 1, Floor[b], Floor[n!*b] - n*Floor[(n - 1)!*b]], {n, 1, 100}]]
-
default(realprecision, 250); b = exp(-2); for(n=1, 80, print1(if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", "))
-
b=exp(-2);
def a(n):
if (n==1): return floor(b)
else: return expand(floor(factorial(n)*b) -n*floor(factorial(n-1)*b))
[a(n) for n in (1..80)]
A347365
a(n) = n * (2-(-1)^n), or zero together with first differences of even triangular numbers halved (A074378).
Original entry on oeis.org
0, 3, 2, 9, 4, 15, 6, 21, 8, 27, 10, 33, 12, 39, 14, 45, 16, 51, 18, 57, 20, 63, 22, 69, 24, 75, 26, 81, 28, 87, 30, 93, 32, 99, 34, 105, 36, 111, 38, 117, 40, 123, 42, 129, 44, 135, 46, 141, 48, 147, 50, 153, 52, 159, 54, 165, 56, 171, 58, 177, 60, 183, 62, 189, 64
Offset: 0
Cf.
A074378,
A165998,
A008586,
A033428,
A237420,
A193356,
A016921,
A016969,
A166519,
A014682,
A005843,
A016945,
A010684,
A008585,
A000027,
A026741.
-
Table[n(2-(-1)^n),{n,0,99}] (* or *)
LinearRecurrence[{0,2,0,-1}, {0,3,2,9}, 100] (* or *)
If[EvenQ@#,#,3#]&/@Range[0,99] (* or *)
Drop[Flatten@Transpose[{2#,6#+3}&@Range[0,Quotient[#,2]]],-Boole@EvenQ@#]&@(10^2)
-
a(n) = n*(2-(-1)^n); \\ Michel Marcus, Sep 13 2021
-
(x*(3+2*x+3*x^2)/(1-x^2)^2).series(x,65).coefficients(x,sparse=False) # Stefano Spezia, Aug 30 2021
Comments