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.

A316864 Number of times 3 appears in decimal expansion of n.

This page as a plain text file.
%I A316864 #19 Dec 10 2019 20:02:56
%S A316864 0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,1,2,
%T A316864 1,1,1,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
%U A316864 0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0
%N A316864 Number of times 3 appears in decimal expansion of n.
%H A316864 Robert Israel, <a href="/A316864/b316864.txt">Table of n, a(n) for n = 0..10000</a>
%F A316864 From _Robert Israel_, Dec 10 2019: (Start)
%F A316864 a(10*n+3) = a(n)+1, a(10*n+i)=a(i) for i = 0,1,2,4..9.
%F A316864 G.f. g(z) satisfies g(z) = z^3/(1-z^10) + ((1-z^10)/(1-z))*g(z^10). (End)
%e A316864 a(0) = 0 since the decimal representation of 0 does not contain the digit 3.
%e A316864 a(3) = 1 since 3 appears once in the decimal expansion of 3.
%p A316864 f:= proc(n) option remember;
%p A316864 procname(floor(n/10)) + `if`(n mod 10 = 3, 1, 0)
%p A316864 end proc:
%p A316864 for i from 0 to 9 do f(i):= `if`(i=3,1,0) od:
%p A316864 map(f, [$0..100]); # _Robert Israel_, Dec 10 2019
%t A316864 Array[ DigitCount[#, 10, 3] &, 105, 0]
%o A316864 (PARI) a(n) = #select(x->x==3, digits(n)); \\ _Michel Marcus_, Jul 20 2018
%Y A316864 Cf. A043501, A043502, A043503, A043504.
%Y A316864 Cf. A055641, A268643, A316864, A316865, A316866, A316867, A316868, A316869, A102683.
%K A316864 base,easy,nonn
%O A316864 0,34
%A A316864 _Robert G. Wilson v_, Jul 15 2018