login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A158611 0, 1 and the primes. 30

%I #38 Sep 08 2022 08:45:43

%S 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,

%T 89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,

%U 179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263

%N 0, 1 and the primes.

%C Essentially a duplicate of A008578. - _N. J. A. Sloane_, Mar 27 2009

%C Or, nonnegative noncomposite numbers. - _Juri-Stepan Gerasimov_, Nov 22 2009, Dec 12 2009

%C Numbers with all divisors in arithmetic progression. - _Charles R Greathouse IV_, Oct 19 2015

%F a(n) = A008578(n-1), n > 1.

%t Join[{0, 1}, Table[Prime[n], {n, 400}]] (* _Vladimir Joseph Stephan Orlovsky_, Feb 04 2012 *)

%o (PARI) a(n)=if(n<3,n-1,prime(n-2)) \\ _Charles R Greathouse IV_, Aug 26 2011

%o (Magma) [0,1] cat [NthPrime(n): n in [1..100]]; // _Vincenzo Librandi_, Dec 08 2015

%o (GAP)

%o A158611:=Concatenation([0,1],Filtered([1..10^5],IsPrime)); # _Muniru A Asiru_, Sep 05 2017

%Y A158611 U A002808 = A141468 U A000040 = A001477. - _Juri-Stepan Gerasimov_, Sep 27 2009

%Y Cf. A008578.

%K nonn,easy

%O 1,3

%A _Jaroslav Krizek_, Mar 22 2009

%E Edited by _R. J. Mathar_, Aug 21 2009

%E Further edited by _R. J. Mathar_, _Klaus Brockhaus_ and _N. J. A. Sloane_, Sep 13 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 10:35 EDT 2024. Contains 371827 sequences. (Running on oeis4.)