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.

A065681 Number of primes <= prime(n) which begin with a 2.

This page as a plain text file.
%I A065681 #16 Dec 15 2024 11:01:47
%S A065681 1,1,1,1,1,1,1,1,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
%T A065681 3,3,3,3,3,3,3,3,3,3,3,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,19,
%U A065681 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19
%N A065681 Number of primes <= prime(n) which begin with a 2.
%H A065681 Harry J. Smith, <a href="/A065681/b065681.txt">Table of n, a(n) for n = 1..1000</a>
%e A065681 After 2 and 23, 29 is the third prime beginning with 2: A000040(10) = 29, therefore a(10) = 3. a(664579) = 77025 (A000040(664579) = 9999991 is the largest prime < 10^7).
%t A065681 Accumulate@ Array[Boole[First@ IntegerDigits@ Prime@ # == 2] &, 87] (* _Michael De Vlieger_, Jun 14 2018 *)
%o A065681 (PARI) lista(n) = { my(a=[p\10^logint(p,10)==2 | p<-primes(n)]); for(i=2, #a, a[i]+=a[i-1]); a} \\ _Harry J. Smith_, Oct 26 2009
%Y A065681 Cf. A000040, A045708, A065680.
%K A065681 base,nonn
%O A065681 1,9
%A A065681 _Reinhard Zumkeller_, Nov 13 2001