|
|
A127904
|
|
Smallest m such that A008687(m) = n.
|
|
3
|
|
|
0, 1, 3, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193, 16385, 32769, 65537, 131073, 262145, 524289, 1048577, 2097153, 4194305, 8388609, 16777217, 33554433, 67108865, 134217729, 268435457, 536870913, 1073741825, 2147483649
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
For n>1, a(n) = A000051(n-1) = 2^(n-1)+1.
G.f.: x*(1-2*x^2)/((1-x)*(1-2*x)).
a(n) = 3*a(n-1) -2*a(n-2) for n=2 and n>3. (End)
|
|
MATHEMATICA
|
Join[{0, 1}, LinearRecurrence[{3, -2}, {3, 5}, 40]] (* or *) Join[{0, 1}, 2^Range[ 40]+1] (* Harvey P. Dale, Jan 16 2013 *)
|
|
PROG
|
(PARI) x='x+O('x^30); concat([0], Vec(x*(1-2*x^2)/((1-x)*(1-2*x)))) \\ G. C. Greubel, Apr 30 2018
(PARI) a(n) = if(n<2, n, 2^(n-1)+1); \\ Altug Alkan, May 01 2018
(Magma) m:=30; R<x>:=PowerSeriesRing(Rationals(), m); [0] cat Coefficients(R!(x*(1-2*x^2)/((1-x)*(1-2*x)))); // G. C. Greubel, Apr 30 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|