OFFSET
0,3
COMMENTS
In other words, numbers k whose binary expansion first appears in A030190 at its expected place, i.e., n appears first starting at position A296349(n). - N. J. A. Sloane, Dec 17 2017
a(n) are the Base 2 "Punctual Bird" numbers: write the nonnegative integers, base 2, in a string 011011100101110111.... Sequence gives numbers which do not occur in the string ahead of their natural place. - Graeme McRae, Aug 11 2007
LINKS
Graeme McRae, Aug 11 2007, Table of n, a(n) for n = 0..113 - Corrected by Rémy Sigrist, Jun 14 2020
Index entries for linear recurrences with constant coefficients, signature (0,0,6,0,0,-8).
FORMULA
a(0)=0, a(1)=1, a(2)=2; then for n>=1, a(3n)=2^(2n), a(3n+1)=2^(2n+1), a(3n+2)=2^(2n+1)+2^n. - Graeme McRae, Aug 11 2007
From Colin Barker, Jun 14 2020: (Start)
G.f.: x*(1 + 2*x + 4*x^2 + 2*x^3 - 2*x^4 - 8*x^5 - 8*x^6 - 8*x^7) / ((1 - 2*x^3)*(1 - 4*x^3)).
a(n) = 6*a(n-3) - 8*a(n-6) for n>8. (End)
a(n) = 2^floor(2*(n+2)/3-1) + (floor((n+1)/3)-floor(n/3))*2^(floor(n/3)) - floor(5/(n+3)). - Alan Michael Gómez Calderón, Dec 15 2022
MATHEMATICA
LinearRecurrence[{0, 0, 6, 0, 0, -8}, {0, 1, 2, 4, 8, 10, 16, 32, 36}, 50] (* Harvey P. Dale, Aug 19 2020 *)
PROG
(PARI) a(n)= if (n<=2, n, my (m=n\3); if (n%3==0, 2^(2*m), n%3==1, 2^(2*m+1), 2^m + 2^(2*m+1))) \\ Rémy Sigrist, Jun 14 2020
(PARI) concat(0, Vec(x*(1 + 2*x + 4*x^2 + 2*x^3 - 2*x^4 - 8*x^5 - 8*x^6 - 8*x^7) / ((1 - 2*x^3)*(1 - 4*x^3)) + O(x^40))) \\ Colin Barker, Jun 14 2020
(PARI) a(n) = 2^((2*n+1)\3) + (n%3==2)<<(n\3) - (n<3) \\ Charles R Greathouse IV, Dec 16 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Reinhard Zumkeller, May 01 2003
EXTENSIONS
More terms from Graeme McRae, Aug 11 2007
STATUS
approved