|
|
A298474
|
|
a(n) is the least k such that A090701(k) = n.
|
|
3
|
|
|
1, 2, 6, 8, 11, 14, 18, 20, 24, 26, 30, 32, 36, 38, 42, 44, 48, 50, 54, 56, 60, 62, 66, 68, 72, 74, 78, 80, 84, 86, 90, 92, 96, 98, 102, 104, 108, 110, 114, 116, 120, 122, 126, 128, 132, 134, 138, 140, 144, 146, 150, 152, 156, 158, 162, 164, 168, 170, 174
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = floor(log_2(A298476(n))) + 1.
If n is even, a(n) = 3*n-4.
If n <> 1 or 5 is odd, a(n) = 3*n-3.
G.f.: x*(1+x+3*x^2+x^3-x^4+x^5+x^6-x^7)/((1-x)*(1-x^2)). (End)
|
|
EXAMPLE
|
The lexicographically earliest strings of length a(n) with a minimum palindromic partition into n parts:
n | a(n) | string | partition
--+------+----------------+---------------------------
1 | 1 | 0 | (0)
2 | 2 | 01 | (0)(1)
3 | 6 | 001011 | (0)(010)(11)
4 | 8 | 00101100 | (00)(101)(1)(00)
5 | 11 | 00101100101 | (00)(101)(1001)(0)(1)
6 | 14 | 00101110001011 | (00)(101)(11)(00)(010)(11)
|
|
MAPLE
|
f:= n -> 3*n-4+(n mod 2):
f(1):= 1: f(5):= 11:
|
|
MATHEMATICA
|
With[{s = Array[Boole[# == 11] + Floor[#/6] + Floor[(# + 4)/6] + 1 &, 2^8]}, Array[FirstPosition[s, #][[1]] &, Max@ Take[#, LengthWhile[Differences@ #, # == 1 &]] &@ Union@ s]] (* Michael De Vlieger, Jan 23 2018 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|