A093210 Row sums of A092964.
1, 4, 7, 16, 28, 54, 97, 184, 333
Offset: 0
Keywords
Formula
Conjecture: a(n) = A060477(n+4) - 2. - Ralf Stephan, Apr 24 2004
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
Triangle begins with: h=0: 1 h=1: 1, 1 h=2: 0, 1, 0 h=3: 0, 1, 1, 0 h=4: 0, 1, 1, 1, 0 h=5: 0, 1, 2, 2, 1, 0 h=6: 0, 1, 2, 3, 2, 1, 0 h=7: 0, 1, 3, 5, 5, 3, 1, 0 h=8: 0, 1, 3, 7, 8, 7, 3, 1, 0 h=9: 0, 1, 4, 9, 14, 14, 9, 4, 1, 0 ... T(6,3) counts classes {111000},{110100},{110010}, each of 6 aperiodic. The class {100100} contains 3 periodic words, counted by T(3,1) as {100}, consisting of 3 aperiodic words 100,010,001.
A := proc(r,n) local gf,d,genf; genf := 1/(1-x) ; gf := 0 ; for d in numtheory[divisors](r) do gf := gf + numtheory[mobius](d)*(subs(x= x^d,genf))^(r/d) ; od: gf := expand(gf/r) ; coeftayl(gf,x=0,n) ; end proc: A051168 := proc(n,k) if n<=1 then 1; elif n=0 or n=k then 0; else A(n-k,k) ; end if; end proc: seq(seq(A051168(n,k),k=0..n),n=0..10) ; # R. J. Mathar, Mar 29 2011
Table[If[n===0,1,1/n Plus@@(MoebiusMu[ # ]Binomial[n/#,k/# ]&/@ Divisors[GCD[n,k]])],{n,0,12},{k,0,n}] (* Wouter Meeussen, Jul 20 2008 *)
{T(n, k) = local(A, ps, c); if( k<0 || k>n, 0, if( n==0 && k==0, 1, A = x * O(x^n) + y * O(y^n); ps = 1 - x - y + A; for( m=1, n, for( i=0, m, c = polcoeff( polcoeff(ps, i, x), m-i, y); if( m==n && i==k, break(2), ps *= (1 -y^(m-i) * x^i + A)^c))); -c))} /* Michael Somos, Jul 03 2004 */
T(n,k) = if (n==0, 1, (1/n) * sumdiv(gcd(n,k), d, moebius(d) * binomial(n/d,k/d))); tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", ")); print); \\ Michel Marcus, May 16 2018
For k=5: T(4)=10 < n < T(5)=15 and all periods are of length 5: a(11)=1 period: [(4+3+2+1+1), (4+3+2+2), (4+3+3+1), (4+4+2+1), (5+3+2+1)]; a(12)=2 periods: [(4+3+2+2+1), (4+3+3+2), (4+4+3+1), (5+4+2+1), (5+3+2+1+1)]; and [(4+4+2+2), (5+3+3+1), (4+4+2+1+1), (5+3+2+2), (4+3+3+1+1)]; a(13)=2 periods: [(4+4+2+2+1), (5+3+3+2), (4+4+3+1+1), (5+4+2+2), (5+3+3+1+1)]; and [(5+4+3+1), (5+4+2+1+1), (5+3+2+2+1), (4+3+3+2+1), (4+4+3+2)]; a(14)=1 period: [(5+4+3+2), (5+4+3+1+1), (5+4+2+2+1), (5+3+3+2+1), (4+4+3+2+1)]. For k=16; j=8; n=T(k-1)+j=128; 1<q|(16,8) --> {2,4,8} a(128) = c(128) - a(T(7)+4) - a(T(3)+2) - a(T(1)+1) = 810 - 8 - 1 - 1 = 800. (binomial(16,8)-8*a(T(7)+4)-4*a(T(3)+2)-2*a(T(1)+1))/16 = (12870-64-4-2)/16 = 800 = a(128). Triangular view, with a(n) distributed in rows k=1,2,3.. according to T(k-1)< n <= T(k): 1; k=1, n=1 1, 0; k=2, n=2..3 1, 1, 0; k=3, n=4..6 1, 1, 1, 0; k=4, n=7..10 1, 2, 2, 1, 0; k=5, n=11..15 1, 2, 3, 2, 1, 0; k=6, n=16..21 1, 3, 5, 5, 3, 1, 0; 1, 3, 7, 8, 7, 3, 1, 0; 1, 4, 9, 14, 14, 9, 4, 1, 0; 1, 4, 12, 20, 25, 20, 12, 4, 1, 0; 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 0; 1, 5, 18, 40, 66, 75, 66, 40, 18, 5, 1, 0; 1, 6, 22, 55, 99, 132, 132, 99, 55, 22, 6, 1, 0; 1, 6, 26, 70, 143, 212, 245, 212, 143, 70, 26, 6, 1, 0;
A000217 := proc(n) n*(n+1)/2 ; end proc: A185700 := proc(n) local k,j,a,q; k := ceil( (-1+sqrt(1+8*n))/2 ) ; j := n-A000217(k-1) ; if n = 1 then return 1; elif j = k then return 0 ; end if; a := binomial(k,j) ; if not isprime(k) then for q in numtheory[divisors]( igcd(k,j)) minus {1} do a := a- procname(j/q+A000217(k/q-1))*k/q ; end do: end if; a/k ; end proc: seq(A185700(n),n=1..80) ; # R. J. Mathar, Jun 11 2011
LyndonQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And]&&Array[RotateRight[q,#]&,Length[q],1,UnsameQ]; Table[Length@Select[Join@@Permutations/@Select[IntegerPartitions[n],Length[#]===k&],LyndonQ],{n,10},{k,n}] (* Gus Wiseman, Dec 19 2017 *)
Square array begins: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, ... 1, 2, 3, 5, 7, 9, 12, 15, 18, 22, ... 1, 2, 5, 8, 14, 20, 30, 40, 55, 70, ... 1, 3, 7, 14, 25, 42, 66, 99, 143, 200, ... 1, 3, 9, 20, 42, 75, 132, 212, 333, 497, ... 1, 4, 12, 30, 66, 132, 245, 429, 715, 1144, ... 1, 4, 15, 40, 99, 212, 429, 800, 1430, 2424, ... 1, 5, 18, 55, 143, 333, 715, 1430, 2700, 4862, ... 1, 5, 22, 70, 200, 497, 1144, 2424, 4862, 9225, ... ... Reading by antidiagonals, we get: 1; 1, 1; 1, 1, 1; 1, 2, 2, 1; 1, 2, 3, 2, 1; 1, 3, 5, 5, 3, 1; 1, 3, 7, 8, 7, 3, 1; 1, 4, 9, 14, 14, 9, 4, 1; 1, 4, 12, 20, 25, 20, 12, 4, 1; 1, 5, 15, 30, 42, 42, 30, 15, 5, 1; 1, 5, 18, 40, 66, 75, 66, 40, 18, 5, 1; 1, 6, 22, 55, 99, 132, 132, 99, 55, 22, 6, 1; ...
# To produce the first 10 rows and columns (as on page 174 of the Elashvili et al. 1999 reference): with(numtheory): cnk:=(n,k) -> add(mobius(n/d)*d, d in divisors(gcd(n,k))); anmk:=(n,m,k)->(1/(n+m))*add( cnk(d,k)*binomial((n+m)/d,n/d), d in divisors(gcd(n,m))); # anmk(n,m,k) is the value of a_k(n,m) as in Theorem 1, Equation (4), of the Elashvili et al. 1999 reference. r2:=(n,k)->[seq(anmk(n,m,k),m=1..10)]; for n from 1 to 10 do lprint(r2(n,1)); od:
rows = 12; cnk[n_, k_] := Sum[MoebiusMu[n/d] d, {d , Divisors[GCD[n, k]]}]; anmk[n_, m_, k_] := (1/(n+m)) Sum[cnk[d, k] Binomial[(n+m)/d, n/d], {d, Divisors[GCD[n, m]]}]; r2[n_, k_] := Table[anmk[n, m, k], {m, 1, rows}]; T = Table[r2[n, 1], {n, 1, rows}]; Table[T[[n-k+1, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 05 2018, from Maple *)
The first few polynomials are: 1+x x x+x^2 x+x^2+x^3 x+2*x^2+2*x^3+x^4 x+2*x^2+3*x^3+2*x^4+x^5 x+3*x^2+5*x^3+5*x^4+3*x^5+x^6 ... The triangle begins: [ 1] 1, 1, [ 2] 0, 1, [ 3] 0, 1, 1, [ 4] 0, 1, 1, 1, [ 5] 0, 1, 2, 2, 1, [ 6] 0, 1, 2, 3, 2, 1, [ 7] 0, 1, 3, 5, 5, 3, 1, [ 8] 0, 1, 3, 7, 8, 7, 3, 1, [ 9] 0, 1, 4, 9, 14, 14, 9, 4, 1, [10] 0, 1, 4, 12, 20, 25, 20, 12, 4, 1, [11] 0, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, [12] 0, 1, 5, 18, 40, 66, 75, 66, 40, 18, 5, 1, [13] 0, 1, 6, 22, 55, 99, 132, 132, 99, 55, 22, 6, 1, [14] 0, 1, 6, 26, 70, 143, 212, 245, 212, 143, 70, 26, 6, 1 ...
with(numtheory); W:=r->expand((1/r)*add(mobius(d)*(1+x^d)^(r/d), d in divisors(r))); for n from 1 to 14 do lprint(W(n)); od: for n from 1 to 14 do lprint(seriestolist(series(W(n),x,50))); od:
T[n_, k_] := DivisorSum[GCD[n, k], MoebiusMu[#] Binomial[n/#, k/#]&]/n; Table[T[n, k], {n, 1, 14}, {k, 0, Max[1, n-1]}] // Flatten (* Jean-François Alcover, Dec 02 2015 *)
p(n) = if(n<=0, n==0, 'a0 + 1/n * sumdiv(n, d, moebius(d)*(1+x^d)^(n/d) )); /* print triangle: */ for (n=1,17, v=Vec( polrecip(Pol(p(n),x)) ); v[1]-='a0; print(v) ); /* Joerg Arndt, Oct 21 2012 */
T(n,k) = 1/n * sumdiv(gcd(n,k), d, moebius(d) * binomial(n/d,k/d) ); /* print triangle: */ { for (n=1, 17, for (k=0, max(1,n-1), print1(T(n,k),", "); ); print(); ); } /* Joerg Arndt, Oct 21 2012 */
a(5) = 5*(18*5-2) = 440; b(5) = a(5) + 5 = 445; c(5) = a(5)*2*5 = 450; d(5) = a(5) + 3*5 = 455; e(5) = a(5) + 4*5 = 460.
[2*n*(9*n-1): n in [1..50]]; // Vincenzo Librandi, Jul 10 2012
Table[2n(9n-1), {n,1,50}] (* Vincenzo Librandi, Jul 10 2012 *) LinearRecurrence[{3,-3,1},{16,68,156},50] (* Harvey P. Dale, Feb 15 2016 *)
a(n)=2*n*(9*n-1) \\ Charles R Greathouse IV, Jun 17 2017
[2*n*(9*n-1) for n in (1..50)] # G. C. Greubel, Jan 30 2019
Under the indicated mapping the list [1,1,1,1,1,1,1] of seven 1's results in the orbit [1,1,1,1,1,1,1], [2,1,1,1,1,1], [2,2,1,1,1], [3,2,1,1], [3,2,2], [3,3,1], [4,2,1], [3,2,1,1], ... which is clearly periodic with period-length 4, so a(7) = 4.
f[p_] := Module[{pp, x, lpp, m, i}, pp = p; x = pp[[1]]; pp = Delete[pp,1]; lpp = Length[pp]; m = Min[x, lpp]; For[i = 1, i ≤ m, i++, pp[[i]]++]; For[i = 1, i ≤ x - lpp, i++, AppendTo[pp, 1]]; pp]; orb[p_] := Module[{s, v}, v = p; s = {v}; While[! MemberQ[s, v = f[v]], AppendTo[s, v]]; s]; attractor[p_] := Module[{orbp, pos, len, per}, orbp = orb[p]; pos = Flatten[Position[orbp, f[orbp[[-1]]]]][[1]] - 1; (*pos = steps to enter period*) len = Length[orbp] - pos; per = Take[orbp, -len]; Sort[per]]; a = {}; For[n = 1, n ≤ 80, n++, {rn = Table[1, {k, 1, n}]; orbn = orb[rn]; lenorb = Length[orbn]; lenattr = Length[attractor[rn]]; AppendTo[a, lenattr]}]; Print[a];
For n=11 the period is [(4,3,2,1,1), (4,3,2,2), (4,3,3,1), (4,4,2,1), (5,3,2,1)]. For n=47 the period is [(9,8,7,6,6,4,3,2,1,1), (9,8,7,7,5,4,3,2,2), (9,8,8,6,5,4,3,3,1), (9,9,7,6,5,4,4,2,1), (10,8,7,6,5,5,3,2,1)]. For n=12 the 2 periods are [(4,3,2,2,1), (4,3,3,2), (4,4,3,1), (5,4,2,1), (5,3,2,1,1)] and [(4,3,3,1,1), (4,4,2,2), (5,3,3,1), (4,4,2,1,1), (5,3,2,2)]. For n=49 the 2 periods are [(9,8,7,7,6,4,3,2,2,1), (9,8,8,7,5,4,3,3,2), (9,9,8,6,5,4,4,3,1), (10,9,7,6,5,5,4,2,1), (10,8,7,6,6,5,3,2,1,1)] and [(9,8,8,6,6,4,3,3,1,1), (9,9,7,7,5,4,4,2,2),(10,8,8,6,5,5,3,3,1), (9,9,7,6,6,4,4,2,1,1), (10,8,7,7,5,5,3,2,2)].
List([1..50], n -> n*(25*n-3)/2); # G. C. Greubel, Jan 30 2019
[n*(25*n-3)/2: n in [1..50]]; // G. C. Greubel, Jan 30 2019
LinearRecurrence[{3,-3,1},{11,47,108},50] (* Harvey P. Dale, Jan 14 2019 *) Table[n*(25*n-3)/2, {n,1,50}] (* G. C. Greubel, Jan 30 2019 *)
a(n)=n*(25*n-3)/2 \\ Charles R Greathouse IV, Jun 18 2017
[n*(25*n-3)/2 for n in (1..50)] # G. C. Greubel, Jan 30 2019
For k=6: a(19)=26; a(20)=3; a(21)=35; a(22)=35; a(23)=29; a(24)=30; a(25)=31. For n=4: (1+1+1+1)->(4)->(3+1)->(2+2)->(1+1+2)->(1+3)--> a(4)=5 steps. For n=5: (1+1+1+1+1)->(5)->(4+1)->(3+2)->(2+1+2)->(1+1+3)->(2+3)->(1+2+2)--> a(5)=7 steps.
Comments