|
|
A039276
|
|
Numbers whose base-3 representation has the same nonzero number of 0's and 2's.
|
|
1
|
|
|
6, 11, 15, 19, 21, 32, 34, 38, 42, 46, 48, 56, 58, 60, 64, 66, 72, 89, 95, 97, 101, 103, 105, 113, 115, 119, 123, 127, 129, 137, 139, 141, 145, 147, 153, 167, 169, 173, 175, 177, 181, 183, 191, 193, 195, 199, 201, 207, 217, 219, 225, 260, 266, 268, 278, 284
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
MATHEMATICA
|
Select[Range[300], DigitCount[#, 3, 0]==DigitCount[#, 3, 2]>0&] (* Harvey P. Dale, May 10 2011 *)
|
|
PROG
|
(Python)
from sympy.ntheory import count_digits
def ok(n): d = count_digits(n, 3); return 0 in d and 2 in d and d[0] == d[2]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|