A274913
Square array read by antidiagonals upwards in which each new term is the least positive integer distinct from its neighbors.
Original entry on oeis.org
1, 2, 3, 1, 4, 1, 2, 3, 2, 3, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3
Offset: 1
The corner of the square array begins:
1, 3, 1, 3, 1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, 4, 2, 4, 2, ...
1, 3, 1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, 4, 2, ...
1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, ...
1, 3, 1, 3, ...
2, 4, 2, ...
1, 3, ...
2, ...
...
The sequence written as a triangle begins:
1;
2, 3;
1, 4, 1;
2, 3, 2, 3;
1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3;
1, 4, 1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3, 2, 3;
1, 4, 1, 4, 1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3, 2, 3, 2, 3;
...
-
Table[1 + Boole@ EvenQ@ # + 2 Boole@ EvenQ@ k &[n - k + 1], {n, 14}, {k, n}] // Flatten (* Michael De Vlieger, Nov 14 2016 *)
A283393
a(n) = gcd(n^2-1, n^2+9).
Original entry on oeis.org
1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10
Offset: 0
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,1).
-
&cat [[1, 10, 1, 2, 5, 2, 5, 2, 1, 10]^^10];
-
Table[PolynomialGCD[n^2 - 1, n^2 + 9], {n, 0, 100}]
LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 10, 1, 2, 5, 2, 5, 2, 1, 10}, 100]
-
makelist(gcd(n^2-1, n^2+9), n, 0, 100);
-
Vec((1 + 10*x + x^2 + 2*x^3 + 5*x^4 + 2*x^5 + 5*x^6 + 2*x^7 + x^8 + 10*x^9)/(1 - x^10) + O(x^100)) \\ Colin Barker, Mar 08 2017
-
[1, 10, 1, 2, 5, 2, 5, 2, 1, 10]*10
-
[gcd(n^2-1, n^2+9) for n in range(100)]
A052612
Expansion of e.g.f. x*(2+x)/(1-x^2).
Original entry on oeis.org
0, 2, 2, 12, 24, 240, 720, 10080, 40320, 725760, 3628800, 79833600, 479001600, 12454041600, 87178291200, 2615348736000, 20922789888000, 711374856192000, 6402373705728000, 243290200817664000, 2432902008176640000, 102181884343418880000, 1124000727777607680000
Offset: 0
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
-
spec := [S,{S=Prod(Z,Union(Sequence(Z),Sequence(Prod(Z,Z))))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
-
With[{nn=20},CoefficientList[Series[x (2+x)/(1-x^2),{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Jun 10 2018 *)
Join[{0}, Table[1/2 (3 - (-1)^n) n!, {n, 20}]] (* David Trimas, Jul 28 2023 *)
-
a(n)=if(n<0,0,n!*polcoeff((x^2+2*x)/(1-x^2)+x*O(x^n),n))
-
a(n)=if(n<1,0,n!*(n%2+1))
-
a(n)= n! / gcd(n, n * (n + 1) / 2) \\ Andrew S. Plewe, Jan 09 2006
A105475
Triangle read by rows: T(n,k) is number of compositions of n into k parts when each even part can be of two kinds.
Original entry on oeis.org
1, 2, 1, 1, 4, 1, 2, 6, 6, 1, 1, 8, 15, 8, 1, 2, 11, 26, 28, 10, 1, 1, 12, 42, 64, 45, 12, 1, 2, 16, 60, 122, 130, 66, 14, 1, 1, 16, 82, 208, 295, 232, 91, 16, 1, 2, 21, 108, 324, 582, 621, 378, 120, 18, 1, 1, 20, 135, 480, 1035, 1404, 1176, 576, 153, 20, 1, 2, 26, 170, 675
Offset: 1
T(4,2) = 6 because we have (1,3), (3,1), (2,2), (2,2'), (2',2) and (2',2').
Triangle begins:
1;
2, 1;
1, 4, 1;
2, 6, 6, 1;
1, 8, 15, 8, 1;
Triangle (0, 2, -3/2, -1/2, 0, 0, 0...) DELTA (1, 0, 0, 0, 0, ...) begins:
1
0, 1
0, 2, 1
0, 1, 4, 1
0, 2, 6, 6, 1
0, 1, 8, 15, 8, 1
0, 2, 11, 26, 28, 10, 1
0, 1, 12, 42, 64, 45, 12, 1
-
G:=t*z*(1+2*z)/(1-t*z-z^2-2*t*z^2): Gser:=simplify(series(G,z=0,14)): for n from 1 to 12 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 1 to 12 do seq(coeff(P[n],t^k),k=1..n) od; # yields sequence in triangular form
# second Maple program:
b:= proc(n) option remember; `if`(n=0, 1,
expand(add((2-irem(i, 2))*b(n-i)*x, i=1..n)))
end:
T:= n-> (p-> seq(coeff(p, x, k), k=1..n))(b(n)):
seq(T(n), n=1..14); # Alois P. Heinz, Oct 16 2013
# Uses function PMatrix from A357368. Adds a row above and a column to the left.
PMatrix(10, n -> [1, 2][irem(n-1, 2) + 1]); # Peter Luschny, Oct 08 2022
-
max = 14; g = t*z*(1 + 2*z)/(1 - t*z - z^2 - 2*t*z^2); gser = Series[g, {z, 0, max}]; coes = CoefficientList[gser, {z, t}]; Table[ Table[ coes[[n, k]], {k, 2, n}], {n, 2, max}] // Flatten (* Jean-François Alcover, Oct 02 2013, after Maple *)
A123344
Expansion of (1+3*x)/(1+2*x).
Original entry on oeis.org
1, 1, -2, 4, -8, 16, -32, 64, -128, 256, -512, 1024, -2048, 4096, -8192, 16384, -32768, 65536, -131072, 262144, -524288, 1048576, -2097152, 4194304, -8388608, 16777216, -33554432, 67108864, -134217728, 268435456, -536870912, 1073741824, -2147483648
Offset: 0
-
[1] cat [(-2)^(n-1): n in [1..35]]; // Vincenzo Librandi, Feb 14 2014
-
a:=n->mul(-2, k=0..n): seq(a(n), n=-2..30); # Zerinvary Lajos, Jan 22 2008
-
Table[(-2)^(n - Sign[n]), {n, 0, 30}] (* Wesley Ivan Hurt, Feb 01 2014 *)
Join[{1},LinearRecurrence[{-2},{1},32]] (* Ray Chandler, Aug 12 2015 *)
Join[{1},NestList[-2#&,1,40]] (* Harvey P. Dale, Aug 24 2019 *)
-
x='x+O('x^50); Vec((1+3*x)/(1+2*x)) \\ G. C. Greubel, Oct 12 2017
A141023
a(n) = 2^n - (3-(-1)^n)/2.
Original entry on oeis.org
0, 0, 3, 6, 15, 30, 63, 126, 255, 510, 1023, 2046, 4095, 8190, 16383, 32766, 65535, 131070, 262143, 524286, 1048575, 2097150, 4194303, 8388606, 16777215, 33554430, 67108863, 134217726, 268435455, 536870910, 1073741823, 2147483646, 4294967295, 8589934590, 17179869183
Offset: 0
-
[2^n -(3-(-1)^n)/2: n in [0..40]]; // Vincenzo Librandi, Aug 08 2011
-
Range[0,20]! CoefficientList[Series[D[(Cosh[x]-1)(Exp[x]-1), x], {x,0,20}], x] (* Geoffrey Critzer, Dec 03 2011 *)
LinearRecurrence[{2, 1, -2}, {0, 0, 3}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 14 2012 *)
Table[2^n - (3 - (-1)^n)/2, {n, 0, 34}] (* Alonso del Arte, Feb 14 2012 *)
-
x='x+O('x^50); concat([0,0], Vec(3*x^2/((x-1)*(2*x-1)*(1+x)))) \\ G. C. Greubel, Oct 10 2017
A198148
a(n) = n*(n+2)*(9 - 7*(-1)^n)/16.
Original entry on oeis.org
0, 3, 1, 15, 3, 35, 6, 63, 10, 99, 15, 143, 21, 195, 28, 255, 36, 323, 45, 399, 55, 483, 66, 575, 78, 675, 91, 783, 105, 899, 120, 1023, 136, 1155, 153, 1295, 171, 1443, 190, 1599, 210, 1763, 231, 1935, 253, 2115, 276, 2303, 300, 2499, 325
Offset: 0
-
List([0..60], n -> n*(n+2)*(9-7*(-1)^n)/16); # G. C. Greubel, Feb 21 2019
-
[n*(n+2)*(9-7*(-1)^n)/16: n in [0..60]]; // Vincenzo Librandi, Nov 25 2011
-
A198148:=n->n*(n+2)*(9-7*(-1)^n)/16; seq(A198148(k), k=0..100); # Wesley Ivan Hurt, Oct 16 2013
-
LinearRecurrence[{0,3,0,-3,0,1},{0,3,1,15,3,35},60] (* Vincenzo Librandi, Nov 25 2011 *)
-
a(n)=n*(n+2)*(9-7*(-1)^n)/16 \\ Charles R Greathouse IV, Oct 16 2015
-
[n*(n+2)*(9-7*(-1)^n)/16 for n in (0..60)] # G. C. Greubel, Feb 21 2019
A201912
Irregular triangle of 2^k mod prime(n).
Original entry on oeis.org
0, 1, 2, 1, 2, 4, 3, 1, 2, 4, 1, 2, 4, 8, 5, 10, 9, 7, 3, 6, 1, 2, 4, 8, 3, 6, 12, 11, 9, 5, 10, 7, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10, 1, 2, 4, 8, 16, 9, 18, 13, 3, 6, 12, 1, 2, 4, 8, 16, 3, 6, 12, 24
Offset: 1
The first 11 rows are:
2: 0;
3: 1, 2;
5: 1, 2, 4, 3;
7: 1, 2, 4;
11: 1, 2, 4, 8, 5, 10, 9, 7, 3, 6;
13: 1, 2, 4, 8, 3, 6, 12, 11, 9, 5, 10, 7;
17: 1, 2, 4, 8, 16, 15, 13, 9;
19: 1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10;
23: 1, 2, 4, 8, 16, 9, 18, 13, 3, 6, 12;
29: 1, 2, 4, 8, 16, 3, 6, 12, 24, 19, 9, 18, 7, 14, 28, 27, 25, 21, 13, 26, 23, 17, 5, 10, 20, 11, 22, 15;
31: 1, 2, 4, 8, 16;
Cf. similar sequences of the type 2^n mod p, where p is a prime:
A000034 (p=3),
A070402 (p=5),
A069705 (p=7),
A036117 (p=11),
A036118 (p=13),
A062116 (p=17),
A036120 (p=19),
A070335 (p=23),
A036122 (p=29),
A269266 (p=31),
A036124 (p=37),
A070348 (p=41),
A070349 (p=43),
A070351 (p=47),
A036128 (p=53),
A036129 (p=59),
A036130 (p=61),
A036131 (p=67),
A036135 (p=83),
A036138 (p=101),
A036140 (p=107),
A036144 (p=131),
A036146 (p=139),
A036147 (p=149),
A036150 (p=163),
A036152 (p=173),
A036153 (p=179),
A036154 (p=181),
A036157 (p=197),
A036159 (p=211),
A036161 (p=227).
-
P:=Filtered([1..350],IsPrime);;
R:=List([1..Length(P)],n->OrderMod(2,P[n]));;
Flat(Concatenation([0],List([2..10],n->List([0..R[n]-1],k->PowerMod(2,k,P[n]))))); # Muniru A Asiru, Feb 01 2019
-
nn = 10; p = 2; t = p^Range[0,Prime[nn]]; Flatten[Table[If[Mod[n, p] == 0, {0}, tm = Mod[t, n]; len = Position[tm, 1, 1, 2][[-1,1]]; Take[tm, len-1]], {n, Prime[Range[nn]]}]]
A213268
Denominators of the Inverse semi-binomial transform of A001477(n) read downwards antidiagonals.
Original entry on oeis.org
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
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.
-
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
-
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 *)
A216917
Square array read by antidiagonals, T(N,n) = lcm{1<=j<=N, gcd(j,n)=1 | j} for N >= 0, n >= 1.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 6, 1, 1, 1, 12, 3, 2, 1, 1, 60, 3, 2, 1, 1, 1, 60, 15, 4, 3, 2, 1, 1, 420, 15, 20, 3, 6, 1, 1, 1, 840, 105, 20, 15, 12, 1, 2, 1, 1, 2520, 105, 140, 15, 12, 1, 6, 1, 1, 1, 2520, 315, 280, 105, 12, 5, 12, 3, 2, 1, 1, 27720, 315, 280, 105, 84
Offset: 1
n | N=0 1 2 3 4 5 6 7 8 9 10
-----+-------------------------------------
1 | 1 1 2 6 12 60 60 420 840 2520 2520
2 | 1 1 1 3 3 15 15 105 105 315 315
3 | 1 1 2 2 4 20 20 140 280 280 280
4 | 1 1 1 3 3 15 15 105 105 315 315
5 | 1 1 2 6 12 12 12 84 168 504 504
6 | 1 1 1 1 1 5 5 35 35 35 35
7 | 1 1 2 6 12 60 60 60 120 360 360
8 | 1 1 1 3 3 15 15 105 105 315 315
9 | 1 1 2 2 4 20 20 140 280 280 280
10 | 1 1 1 3 3 3 3 21 21 63 63
11 | 1 1 2 6 12 60 60 420 840 2520 2520
12 | 1 1 1 1 1 5 5 35 35 35 35
13 | 1 1 2 6 12 60 60 420 840 2520 2520
-
t[, 0] = 1; t[n, k_] := LCM @@ Select[Range[k], CoprimeQ[#, n]&]; Table[t[n - k + 1, k], {n, 0, 11}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Jul 29 2013 *)
-
def A216917(N, n):
return lcm([j for j in (1..N) if gcd(j, n) == 1])
for n in (1..13): [A216917(N,n) for N in (0..10)]
Comments