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.

A228158 Numbers n such that the cardinality of (natural numbers <=n with a first digit of 1) = n/2.

This page as a plain text file.
%I A228158 #13 Mar 13 2019 23:41:08
%S A228158 2,16,22,176,222,1776,2222,17776,22222,177776,222222,1777776,2222222,
%T A228158 17777776,22222222,177777776,222222222,1777777776,2222222222,
%U A228158 17777777776,22222222222,177777777776,222222222222,1777777777776,2222222222222,17777777777776
%N A228158 Numbers n such that the cardinality of (natural numbers <=n with a first digit of 1) = n/2.
%C A228158 This is conceptually related to Benford's law.
%H A228158 <a href="/index/Be#Benford">Index entries for sequences related to Benford's law</a>
%F A228158 a(n) for odd values of n is simply "2" repeated (n+1)/2 times (sum as i=1->(n/2) of 10^(i-1)). For even values of n, it's a(n-1)*8.
%F A228158 G.f.: 2*(1+8*x)/((1-x)*(1+x)*(1-10*x^2)). [_Joerg Arndt_, Aug 14 2013]
%o A228158 (PARI) Vec(2*(1+8*x)/((1-x)*(1+x)*(1-10*x^2))+O(x^66)) \\ _Joerg Arndt_, Aug 14 2013
%K A228158 base,easy,nonn
%O A228158 1,1
%A A228158 _Michael Turniansky_, Aug 14 2013