cp's OEIS Frontend

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.

Showing 1-2 of 2 results.

A114438 Number of Barlow packings that repeat after n (or a divisor of n) layers.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 3, 8, 8, 18, 21, 48, 63, 133, 205, 412, 685, 1354, 2385, 4644, 8496, 16431, 30735, 59344, 112531, 217246, 415628, 803210, 1545463, 2991192, 5778267, 11201884, 21702708, 42141576, 81830748, 159140896, 309590883, 602938099, 1174779397, 2290920128
Offset: 1

Views

Author

N. J. A. Sloane, Feb 28 2006; more terms, Aug 10 2006

Keywords

Comments

See A011768 for the number of Barlow packings that repeat after exactly n layers.
Like A056353 but with additional restriction that adjacent beads must have different colors.

Crossrefs

Programs

  • Maple
    with(numtheory); read transforms; M:=500;
    A:=proc(N,d) if d mod 3 = 0 then 2^(N/d) else (1/3)*(2^(N/d)+2*cos(Pi*N/d)); fi; end;
    E:=proc(N) if N mod 2 = 0 then N*2^(N/2) + add( did(N/2,d)*phi(2*d)*2^(N/(2*d)),d=1..N/2) else (N/3)*(2^((N+1)/2)+2*cos(Pi*(N+1)/2)); fi; end;
    PP:=proc(N) (1/(4*N))*(add(did(N,d)*phi(d)*A(N,d), d=1..N)+E(N)); end; for N from 1 to M do lprint(N,PP(N)); od: # N. J. A. Sloane, Aug 10 2006
  • Mathematica
    M = 40;
    did[m_, n_] := If[Mod[m, n] == 0, 1, 0];
    A[n_, d_] := If[Mod[d, 3] == 0, 2^(n/d), (1/3)(2^(n/d) + 2 Cos[Pi n/d])];
    EE[n_] := If[Mod[n, 2] == 0, n 2^(n/2) + Sum[did[n/2, d] EulerPhi[2d] 2^(n/(2d)), {d, 1, n/2}], (n/3)(2^((n+1)/2) + 2 Cos[Pi(n+1)/2])];
    a[n_] := (1/(4n))(Sum[did[n, d] EulerPhi[d] A[n, d], {d, 1, n}] + EE[n]);
    Array[a, M] (* Jean-François Alcover, Apr 20 2020, from Maple *)

A011956 Number of close-packings with layer-number 3n and space group R3m.

Original entry on oeis.org

1, 2, 4, 10, 21, 42, 84, 164, 322, 620, 1200, 2300, 4429, 8482, 16303, 31259, 60105, 115472, 222332, 428106, 825774, 1593669, 3080004, 5956902, 11534689, 22352962, 43361663, 84181720, 163574114, 318079104, 619007004, 1205471654, 2349209058, 4581032192
Offset: 7

Views

Author

Keywords

Comments

Last column of Table 4 in McLarnan (1981), p. 277. See there for more information. - M. F. Hasler, May 26 2025

Crossrefs

Programs

  • Mathematica
    fa[p_, q_] := fa[p, q] = (p+q-1)!/(p!q!) - Sum[fa[p/d, q/d]/d, {d, Rest[Intersection@@(Divisors/@{p, q})]}];
    fb[p_, q_] := fb[p, q] = (Quotient[p, 2]+Quotient[q, 2])!/(Quotient[p, 2]!Quotient[q, 2]!) - Sum[fb[p/d, q/d], {d, Rest[Intersection@@(Divisors/@{p, q})]}];
    rh[n_] := Sum[fa[n-q, q]+fb[n-q, q], {q, Select[Range[n/2], !Divisible[n-2#, 3]&]}] / 2; (* A371992 *)
    fSO[n_] := Sum[fb[2n+1-q,q], {q, Select[Range[n+1,2n], !Divisible[2n+1-2#,3]&]}];(*A011954*)
    fb2[p_, q_] := fb2[p, q] = (p+q)!/(p!q!) - Sum[fb2[p/d, q/d], {d, Rest[Intersection@@(Divisors/@{p, q})]}]; (*A050186(p+q, p)*)
    fO[n_] := Sum[fb[2n-q, q] - If[EvenQ@q, fb2[n-q/2, q/2] - If[OddQ@n, fb[n-q/2, q/2], 0], 0] / 2, {q, Select[Range[n+1, 2n-1], !Divisible[n-#, 3]&]}]; (*A011955*)
    a[n_] := rh[n] - If[OddQ@n, fSO[(n-1)/2], fO[n/2]+fO[n/2-1]];
    Table[a[n],{n,7,50}] (* Andrei Zabolotskii, May 30 2025 *)
  • PARI
    apply( {A011956(n) = A371992(n) - if(n%2,A011954(n\2), A011955(n/2)+A011955(n/2-1))}, [7..20]) \\ M. F. Hasler, May 27 2025
    
  • Python
    def A011956(n): return A371992(n) - (A011954(n//2) if n&1 else A011955(n//2)+A011955(n//2-1))
    # M. F. Hasler, May 27 2025

Formula

a(n) = A371992(n) - A011954((n-1)/2) - A011955(n/2) - A011955(n/2-1), where the terms with non-integer indices are set to 0. - Andrei Zabolotskii and M. F. Hasler, May 27 2025

Extensions

Name and offset corrected by Andrei Zabolotskii, Feb 14 2024
Name changed by M. F. Hasler, May 26 2025
Terms a(17) onwards from Andrei Zabolotskii, May 30 2025
Showing 1-2 of 2 results.