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-3 of 3 results.

A011768 Number of Barlow packings that repeat after exactly n layers.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 3, 6, 7, 16, 21, 43, 63, 129, 203, 404, 685, 1343, 2385, 4625, 8492, 16409, 30735, 59290, 112530, 217182, 415620, 803076, 1545463, 2990968, 5778267, 11201472, 21702686, 42140890, 81830744, 159139498, 309590883, 602935713, 1174779333, 2290915478, 4469734225, 8726815264
Offset: 1

Views

Author

N. J. A. Sloane and Michael OKeeffe (MOKeeffe(AT)asu.edu)

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory); read transforms; M:=200;
    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 t1[N]:=PP(N); od:
    P:=proc(N) local s,d; s:=0; for d from 1 to N do if N mod d = 0 then s:=s+mobius(N/d)*t1[d]; fi; od: s; end; for N from 1 to M do lprint(N,P(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/(2 d)), {d, 1, n/2}], (n/3)(2^((n+1)/2) + 2 Cos[Pi(n+1)/2])];
    PP[n_] := PP[n] = (1/(4n))(Sum[did[n, d] EulerPhi[d] A[n, d], {d, 1, n}] + EE[n]);
    P[n_] := Module[{s = 0, d}, For[d = 1, d <= n, d++, If[Mod[n, d] == 0, s += MoebiusMu[n/d] PP[d]]]; s];
    Array[P, M] (* Jean-François Alcover, Apr 21 2020, from Maple *)
  • PARI
    apply( {A011768(n)=A371991(n)+if(n%3, 0, n>3, A371992(n/3), 1)}, [1..42]) \\ M. F. Hasler, May 27 2025

Formula

a(n) = (A011946(n/4) + A011947((n-2)/4) + A011948(n/2) + A011949(n/2) + A011950((n+1)/2) + A011951(n/2) + A011952(n/2) + A011953(n)) + (A011954((n-3)/6) + A011955(n/6-1) + A011955(n/6) + A011956(n/3)), where the terms with non-integer indices are set to 0. For n > 3, the two parenthesized terms are resp. A371991(n) and A371992(n/3). - Andrey Zabolotskiy, Feb 14 2024 and May 27 2025

Extensions

More terms from N. J. A. Sloane, Aug 10 2006

A371991 Number of different closest packings of equal spheres for hexagonal crystals having repeat period n.

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 3, 6, 6, 16, 21, 42, 63, 129, 201, 404, 685, 1340, 2385, 4625, 8487, 16409, 30735, 59282, 112530, 217182, 415605, 803076, 1545463, 2990945, 5778267, 11201472, 21702645, 42140890, 81830744, 159139428, 309590883, 602935713, 1174779207, 2290915478, 4469734225, 8726815041, 17047041429, 33319598126
Offset: 1

Views

Author

R. J. Mathar, Apr 15 2024

Keywords

Crossrefs

Programs

Formula

a(n) + A371992(n) = A000046(n).
a(n+1)/a(n) = 2 - 2/n + O(1/n^2). - M. F. Hasler, Jun 09 2025

Extensions

Offset changed to 1 and a(1) = 1 prefixed by M. F. Hasler, Jun 09 2025

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-3 of 3 results.