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.

A073781 Number of 2's in base-3 representation of n-th prime.

This page as a plain text file.
%I A073781 #14 May 11 2016 11:23:27
%S A073781 1,0,1,1,1,0,2,1,2,1,0,0,1,1,2,3,2,2,1,3,2,3,1,2,1,2,1,3,0,1,1,2,2,1,
%T A073781 2,2,2,1,2,2,3,2,2,1,3,1,2,3,3,2,4,4,4,2,1,2,3,0,1,1,0,2,1,2,2,3,1,0,
%U A073781 2,2,1,2,1,1,1,2,2,2,3,1,2,2,4,1,2,2,3,3
%N A073781 Number of 2's in base-3 representation of n-th prime.
%H A073781 Harvey P. Dale, <a href="/A073781/b073781.txt">Table of n, a(n) for n = 1..1000</a>
%F A073781 a(n) = A081603(A000040(n)). - _Michel Marcus_, Oct 02 2013
%e A073781 a(7)=2 as 7th prime 17 is 122 in base-3 representation.
%t A073781 a2[n_] := Length[Cases[IntegerDigits[Prime[n], 3], 2]]
%t A073781 DigitCount[Prime[Range[90]],3,2] (* _Harvey P. Dale_, May 11 2016 *)
%Y A073781 Cf. A073779, A073780.
%K A073781 base,easy,nonn
%O A073781 1,7
%A A073781 _Zak Seidov_ Aug 11 2002