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.

Showing 1-2 of 2 results.

A136081 Array, read by antidiagonals, numbers with an odd number of 1's in base k expansion.

Original entry on oeis.org

1, 1, 3, 1, 2, 5, 1, 3, 4, 7, 1, 4, 5, 7, 9, 1, 5, 6, 7, 8, 11, 1, 6, 7, 7, 9, 11, 13, 1, 7, 8, 8, 9, 11, 13, 15, 1, 8, 9, 9, 9, 13, 13, 14, 17, 1, 9, 10, 10, 10, 11, 16, 15, 16, 19, 1, 10, 11, 11, 11, 11, 16, 18, 17, 19, 21, 1, 11, 12, 12, 12, 12, 13, 21, 19, 19, 21, 23, 1, 12, 13, 13, 13
Offset: 1

Views

Author

Jonathan Vos Post, May 10 2008

Keywords

Comments

Infinite number of analogs (one per row) of odious numbers.

Examples

			The infinite array begins:
===================================================================
k=?.|.n=1.|.n=2.|.n=3.|.n=4.|.n=5.|.n=6.|.n=7.|.n=8.|.n=9.|.n=10.|
k=1.|..1..|..3..|..5..|..7..|..9..|.11..|.13..|.15..|.17..|..19..|A005408
k=2.|..1..|..2..|..4..|..7..|..8..|.11..|.13..|.14..|.16..|..19..|A000069
k=3.|..1..|..3..|..5..|..7..|..9..|.11..|.13..|.15..|.17..|..19..|A005408
k=4.|..1..|..4..|..6..|..7..|..9..|.13..|.16..|.18..|.19..|..21..|new
k=5.|..1..|..5..|..7..|..8..|..9..|.11..|.16..|.21..|.25..|..27..|A137469
k=6.|..1..|..6..|..8..|..9..|.10..|.11..|.13..|.19..|.25..|..31..|A138103
k=7.|..1..|..7..|..9..|.10..|.11..|.12..|.13..|.15..|.22..|..29..|new
k=8.|..1..|..8..|.10..|.11..|.12..|.13..|.14..|.15..|.17..|..25..|new
k=9.|..1..|..9..|.11..|.12..|.13..|.14..|.15..|.16..|.17..|..19..|new
k=10|..1..|.10..|.12..|.13..|.14..|.15..|.16..|.17..|.18..|..19..|new
===================================================================
		

Crossrefs

Programs

  • Maple
    od1 := proc(n,k) local ct1,d ; if k = 1 then RETURN( n mod 2 = 1) ; fi ; ct1 := 0 ; for d in convert(n,base,k) do if d = 1 then ct1 := ct1+1 ; fi ; od: RETURN(ct1 mod 2 = 1) ; end: A136081 := proc(k,n) option remember ; local a; if n = 1 then RETURN(1) ; else for a from A136081(k,n-1)+1 do if od1(a,k) then RETURN(a) ; fi ; od: fi ; end: for d from 1 to 15 do for n from 1 to d do printf("%d,", A136081(d+1-n,n)) ; od: od: # R. J. Mathar, May 17 2008

Formula

A(k,n) = n-th number with an odd number of 1's in base k expansion.

Extensions

Corrected and extended by R. J. Mathar, May 17 2008

A138103 Numbers with an odd number of 1's in base 6 expansion.

Original entry on oeis.org

1, 6, 8, 9, 10, 11, 13, 19, 25, 31, 36, 38, 39, 40, 41, 43, 48, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 68, 69, 70, 71, 73, 78, 80, 81, 82, 83, 85, 91, 97, 103, 109, 114, 116, 117, 118, 119, 121, 127, 133, 139, 145, 150, 152, 153, 154, 155, 157, 163
Offset: 1

Views

Author

Jonathan Vos Post, May 03 2008

Keywords

Comments

This is to A007092 (numbers in base 6) as A000069 (odious numbers: odd number of 1's in binary expansion) is to A007088 (numbers written in base 2) and as A137469 is to A007091 (numbers in base 5). Note that odd number of 1's in base 3 expansion is simply the odd numbers. This sequence includes, as a subset, A043373 = numbers n such that number of 1's in base 6 is 1.
This is strictly different from A043373.
Terms in this sequence but not in A043374 are 43, 223, 253, 258, 260, 261, 262, 263, 265, 271, 277, 283, 295, ... - R. J. Mathar, May 13 2008

Examples

			a(1) = 1 because 1 base 10 = 1 base 6, which has an odd number (1) of ones.
a(2) = 6 because 6 base 10 = 10 base 6, which has an odd number (1) of ones.
a(3) = 8 because 8 base 10 = 12 base 6, which has an odd number (1) of ones.
a(11) = 36 because 36 base 10 = 100 base 6, which has an odd number (1) of ones.
a(17) = 43 because 43 base 10 = 111 base 6, which has an odd number (3) of ones.
		

Crossrefs

Programs

  • Maple
    isA138103 := proc(n) local a; a := 0 ; for d in convert(n,base,6) do if d = 1 then a := a+1 ; fi ; od: RETURN( a mod 2 = 1) ; end: for n from 1 to 300 do if isA138103(n) then printf("%d,",n) ; fi ; od: # R. J. Mathar, May 13 2008

Extensions

Corrected and extended by R. J. Mathar, May 13 2008
Showing 1-2 of 2 results.