%I #16 Jan 01 2021 12:07:33
%S 1,1,3,1,4,16,1,3,9,27,1,6,36,216,1296,1,5,25,125,625,3125,1,8,64,512,
%T 4096,32768,262144,1,3,9,27,81,243,729,2187,1,4,16,64,256,1024,4096,
%U 16384,65536,1,9,81,729,6561,59049,531441,4782969,43046721,387420489,1
%N Triangle read by rows: row n gives an n-term geometric progression with first term 1 such that the sum of the n terms is a multiple of n.
%H Michael De Vlieger, <a href="/A112668/b112668.txt">Table of n, a(n) for n = 1..11325</a> (rows 1 <= n <= 150, flattened)
%e 1
%e 1 3
%e 1 4 16
%e 1 3 9 27
%e 1 6 36 216 1296
%e 1 5 25 125 625 3125
%e ...
%p A112668 := proc(n) local a2,i,a ; a2 := 2 ; while (1-a2^n)/(1-a2) mod n <> 0 do a2 := a2+1 ; od ; a := [] ; for i from 1 to n do a := [op(a), a2^(i-1)] ; od ; RETURN(a) ; end: for row from 1 to 14 do r := A112668(row) : for n from 1 to nops(r) do printf("%d, ",op(n,r)) ; od : od : # _R. J. Mathar_, Mar 13 2007
%t Block[{a = {{1}}, k, s}, Do[k = 2; While[Mod[Total@ Set[s, NestList[# k &, 1, i - 1]], i] != 0, k++]; AppendTo[a, s], {i, 2, 10}]; a] // Flatten (* _Michael De Vlieger_, Dec 31 2020 *)
%Y Cf. A110737, A110738, A110739.
%K easy,nonn,tabl
%O 1,3
%A _Amarnath Murthy_, Aug 10 2005
%E More terms from _R. J. Mathar_, Mar 13 2007