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!)
A039255 Numbers whose base-12 representation has the same number of 5's and 7's. 2

%I #22 Sep 08 2022 08:44:53

%S 0,1,2,3,4,6,8,9,10,11,12,13,14,15,16,18,20,21,22,23,24,25,26,27,28,

%T 30,32,33,34,35,36,37,38,39,40,42,44,45,46,47,48,49,50,51,52,54,56,57,

%U 58,59,67,72,73,74,75,76,78,80,81,82,83,89,96,97,98,99,100

%N Numbers whose base-12 representation has the same number of 5's and 7's.

%H Vincenzo Librandi, <a href="/A039255/b039255.txt">Table of n, a(n) for n = 1..1000</a>

%t Select[Range[0,200],DigitCount[#,12,5]==DigitCount[#,12,7]&] (* _Harvey P. Dale_, Jun 23 2011 *)

%o (PARI) base(n,b=16,s=0) = { local( a=[ n%b ]); while( 0<n\=b, a=concat( n%b, a )); if( s, s=32*s+23; Strchr( vectorsmall( #a,i, if(a[i]>9,s,48)+a[i] )), a) }

%o list_A039255(MAX)=my(c=0);for(n=0,MAX,sum(k=1,#b=base(n,12),(b[k]==5)-(b[k]==7)) & next; c++ & print1(n",")) \\ _M. F. Hasler_, Sep 11 2009

%o (Magma) [n: n in [0..100] | Multiplicity(S,5) eq Multiplicity(S,7) where S is {*d: d in Intseq(n,12)*}]; // _Bruno Berselli_, Oct 20 2012

%K nonn,base,easy

%O 1,3

%A _Olivier GĂ©rard_

%E An incorrect g.f. was deleted by _N. J. A. Sloane_, Sep 13 2009 (cf. A151988).

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 April 29 05:57 EDT 2024. Contains 372097 sequences. (Running on oeis4.)