A006938 Convert the last term from decimal to binary! a(1)=3.
3, 11, 1011, 1111110011, 1000010001110100011000101111011
Offset: 1
References
- C. Pickover, Mazes for the Mind, St. Martin's Press, NY, 1992, p. 350.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Crossrefs
Programs
-
Mathematica
NestList[FromDigits[IntegerDigits[#,2]]&,3,4] (* Harvey P. Dale, Feb 28 2012 *)
-
PARI
lista(nn) = my(k=3); print1(k); for(n=2, nn, print1(", ", k=fromdigits(binary(k)))); \\ Jinyuan Wang, Jan 18 2025
-
Python
def agen(an): while True: yield an; an = int(bin(an)[2:]) g = agen(3) print([next(g) for i in range(5)]) # Michael S. Branicky, Mar 11 2021
Extensions
a(1)=3 added by N. J. A. Sloane, Jul 14 2015
Comments