|
|
A141274
|
|
Composite numbers k such that k+1 is prime and the index in the composites is also prime.
|
|
3
|
|
|
12, 28, 36, 60, 100, 130, 138, 150, 172, 180, 198, 222, 270, 292, 348, 396, 420, 432, 456, 520, 540, 568, 612, 618, 640, 682, 732, 768, 786, 820, 838, 880, 928, 996, 1032, 1060, 1068, 1090, 1096, 1212, 1222, 1276, 1300, 1306, 1320, 1372, 1428, 1486, 1548
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Suggested by Carlos Rivera's Puzzle 449, The Prime Puzzles & Problems Connection
|
|
LINKS
|
|
|
FORMULA
|
Compute the composite numbers beginning with 4. At 4 the composite index is zero, at 6 it is 1, at 8 it is 2, ... and at 12 it is 5, etc.
|
|
EXAMPLE
|
a(1) = 12 because 12+1 = 13, prime and the index of 12 is 5, so both the composite 12+1 and the index are prime.
|
|
PROG
|
(Python)
from sympy import compositepi, isprime
def ok(n):
return not isprime(n) and isprime(n+1) and isprime(compositepi(n)-1)
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|