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.

Showing 1-3 of 3 results.

A145709 Number of primes among first 10^n primes that have first and last digits both equal 1.

Original entry on oeis.org

1, 6, 39, 393, 7737, 103788, 1230898, 13344414, 120133545, 1092391851
Offset: 1

Views

Author

Enoch Haga, Oct 16 2008

Keywords

Examples

			a(1)=1 because among first 10^1 primes (i.e., from 2 to 29) there is just one prime with first and last digits equal 1, that is 11.
		

Crossrefs

Programs

  • UBASIC
    10 'leading-trailing digits 20 N=11:C=4:Q=1 30 'print 2;3; 40 A=3:S=sqrt(N) 50 B=N\A 60 if B*A=N then 190 70 A=A+2 80 if A<=S then 50 90 R=str(N) 100 T=left(R,2):X=val(T) 110 U=right(R,1):Y=val(U) 120 if X=Y and X=1 then Aa=Aa+1 130 if X=Y and X=3 then Bb=Bb+1 140 if X=Y and X=7 then Cc=Cc+1 150 if X=Y and X=9 then Dd=Dd+1 160 C=C+1 170 'print C;N;X;Y;Aa;Bb;Cc;Dd 180 if C=10^Q then print C;N;Aa;Bb;Cc;Dd:Q=Q+1 190 N=N+2:goto 40

Extensions

Edited and two more terms added by Max Alekseyev, Sep 11 2009
a(9), a(10) from D. S. McNeil, Aug 29 2010

A145713 Number of primes p in the range 9 < p <= prime(10^n) that begin and end with the same digit.

Original entry on oeis.org

1, 10, 105, 1180, 14143, 158036, 1703161, 17520558, 157563619, 1431557207
Offset: 1

Views

Author

Enoch Haga, Oct 16 2008

Keywords

Examples

			The initial 1 is from the prime 11.
a(4)=1180 because to 10^4 or 10000 primes, ending in 104729=A006988(4), there are 1180 primes with equal and distinct first and last digits: 1 and 1, 3 and 3, 7 and 7 and 9 and 9.
		

Crossrefs

Formula

a(n) = A145709(n) + A145710(n) + A145711(n) + A145712(n). [R. J. Mathar, Aug 02 2010]

Extensions

Edited by N. J. A. Sloane, Aug 16 2010
a(6) corrected and a(7)-a(10) added by D. S. McNeil, Aug 29 2010

A145710 Number of primes among first 10^n primes that have first and last digits both equal 3 (not counting the prime 3).

Original entry on oeis.org

0, 4, 32, 278, 2250, 18839, 162662, 1433999, 12811208, 115798814
Offset: 1

Views

Author

Enoch Haga, Oct 16 2008

Keywords

Examples

			a(2)= 4 because among first 10^2 primes (i.e., from 2 to 541), there are 4 primes with first and last digits equal 3, that are 313, 353, 373, and 383.
		

Crossrefs

Programs

  • UBASIC
    10 'leading-trailing digits 20 N=11:C=4:Q=1 30 'print 2;3; 40 A=3:S=sqrt(N) 50 B=N\A 60 if B*A=N then 190 70 A=A+2 80 if A<=S then 50 90 R=str(N) 100 T=left(R,2):X=val(T) 110 U=right(R,1):Y=val(U) 120 if X=Y and X=1 then Aa=Aa+1 130 if X=Y and X=3 then Bb=Bb+1 140 if X=Y and X=7 then Cc=Cc+1 150 if X=Y and X=9 then Dd=Dd+1 160 C=C+1 170 'print C;N;X;Y;Aa;Bb;Cc;Dd 180 if C=10^Q then print C;N;Aa;Bb;Cc;Dd:Q=Q+1 190 N=N+2:goto 40

Extensions

Edited and two more terms added by Max Alekseyev, Sep 11 2009
a(9), a(10) from D. S. McNeil, Aug 29 2010
Showing 1-3 of 3 results.