login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A145709 Number of primes among first 10^n primes that have first and last digits both equal 1. 4
1, 6, 39, 393, 7737, 103788, 1230898, 13344414, 120133545, 1092391851 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..10.

EXAMPLE

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.

PROG

(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

CROSSREFS

A145710, A145711, A145712, A145713

Sequence in context: A352839 A006678 A252761 * A280006 A336291 A034661

Adjacent sequences: A145706 A145707 A145708 * A145710 A145711 A145712

KEYWORD

more,nonn,base

AUTHOR

Enoch Haga, Oct 16 2008

EXTENSIONS

Edited and two more terms added by Max Alekseyev, Sep 11 2009

a(9), a(10) from D. S. McNeil, Aug 29 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 6 09:26 EST 2022. Contains 358608 sequences. (Running on oeis4.)