

A039242


Numbers n such that representation in base 12 has same number of 3's and 7's.


0



0, 1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 32, 33, 34, 35, 43, 48, 49, 50, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 80, 81, 82, 83, 87, 96, 97, 98, 100, 101, 102, 104
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


LINKS

Table of n, a(n) for n=1..69.


MATHEMATICA

Select[Range[0, 120], DigitCount[#, 12, 3]==DigitCount[#, 12, 7]&] (* Harvey P. Dale, May 04 2011 *)


PROG

(PARI) helkustinda(n, {B=10}, {w=[]})={my(L=List(), c, s=vector(B), wo=Set(w)); if(1<#wo, for(t=1, (1+#wo), s[1+wo[t]]); s[1+wo[#wo]]=1+#wo; ); for(k=1, +oo, forvec(y=vector(k, u, [((k!=1)&&(u==1)), B1]), if(c<n, if(!sum(j=1, #y, s[1+y[j]]), listput(L, fromdigits(y, B)); c++), return(Vec(L))), 0))} \\ Remark: 0<=w[j]<B;
vecA039242(n)=helkustinda(n, 12, [3, 7]); \\ R. J. Cano, Feb 04 2019
(PARI) isok(n) = my(d=digits(n, 12)); #select(x>(x==3), d) == #select(x>(x==7), d); \\ Michel Marcus, Feb 05 2019


CROSSREFS

Cf. A039138 (same in base 10).
Sequence in context: A059921 A062289 A172284 * A039185 A080240 A135668
Adjacent sequences: A039239 A039240 A039241 * A039243 A039244 A039245


KEYWORD

nonn,base,easy


AUTHOR

Olivier Gérard


STATUS

approved



