A376686
a(n) is the unique k such that A376677(k) is the reversal of A376677(n), or -1 if no such k exists.
Original entry on oeis.org
1, 2, 3, 5, 4, 6, 10, 8, 12, 7, 11, 9, 15, 21, 13, 19, 17, 18, 16, 22, 14, 20, 23, 32, 28, 30, 35, 25, 33, 26, 34, 24, 29, 31, 27, 36, 46, 53, 50, 40, 52, 44, 48, 42, 54, 37, 49, 43, 47, 39, 51, 41, 38, 45, 60, 76, 66, 63, 79, 55, 71, 65, 58, 74, 62, 57, 67
Offset: 1
The first terms, alongside the corresponding terms of A376677, are:
n a(n) A376677(n) A376677(a(n))
-- ---- ---------- -------------
1 1 1 1
2 2 2 2
3 3 11 11
4 5 12 21
5 4 21 12
6 6 22 22
7 10 112 211
8 8 121 121
9 12 122 221
10 7 211 112
11 11 212 212
12 9 221 122
13 15 1121 1211
14 21 1122 2211
15 13 1211 1121
16 19 1212 2121
A376688
List of palindromic subwords (or palindromic factors) of the Kolakoski sequence (A000002).
Original entry on oeis.org
1, 2, 11, 22, 121, 212, 1221, 2112, 11211, 22122, 121121, 212212, 1221221, 2112112, 12122121, 21211212, 112212211, 221121122, 1121221211, 2212112122, 12211211221, 21122122112, 122121121221, 211212212112, 1211221221121, 2122112112212, 11221211212211
Offset: 1
A379017
a(n) is the number of distinct sums s(m) + s(m+1) + ... + s(m+n-1), where s = A000002, and m >= 1.
Original entry on oeis.org
2, 3, 2, 3, 4, 3, 4, 3, 2, 3, 4, 3, 4, 5, 4, 3, 4, 3, 4, 5, 4, 5, 6, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 5, 6, 5, 4, 5, 6, 5, 6, 7, 6, 5, 6, 5, 6, 7, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 6, 5, 6, 5, 6, 7, 6, 7, 6, 5, 6, 7, 6, 7, 8, 7, 8, 7, 6, 7
Offset: 1
Starting with s = (1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, ...) we form a shifted partial sum array:
(row 1) = (1,2,2,1,1,2,1,2,2,...)
(row 2) = (s(1)+s(2), s(2)+s(3), s(3)+s(4), ...) = (3,4,3,2,3,3,3,4,...) = A333229
(row 3) = (s(1)+s(2)+s(3), s(2)+s(3)+s(4), s(3)+s(4)+s(5), ...) = (5,5,4,4,4,5,5,5,5,5,5,4,...)
The number of distinct numbers in (row 3) is 2, so a(3) = 2.
The first 12 rows of the shifted partial sum array: (1, 2), (2, 3, 4), (4, 5), (5, 6, 7), (6, 7, 8, 9), (8, 9, 10), (9, 10, 11, 12), (11, 12, 13), (13, 14), (14, 15, 16), (15, 16, 17, 18), (17, 18, 19). These rows illustrate that fact that the integers in each row are consecutive.
-
s = Prepend[Nest[Flatten[Partition[#, 2] /. {{2, 2} -> {2, 2, 1, 1}, {2, 1} -> {2, 2, 1}, {1, 2} -> {2, 1, 1}, {1, 1} -> {2, 1}}] &, {2, 2}, 24], 1]; (* A000002 *)
Length[s]
r[1] = s;
r[n_] := r[n] = Rest[r[n - 1]];
c[n_] := c[n] = Take[r[n], 1000];
sum[n_] := Sum[c[k], {k, 1, n}];
t = Table[Union[sum[n]], {n, 1, 100}]
Map[Length, t]
Showing 1-3 of 3 results.
Comments