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.

A277834 Number of '4' digits in the set of all numbers from 0 to A014824(n) = Sum_{i=1..n} i*10^(n-i) = (0, 1, 12, 123, 1234, 12345, ...).

This page as a plain text file.
%I A277834 #20 Jan 01 2021 11:52:09
%S A277834 0,0,1,22,344,4671,59053,713985,8374417,96089849,1084355281,
%T A277834 12078120713,133126886145,1454725651577,15781824417015,
%U A277834 170163923182508,1825096021948551,19485528120720094,207200960219546637,2195466392318923180,23189231824423799723
%N A277834 Number of '4' digits in the set of all numbers from 0 to A014824(n) = Sum_{i=1..n} i*10^(n-i) = (0, 1, 12, 123, 1234, 12345, ...).
%H A277834 David A. Corneth, <a href="/A277834/b277834.txt">Table of n, a(n) for n = 0..998</a>
%F A277834 a(n) = A277849(n) = A083449(n) = A277830(n) - 1 for n < 4,
%F A277834 a(n) = A277833(n) - 5*10^(n-4) for n >= 4, a(n) = A277835(n) + 6*10^(n-5) for n >= 5.
%F A277834 More generally, for m = 0, ..., 9, let a[m] denote A277830, ..., A277838 and A277849, respectively. Then a[0](n) = a[n](n) = a[m](n) + 1 for all m > n >= 0, and a[m-1](n) = a[m](n) + (m+1)*10^(n-m) for all n >= m > 1.
%e A277834 For n=2 there is only one digit '4' in the sequence 0, 1, 2, ..., 12.
%e A277834 For n=3 there are 11 + 10 = 21 more digits '4' in { 14, 24, 34, 40, ..., 49, 54, ..., 114 }, where 44 accounts for two '4's.
%o A277834 (PARI) print1(c=N=0);for(n=1,8,print1(","c+=sum(k=N+1,N=N*10+n,#select(d->d==4,digits(k)))))
%o A277834 (PARI) A277834(n,m=4)=if(n>m,A277833(n,m+1)+(m+2)*10^(n-m-1),A277830(n)-(m>n))
%Y A277834 Cf. A277830 - A277838, A277849, A277635, A272525, A083449, A014824.
%K A277834 nonn,base
%O A277834 0,4
%A A277834 _M. F. Hasler_, Nov 01 2016
%E A277834 More terms from _Lars Blomberg_, Nov 05 2016
%E A277834 Removed incorrect b-file. - _David A. Corneth_, Dec 31 2020