A168309
Period 2: repeat 4,-3.
Original entry on oeis.org
4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3
Offset: 1
-
&cat[ [4, -3]: n in [1..42] ];
[ n eq 1 select 4 else -Self(n-1)+1: n in [1..84] ];
-
LinearRecurrence[{0,1},{4, -3}, 50] (* or *) Table[(1 - 7*(-1)^n)/2,{n,0,25}] (* G. C. Greubel, Jul 17 2016 *)
PadRight[{},120,{4,-3}] (* Harvey P. Dale, Oct 20 2018 *)
A239304
Triangle of permutations corresponding to the compressed square roots of Gray code * bit-reversal permutation (A239303).
Original entry on oeis.org
1, 1, 2, 3, 1, 2, 4, 2, 1, 3, 2, 5, 4, 1, 3, 2, 5, 6, 3, 1, 4, 6, 2, 3, 7, 5, 1, 4, 7, 3, 2, 6, 8, 4, 1, 5, 3, 8, 7, 2, 4, 9, 6, 1, 5, 3, 8, 9, 4, 2, 7, 10, 5, 1, 6, 9, 3, 4, 10, 8, 2, 5, 11, 7, 1, 6, 10, 4, 3, 9
Offset: 1
Triangular array begins:
1
1 2
3 1 2
4 2 1 3
2 5 4 1 3
2 5 6 3 1 4
Square array begins:
1 1 3 4 2 2
2 1 2 5 5 2
2 1 4 6 3 2
3 1 3 7 6 2
3 1 5 8 4 2
4 1 4 9 7 2
Row 5 of A239303 is the vector (12,18,1,17,10), which corresponds to the following binary matrix:
0 0 1 1 0
0 1 0 0 1
1 0 0 0 0
1 0 0 0 1
0 1 0 1 0
Interpreted as an adjacency matrix it describes the following graph, where each number is connected to its neighbors, and only the 2 is connected to itself:
2 5 4 1 3
This is row 5 of the triangular array.
A116850
Number of permutations of length n which avoid the patterns 231, 12354.
Original entry on oeis.org
1, 2, 5, 14, 41, 119, 334, 902, 2351, 5945, 14660, 35408, 84061, 196715, 454778, 1040522, 2359451, 5308589, 11862208, 26345684, 58196201, 127926527, 279970070, 610271534, 1325400391, 2868904289, 6190793084, 13321109912, 28588376501, 61203284435, 130728067570
Offset: 1
- Colin Barker, Table of n, a(n) for n = 1..1000
- Lara Pudwell, Systematic Studies in Pattern Avoidance, 2005.
- Index entries for linear recurrences with constant coefficients, signature (9,-33,63,-66,36,-8).
A195084
a(2n-1) = 2-n, a(2n) = 2+n.
Original entry on oeis.org
2, 1, 3, 0, 4, -1, 5, -2, 6, -3, 7, -4, 8, -5, 9, -6, 10, -7, 11, -8, 12, -9, 13, -10, 14, -11, 15, -12, 16, -13, 17, -14, 18, -15, 19, -16, 20, -17, 21, -18, 22, -19, 23, -20, 24, -21, 25, -22, 26, -23, 27, -24, 28, -25, 29, -26, 30, -27, 31, -28, 32, -29, 33
Offset: 0
A297996
a(1)=2, a(2)=3, a(3)=5 and a(n) = (a(1) + a(2) + a(3) + ... + a(n-1))/a(n-1).
Original entry on oeis.org
2, 3, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 8, 12, 9, 13, 10, 14, 11, 15, 12, 16, 13, 17, 14, 18, 15, 19, 16, 20, 17, 21, 18, 22, 19, 23, 20, 24, 21, 25, 22, 26, 23, 27, 24, 28, 25, 29, 26, 30, 27, 31, 28, 32, 29, 33, 30, 34, 31, 35, 32, 36, 33, 37, 34, 38, 35
Offset: 1
-
Nest[Append[#, Total[#]/Last[#]] &, Prime@ Range@ 3, 67] (* Michael De Vlieger, Jan 10 2018 *)
LinearRecurrence[{1,1,-1},{2,3,5,2,6},70] (* Harvey P. Dale, Dec 31 2021 *)
-
lista(nn) = {va = vector(nn); for (n=1, 3, va[n] = prime(n)); for (n=4, nn, va[n] = sum(k=1, n-1, va[k])/va[n-1];); va;} \\ Michel Marcus, Jan 10 2018
-
Vec(x*(2 + x - 4*x^3 + 2*x^4) / ((1 - x)^2*(1 + x)) + O(x^100)) \\ Colin Barker, Jan 29 2018
A376353
Table T(n, k) n > 0, k > 2 read by upward antidiagonals. The sequences in each column k is a triangle read by rows (blocks), where each row is a permutation of the numbers of its constituents. The length of the row number n in column k is equal to the n-th k-pyramidal number A261720.
Original entry on oeis.org
1, 4, 1, 3, 4, 1, 5, 5, 5, 1, 2, 3, 4, 5, 1, 11, 6, 6, 6, 6, 1, 10, 2, 3, 4, 5, 6, 1, 12, 14, 7, 7, 7, 7, 7, 1, 9, 13, 2, 3, 4, 5, 6, 7, 1, 13, 15, 17, 8, 8, 8, 8, 8, 8, 1, 8, 12, 16, 2, 3, 4, 5, 6, 7, 8, 1, 14, 16, 18, 20, 9, 9, 9, 9, 9, 9, 9, 1, 7, 11, 15, 19, 2, 3, 4, 5, 6, 7, 8, 9, 1, 15, 17, 19, 21, 23, 10, 10, 10, 10, 10, 10, 10, 10, 1, 6, 10, 14, 18, 22, 2, 3
Offset: 1
Table begins:
k = 3 4 5 6 7 8
--------------------------------------
n = 1: 1, 1, 1, 1, 1, 1, ...
n = 2: 4, 4, 5, 5, 6, 6, ...
n = 3: 3, 5, 4, 6, 5, 7, ...
n = 4: 5, 3, 6, 4, 7, 5, ...
n = 5: 2, 6, 3, 7, 4, 8, ...
n = 6: 11, 2, 7, 3, 8, 4, ...
n = 7: 10, 14, 2, 8, 3, 9, ...
n = 8: 12, 13, 17, 2, 9, 3, ...
n = 9: 9, 15, 16, 20, 2, 10, ...
n = 10: 13, 12, 18, 19, 23, 2, ...
n = 11: 8, 16, 15, 21, 22, 26, ...
n = 12: 14, 11, 19, 18, 24, 25, ...
n = 12: 7, 17, 14, 22, 21, 27, ...
n = 14: 15, 10, 20, 17, 25, 24, ...
n = 15: 6, 18, 13, 23, 20, 28, ...
... .
For k = 3 the first 3 blocks have lengths 1,4 and 10.
For k = 4 the first 2 blocks have lengths 1 and 5.
For k = 5 the first 2 blocks have lengths 1 and 6.
Each block is a permutation of the numbers of its constituents.
The first 6 antidiagonals are:
1;
4, 1;
3, 4, 1;
5, 5, 5, 1;
2, 3, 4, 5, 1;
11, 6, 6, 6, 6, 1;
- E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 93.
-
T[n_,k_]:=Module[{L,R,result},L=Ceiling[Max[x/.NSolve[(k-2)*x^4+2*k*x^3+(14-k)*x^2+(12-2*k)*x-24*n==0,x,Reals]]]; R=n-((k-2)*(L-1)^4+2*k*(L-1)^3+(14-k)*(L-1)^2+(12-2*k)*(L-1))/24; P=Which[OddQ[R]&&OddQ[(L^3*(k-2)+3*L^2-L*(k-5))/6],((L^3*(k-2)+3*L^2-L*(k-5))/6+2-R)/2,OddQ[R]&&EvenQ[(L^3*(k-2)+3*L^2-L*(k-5))/6],(R+(L^3*(k-2)+3*L^2-L*(k-5))/6+1)/2,EvenQ[R]&&OddQ[(L^3*(k-2)+3*L^2-L*(k-5))/6],Ceiling[((L^3*(k-2)+3*L^2-L*(k-5))/6+1)/2]+R/2,EvenQ[R]&&EvenQ[(L^3*(k-2)+3*L^2-L*(k-5))/6],Ceiling[((L^3*(k-2)+3*L^2-L*(k-5))/6+1)/2]-R/2]; Res= P +((k-2)*(L-1)^4+2*k*(L-1)^3+(14-k)*(L-1)^2+(12-2*k)*(L-1))/24; result=Res] Nmax=6; Table[T[n,k],{n,1,Nmax},{k,3,Nmax+2}]
A132169
Irregular triangle read by rows. A141616(n)/4.
Original entry on oeis.org
2, 3, 6, 4, 8, 5, 12, 10, 6, 15, 12, 7, 20, 18, 14, 8, 24, 21, 16, 9, 30, 28, 24, 18, 10, 35, 32, 27, 20, 11, 42, 40, 36, 30, 22, 12, 48, 45, 40, 33, 24, 13, 56, 54, 50, 44, 36, 26, 14, 63, 60, 55, 48, 39, 28, 15, 72, 70, 66, 60, 52, 42, 30, 16
Offset: 0
Irregular triangle:
2,
3,
6, 4,
8, 5,
12, 10, 6,
15, 12, 7,
20, 18, 14, 8,
24, 21, 16, 9,
30, 28, 24, 18, 10,
35, 32, 27, 20, 11,
etc.
-
(Table[n^2 - k^2, {n, 3, 18}, {k, n}] /. m_ /; Or[OddQ@ m, m == 0] -> Nothing)/4 // Flatten (* Michael De Vlieger, Apr 14 2016 *)
A266394
Square array a(n,k) is the number of terms in the "continued fraction" of the form -k1 + 1/(k2 - 1/(k3 -1/( ... for the fraction -k/n.
Original entry on oeis.org
1, 4, 2, 7, 1, 3, 10, 5, 5, 4, 13, 4, 1, 2, 5, 16, 8, 6, 8, 6, 6, 19, 7, 8, 1, 6, 3, 7, 22, 11, 4, 7, 11, 2, 7, 8, 25, 10, 9, 5, 1, 5, 9, 4, 9, 28, 14, 11, 11, 8, 14, 7, 7, 8, 10, 31, 13, 7, 4, 9, 1, 9, 2, 3, 5, 11, 34, 17, 12, 10, 9, 9, 17, 9, 12, 10, 9, 12
Offset: 1
a(1, 3) is the number of steps for -3/1: -3 -> -2 -> -1 -> 0 = 3 steps.
a(3, 1) is the number of steps for -1/3: -1/3 -> 2/3 -> -3/2 -> -1/2 -> 1/2 -> -2 -> -1 -> 0 = 7 steps.
The array begins:
1, 2, 3, 4, 5, ...
4, 1, 5, 2, 6, ...
7, 5, 1, 8, 6, ...
10, 4, 6, 1, 11, ...
13, 8, 8, 7, 1, ...
...
-
trans(f) = if (f > 0, -1/f, if (f < 0, f+1, f));
count(f) = nb = 0; while(f!=0, f = trans(f); nb++); nb;
tabl(nn) = {for (n=1, nn, for (k=1, nn, print1(count(-k/n), ", ");); print(););}
Showing 1-8 of 8 results.
Comments