%I #53 Aug 05 2024 08:40:52
%S 2,3,4,6,8,12,14,18,20,24,30,32,38,42,44,48,54,60,62,68,72,74,80,84,
%T 90,98,102,104,108,110,114,128,132,138,140,150,152,158,164,168,174,
%U 180,182,192,194,198,200,212,224,228,230,234,240,242,252,258,264,270,272,278,282,284
%N a(n) = prime(n) + 1 (starting with 1).
%C n-th noncomposite (unit or prime) positive integer + 1.
%C The "0th prime" is defined to be 1 (a unit, formerly considered to be prime).
%H G. C. Greubel, <a href="/A028815/b028815.txt">Table of n, a(n) for n = 0..10000</a>
%F a(n) = prime(n) + 1 = A000040(n) + 1 = A008864(n) for n >= 1.
%F a(n) = A008578(n+1) + 1, n >= 0.
%F a(n) = 2*A006254(n-1), for n >= 2, with a(0) = 2, a(1) = 3. - _G. C. Greubel_, Aug 05 2024
%t Join[{2},Prime[Range[70]]+1] (* _Harvey P. Dale_, Oct 14 2019 *)
%o (PARI) a(n) = if(n==0, 2, prime(n) + 1); \\ _Altug Alkan_, Mar 14 2018
%o (Magma)
%o A028815:= func< n | n eq 0 select 2 else 1 + NthPrime(n) >;
%o [A028815(n): n in [0..70]]; // _G. C. Greubel_, Aug 05 2024
%o (SageMath)
%o def A028815(n): return 2 if n==0 else 1+nth_prime(n)
%o [A028815(n) for n in range(71)] # _G. C. Greubel_, Aug 05 2024
%Y Cf. A000040, A006093, A008578, A008864.
%Y Cf. A141130, A141132, A141133, A141136, A141138.
%K nonn,easy
%O 0,1
%A _N. J. A. Sloane_
|