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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213885 Number of prime numbers of the form (10^k-1)*10^n-1 with 0<k<=2*n 2
1, 0, 3, 1, 3, 2, 2, 2, 5, 1, 2, 2, 0, 4, 1, 2, 2, 2, 5, 0, 7, 2, 2, 3, 2, 4, 0, 2, 3, 2, 2, 5, 2, 2, 4, 0, 2, 3, 0, 2, 0, 1, 4, 1, 3, 1, 4, 2, 1, 4, 5, 1, 4, 2, 0, 1, 4, 3, 3, 3, 5, 1, 1, 3, 1, 3, 1, 2, 5, 4, 2, 1, 2, 3, 1, 4, 2, 2, 1, 1, 5, 2, 2, 2, 0, 2, 2, 1, 3, 4, 3, 5, 4, 1, 1, 2, 3, 2, 4, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The condition k<=2*n sets a limit of the numbers to be checked for primeness.
The sequence counts a subset of the primes considered in A213886.
Statistics over n=1 to 1000: 105 values of a(n) are zero, the average value of a(n) is 2.33.
LINKS
EXAMPLE
(10^1-1)*10-1=89 prime
(10^2-1)*10^1-1=989 composite so a(1)=1
(10^1-1)*10^2-1=899 composite
(10^2-1)*10^2-1=9899 composite
(10^3-1)*10^2-1=99899 composite
(10^4-1)*10^2-1=999899 composite so a(2)=0
MAPLE
A213885 := proc(n)
local a, k;
a := 0 ;
for k from 1 to 2*n do
if isprime((10^k-1)*10^n-1) then
a := a+1 ;
end if;
end do:
return a;
end proc: # R. J. Mathar, Jul 19 2012
PROG
(PFGW64 and SCRIPTIFY)
SCRIPT
DIM nn, 0
DIM kk
DIMS tt
OPENFILEOUT myfile, a(n).txt
LABEL loopn
SET nn, nn+1
IF nn>1000 THEN END
SET kk, 0
LABEL loopk
SET kk, kk+1
IF kk>2*nn THEN GOTO loopn
SETS tt, %d, %d\,; nn; kk
PRP (10^kk-1)*10^nn-1, tt
IF ISPRP THEN GOTO a
IF ISPRIME THEN GOTO a
GOTO loopk
LABEL a
WRITE myfile, tt
GOTO loopk
CROSSREFS
Sequence in context: A326420 A171899 A355784 * A347739 A352931 A083208
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 10 2012
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 April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)