|
|
A106706
|
|
a(0) = 19; for n>0, successively subtract 5, subtract 3 and double.
|
|
1
|
|
|
19, 14, 11, 22, 17, 14, 28, 23, 20, 40, 35, 32, 64, 59, 56, 112, 107, 104, 208, 203, 200, 400, 395, 392, 784, 779, 776, 1552, 1547, 1544, 3088, 3083, 3080, 6160, 6155, 6152, 12304, 12299, 12296, 24592, 24587, 24584, 49168, 49163, 49160, 98320, 98315, 98312, 196624
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Suggested by a test found on the Internet.
|
|
LINKS
|
Jeffrey N. Shaumeyer, Bearcastle Blog, One Post, Two ... [Via Internet Archive Wayback-Machine]
|
|
FORMULA
|
G.f.: (19 + 14*x + 11*x^2 - 35*x^3 - 25*x^4 - 19*x^5)/((1 - 2*x^3)*(1 - x^3)).
a(3n) = 3*2^n+16, a(3n+1) = 3*2^n+11, a(3n+2) = 3*2^n+8.
|
|
MAPLE
|
f:=proc(n) option remember; if n=0 then RETURN(19); fi; if n mod 3 = 1 then RETURN(f(n-1)-5); elif n mod 3 = 2 then RETURN(f(n-1)-3); else RETURN(2*f(n-1)); fi; end;
|
|
MATHEMATICA
|
nxt[{b_, c_, d_}]:={d-5, d-8, 2d-16}; Join[{19}, Flatten[NestList[nxt, {14, 11, 22}, 20]]] (* Harvey P. Dale, Dec 01 2019 *)
|
|
PROG
|
(PARI) a(n)=3*2^(n\3)+[16, 11, 8][n%3+1] \\ M. F. Hasler, Nov 16 2010
(Magma) I:=[19, 14, 11, 22, 17, 14]; [n le 6 select I[n] else 3*Self(n-3) - 2*Self(n-6): n in [1..61]]; // G. C. Greubel, Sep 09 2021
(Sage)
def p(n): return 0 if (n%3==0) else 5 if (n%3==1) else 8
def a(n, b): return 2^(n//3)*(b-16) + 16 - p(n)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
N. J. A. Sloane, based on correspondence with Jeffrey N. Shaumeyer, Apr 23 2006
|
|
STATUS
|
approved
|
|
|
|