login
A186413
a(n) is the number of odd primes p < prime(n)^2 such that prime(n)# + p is prime with prime(n)# primorial of prime(n).
2
1, 2, 5, 8, 16, 18, 20, 28, 25, 30, 40, 46, 41, 53, 56, 73, 62, 66, 81, 93, 85, 84, 89, 97, 101, 127, 121, 122, 119, 128, 150, 141, 144, 152, 150, 143, 174, 203, 197, 195, 196, 194, 213, 213, 218, 223, 230, 235, 249, 258, 256, 244, 264, 262
OFFSET
1,2
COMMENTS
a(n) is not so far from prime(n).
LINKS
EXAMPLE
prime(1)#=2 2+3=5 5>2^2 so a(1)=1
prime(2)#=6 6+5=11,6+7=13 11>3*3 so a(2)=2
PROG
SCRIPT
DIM nn, 1
DIM kk
DIM cc
DIM dd
DIMS tt
DIMS ss
OPENFILEOUT myout, res
LABEL loopn
SET nn, nn+1
SET kk, nn
SET cc, 0
SET dd, 0
LABEL loopk
SET kk, kk+1
IF p(kk)>p(nn)^2 THEN GOTO a
SETS tt, %d, %d, %d\,; nn; p(nn); -p(kk)
PRP p(nn)#-p(kk), tt
IF ISPRIME THEN SET cc, cc+1
IF ISPRP THEN SET cc, cc+1
SETS tt, %d, %d, %d\,; nn; p(nn); p(kk)
PRP p(nn)#+p(kk), tt
IF ISPRIME THEN SET dd, dd+1
IF ISPRP THEN SET dd, dd+1
GOTO loopk
LABEL a
SETS ss, %d, %d, %d\,; nn; cc; dd
WRITE myout, ss
GOTO loopn
CROSSREFS
Cf. A185398.
Sequence in context: A285291 A065618 A257548 * A080084 A065093 A361270
KEYWORD
nonn
AUTHOR
Pierre CAMI, Feb 21 2011
STATUS
approved