login
a(n) is the smallest multiple of n of the type k*n + k*(k+1)/2, i.e., the smallest sum (n+1) to (n+k) which is divisible by n.
6

%I #20 Mar 25 2019 09:22:09

%S 2,12,9,56,30,24,63,240,108,50,165,132,234,126,90,992,408,180,513,420,

%T 147,308,759,480,900,390,1053,224,1218,570,1395,4032,429,680,595,324,

%U 1998,912,546,720,2460,1050,2709,1936,450,1334,3243,2064,3528,1500,1020

%N a(n) is the smallest multiple of n of the type k*n + k*(k+1)/2, i.e., the smallest sum (n+1) to (n+k) which is divisible by n.

%C From _Robert Israel_, Jun 26 2018: (Start)

%C a(n) = 3*n*(n-1)/2 if n is an odd prime power.

%C a(2^k) = 4^(k+1) - 2^(k+1). (End)

%H Robert Israel, <a href="/A081468/b081468.txt">Table of n, a(n) for n = 1..10000</a>

%e a(4) = 5 + 6 + 7 + 8 + 9 + 10 + 11 = 56; A081467(4) = 11.

%p f:= proc(n) local k;

%p k:= min(map(t ->rhs(op(t)),{msolve(k*(k+1),2*n)}) minus {0});

%p k*n+k*(k+1)/2

%p end proc:

%p f(1):= 2:

%p map(f, [$1..100]); # _Robert Israel_, Jun 26 2018

%t a[n_] := For[k = 1, True, k++, If[Divisible[m = k n + k(k+1)/2, n], Return[m] ] ]; Array[a, 100] (* _Jean-François Alcover_, Mar 25 2019 *)

%o (PARI) a(n) = {my(k = 1); while((s=k*n + k*(k+1)/2) % n, k++); s;} \\ _Michel Marcus_, Jul 29 2017

%Y Cf. A081467, A081469, A081470, A081471, A081472.

%K nonn,look

%O 1,1

%A _Amarnath Murthy_, Mar 23 2003

%E More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 06 2003