login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A044973 Numbers whose base-3 representation includes one 0 and three 1's. 1
31, 37, 39, 95, 97, 103, 113, 115, 119, 123, 127, 129, 139, 145, 147, 175, 193, 199, 201, 287, 293, 295, 311, 313, 319, 341, 347, 349, 359, 371, 375, 383, 385, 389, 393, 397, 399, 419, 421, 427, 437, 439, 443, 447, 451, 453, 463 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

31 = 1011_3; 37 = 1101_3; 39 = 1110_3; 95 = 10112_3.

MAPLE

f:= proc(d) local x, R, i, j, j3;

x:= 3^d-1;

op(sort([seq(seq(x - add(3^j, j = j3) - 2*3^i, i= {$0..d-2} minus j3) , j3 =combinat:-choose({$0..d-1}, 3))]))

end proc:

map(f, [$4..6]); # Robert Israel, Apr 20 2021

MATHEMATICA

Select[Range[500], DigitCount[#, 3, 0]==1&&DigitCount[#, 3, 1]==3&] (* Harvey P. Dale, Jul 12 2019 *)

PROG

(PARI) isok(k) = my(d=digits(k, 3)); (#select(x->(x==0), d) == 1) && (#select(x->(x==1), d) == 3); \\ Michel Marcus, Apr 21 2021

CROSSREFS

Cf. A007089 (numbers in base 3), A044971 (1 zero 1 one), A044972 (1 zero 2 ones), A044974 (1 zero 4 ones).

Sequence in context: A109293 A053684 A336178 * A230035 A051267 A073521

Adjacent sequences: A044970 A044971 A044972 * A044974 A044975 A044976

KEYWORD

nonn,base,look

AUTHOR

Clark Kimberling

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 1 08:20 EST 2023. Contains 359992 sequences. (Running on oeis4.)