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.

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

This page as a plain text file.
%I A145709 #7 Jul 03 2016 00:17:33
%S A145709 1,6,39,393,7737,103788,1230898,13344414,120133545,1092391851
%N A145709 Number of primes among first 10^n primes that have first and last digits both equal 1.
%e A145709 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.
%o A145709 (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
%Y A145709 A145710, A145711, A145712, A145713
%K A145709 more,nonn,base
%O A145709 1,2
%A A145709 _Enoch Haga_, Oct 16 2008
%E A145709 Edited and two more terms added by _Max Alekseyev_, Sep 11 2009
%E A145709 a(9), a(10) from _D. S. McNeil_, Aug 29 2010