login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the least prime factor of A000096(n) = n*(n+3)/2.
1

%I #33 Nov 13 2019 11:06:02

%S 2,5,3,2,2,3,5,2,2,5,7,2,2,7,3,2,2,3,11,2,2,5,13,2,2,13,3,2,2,3,17,2,

%T 2,17,5,2,2,19,3,2,2,3,23,2,2,7,5,2,2,5,3,2,2,3,5,2,2,29,31,2,2,5,3,2,

%U 2,3,5,2,2,5,37,2,2,7,3,2,2

%N a(n) is the least prime factor of A000096(n) = n*(n+3)/2.

%C The motivation is that n*(n+3)/2 = n + T(n), where T(n) = n*(n+1)/2 = A000217(n), the triangular numbers.

%F a(n) = A020639(A000096(n)). - _Michel Marcus_, Oct 28 2019

%e For n = 5, n + T(n) = 5 + 15 = 20. The smallest prime factor of 20 is 2, so a(5) = 2.

%t Array[FactorInteger[# (# + 3)/2][[1, 1]] &, 77] (* _Amiram Eldar_, Nov 02 2019 *)

%o (PARI) A328823(n)=A020639(n*(n+3)/2) \\ _M. F. Hasler_, Nov 10 2019

%Y Cf. A000096 (n + T(n)), A000217 (triangular numbers), A020639 (smallest prime factor).

%K nonn

%O 1,1

%A _Ali Sada_, Oct 28 2019

%E Simpler definition from _M. F. Hasler_, Nov 10 2019