login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A214318
Replace the word A214317(n) with its position in A007931.
4
1, 4, 9, 19, 40, 81, 164, 329, 659, 1320, 2641, 5283, 10568, 21137, 42276, 84553, 169107, 338216, 676433, 1352868, 2705737, 5411475, 10822952, 21645905, 43291811, 86583624, 173167249, 346334500, 692669001, 1385338003, 2770676008, 5541352017, 11082704035
OFFSET
1,2
LINKS
FORMULA
a(n) = A182028(n-1)+2^n-1.
a(n) = 2*a(n-1) + A003842(n-1) for n>1, a(1) = 1. - Alois P. Heinz, Jul 19 2012
EXAMPLE
A214317(5) = 12112 is the 40th term of A007931, so a(5)=40.
MAPLE
S:= proc(n) option remember;
`if`(n<2, [2-n], [S(n-1)[], S(n-2)[]])
end:
a:= proc(n) option remember; local k;
for k while nops(S(k))<n do od;
`if`(n=1, 1, 2*a(n-1) +S(k)[n])
end:
seq(a(n), n=1..50); # Alois P. Heinz, Jul 19 2012
MATHEMATICA
nesting = 6; A003849 = Flatten[Nest[{#, #[[1]]}&, {0, 1}, nesting]]; A182028[n_] := FromDigits[Take[A003849, n+1], 2]; a[n_] := A182028[n-1] + 2^n - 1; Table[a[n], {n, 1, Length[A003849]}] (* Jean-François Alcover, Feb 13 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 12 2012
EXTENSIONS
More terms from Alois P. Heinz, Jul 19 2012
STATUS
approved