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.

A044973 Numbers whose base-3 representation contains exactly one 0 and three 1's.

This page as a plain text file.
%I A044973 #24 Jul 26 2023 03:21:00
%S A044973 31,37,39,95,97,103,113,115,119,123,127,129,139,145,147,175,193,199,
%T A044973 201,287,293,295,311,313,319,341,347,349,359,371,375,383,385,389,393,
%U A044973 397,399,419,421,427,437,439,443,447,451,453,463
%N A044973 Numbers whose base-3 representation contains exactly one 0 and three 1's.
%H A044973 Robert Israel, <a href="/A044973/b044973.txt">Table of n, a(n) for n = 1..10000</a>
%e A044973 31 = 1011_3; 37 = 1101_3; 39 = 1110_3; 95 = 10112_3.
%p A044973 f:= proc(d) local x,R,i,j,j3;
%p A044973   x:= 3^d-1;
%p A044973   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))]))
%p A044973 end proc:
%p A044973 map(f, [$4..6]); # _Robert Israel_, Apr 20 2021
%t A044973 Select[Range[500],DigitCount[#,3,0]==1&&DigitCount[#,3,1]==3&] (* _Harvey P. Dale_, Jul 12 2019 *)
%o A044973 (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
%Y A044973 Cf. A007089 (numbers in base 3), A044971 (1 zero 1 one), A044972 (1 zero 2 ones), A044974 (1 zero 4 ones).
%K A044973 nonn,base,look
%O A044973 1,1
%A A044973 _Clark Kimberling_