cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A135576 Numbers whose binary expansion has only the digit "1" as first, central and final digit.

Original entry on oeis.org

1, 7, 21, 73, 273, 1057, 4161, 16513, 65793, 262657, 1049601, 4196353, 16781313, 67117057, 268451841, 1073774593, 4295032833, 17180000257, 68719738881, 274878431233, 1099512676353, 4398048608257, 17592190238721
Offset: 1

Views

Author

Omar E. Pol, Feb 24 2008

Keywords

Comments

This sequence is essentially identical to A001576.
a(n) is the number whose binary representation is A135577(n), (See example). - Omar E. Pol, Nov 18 2008

Examples

			--------------------------------------
n ........ a(n) ..... a(n) in base 2
--------------------------------------
1 .......... 1 ............ 1
2 .......... 7 ........... 111
3 ......... 21 .......... 10101
4 ......... 73 ......... 1001001
5 ........ 273 ........ 100010001
6 ....... 1057 ....... 10000100001
7 ....... 4161 ...... 1000001000001
8 ...... 16513 ..... 100000010000001
9 ...... 65793 .... 10000000100000001
10 .... 262657 ... 1000000001000000001
		

Crossrefs

Subsequence of A006995.

Programs

  • Mathematica
    nxt[n_]:=Module[{l=Floor[IntegerLength[n,2]/2]},FromDigits[Join[{1},Table[0,{l}],{1},Table[0,{l}],{1}],2]]
    NestList[nxt,1,25] (* Harvey P. Dale, Dec 29 2010 *)
    Join[{1},LinearRecurrence[{7,-14,8},{7,21,73},30]] (* Harvey P. Dale, Mar 22 2015 *)
  • PARI
    a(n)=if(n--,4^n+2^n+1,1) \\ Charles R Greathouse IV, Dec 28 2012

Formula

a(1)=1. If n>1 then a(n) = A001576(n-1).
G.f.: -x*(16*x^3-14*x^2+1) / ((x-1)*(2*x-1)*(4*x-1)). - Colin Barker, Sep 16 2013