A259175 a(n) = 1 if n prime, otherwise prime(n).
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
Examples
a(7) = 1 because 7 is prime. a(8) = 19 because 8 is not prime and prime(8) = 19.
Programs
-
Magma
[IsPrime(n) select 1 else NthPrime(n): n in [1..100]];
-
Mathematica
Table[If[PrimeQ[n], 1, Prime[n]], {n, 100}]
Comments