login
a(1) = 2; for n > 1, a(n) = n + prime(n-1).
6

%I #23 Sep 08 2022 08:45:12

%S 2,4,6,9,12,17,20,25,28,33,40,43,50,55,58,63,70,77,80,87,92,95,102,

%T 107,114,123,128,131,136,139,144,159,164,171,174,185,188,195,202,207,

%U 214,221,224,235,238,243,246,259,272,277,280,285,292,295,306,313,320,327

%N a(1) = 2; for n > 1, a(n) = n + prime(n-1).

%C Sum of index n and the corresponding n-th term of noncomposite numbers (A008578).

%C Does n > 2 exist such that n*prime(n-1)/(n+prime(n-1)), i.e., A164931(n)/a(n) is an integer? - _Jaroslav Krizek_, Aug 31 2009

%C Complement of A171508(n). - _Jaroslav Krizek_, Dec 13 2009

%D M. Feenstra, P. J. Carter and C. P. Harding, The Ultimate I.Q. Book, Wardlock, see p. 99.

%F a(n) = n + A008578(n). - _David Wasserman_, May 20 2008

%F a(1) = 2; a(n) = 1 + A014688(n-1), for n >= 2. - _Omar E. Pol_, Nov 01 2013

%e a(2) = 2 + prime(1) = 4; a(5) = 5 + prime(4) = 12; a(9) = 9 + prime(8) = 28.

%t Join[{2}, Table[Prime[n - 1] + n, {n, 2, 60}]] (* _Vincenzo Librandi_, Dec 08 2015 *)

%o (Magma) [n + NthPrime(n-1): n in [1..58] ]; // _Klaus Brockhaus_, Sep 09 2009

%Y The published version (A048171) is said to be incorrect.

%K nonn

%O 1,1

%A Pab Ter (pabrlos(AT)yahoo.com), May 29 2004

%E Definition corrected, second comment and example edited by _Klaus Brockhaus_, Sep 09 2009