login
A259175
a(n) = 1 if n prime, otherwise prime(n).
1
2, 1, 1, 7, 1, 13, 1, 19, 23, 29, 1, 37, 1, 43, 47, 53, 1, 61, 1, 71, 73, 79, 1, 89, 97, 101, 103, 107, 1, 113, 1, 131, 137, 139, 149, 151, 1, 163, 167, 173, 1, 181, 1, 193, 197, 199, 1, 223, 227, 229, 233, 239, 1, 251, 257, 263, 269, 271, 1, 281, 1, 293, 307, 311
OFFSET
1,1
COMMENTS
The subsequence of prime terms is A007821. - Michel Marcus, Jun 20 2015
EXAMPLE
a(7) = 1 because 7 is prime.
a(8) = 19 because 8 is not prime and prime(8) = 19.
MATHEMATICA
Table[If[PrimeQ[n], 1, Prime[n]], {n, 100}]
PROG
(Magma) [IsPrime(n) select 1 else NthPrime(n): n in [1..100]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jun 20 2015
STATUS
approved