login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039127 Numbers whose base-10 representation has the same number of 1's and 9's. 1
0, 2, 3, 4, 5, 6, 7, 8, 19, 20, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 37, 38, 40, 42, 43, 44, 45, 46, 47, 48, 50, 52, 53, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 67, 68, 70, 72, 73, 74, 75, 76, 77, 78, 80, 82, 83, 84, 85, 86, 87, 88, 91, 109, 129, 139 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

A k-digit number is in the sequence with probability ~ 1/sqrt(2*Pi*k/5). - Charles R Greathouse IV, Feb 19 2014

The number of d-digits positive terms is given by 7*8^(d-1)+ 7*sum(k=1,..,floor((d-1)/2), 8^(d-1-2*k) (k, k, d-1-2*k)!) + 2*sum(k=1,..,floor(d/2), 8^(d-2*k) (k, k-1, d-2*k)!), where (x,y,z)! = (x+y+z)!/(x! y! z!) denotes a multinomial coefficient. (* Giovanni Resta, Feb 22 2014 *)

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1500

MATHEMATICA

Select[Range[0, 200], DigitCount[#, 10, 1]==DigitCount[#, 10, 9]&] (* Harvey P. Dale, Feb 19 2014 *)

PROG

(PARI) is(n)=my(v=digits(n)); sum(i=1, #v, if(v[i]==1, 1, if(v[i]==9, -1, 0)))==0 \\ Charles R Greathouse IV, Feb 19 2014

CROSSREFS

Sequence in context: A055557 A173577 A103205 * A024650 A037343 A236836

Adjacent sequences:  A039124 A039125 A039126 * A039128 A039129 A039130

KEYWORD

nonn,base,easy

AUTHOR

Olivier Gérard

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 16 15:18 EDT 2021. Contains 348042 sequences. (Running on oeis4.)