A158611 0, 1 and the primes.
0, 1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263
Offset: 1
Crossrefs
Programs
-
GAP
A158611:=Concatenation([0,1],Filtered([1..10^5],IsPrime)); # Muniru A Asiru, Sep 05 2017
-
Magma
[0,1] cat [NthPrime(n): n in [1..100]]; // Vincenzo Librandi, Dec 08 2015
-
Mathematica
Join[{0, 1}, Table[Prime[n], {n, 400}]] (* Vladimir Joseph Stephan Orlovsky, Feb 04 2012 *)
-
PARI
a(n)=if(n<3,n-1,prime(n-2)) \\ Charles R Greathouse IV, Aug 26 2011
Formula
a(n) = A008578(n-1), n > 1.
Extensions
Edited by R. J. Mathar, Aug 21 2009
Comments