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.

A371992 Number of different closest packings of equal spheres for rhombohedral crystals having repeat period n.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 5, 8, 15, 23, 41, 70, 126, 223, 406, 740, 1370, 2545, 4769, 8977, 16985, 32261, 61469, 117488, 225060, 432159, 831235, 1601796, 3090926, 5973198, 11556533, 22385600, 43405353, 84247085, 163661488, 318209920, 619181766, 1205733457, 2349558582, 4581555964, 8939468450, 17453081143, 34094082857
Offset: 1

Views

Author

R. J. Mathar, Apr 15 2024

Keywords

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})]}]; (*A051168(p+q,p); Iglesias Eq. (1)*)
    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})]}]; (*A180424(p+q,p); Eq. (2)*)
    am[p_] := am[p] = 2^(p-1) - Sum[am[p/d], {d, Rest@Divisors@p}]; (*A000740; Eq. (6)*)
    atf[p_] := atf[p] = 2^(p-1)/p - Sum[atf[p/d]/d, {d, Select[Rest@Divisors@p, OddQ]}];(*A000048; Eq. (9)*)
    a[n_] := Sum[With[{p=n-q}, fa[p,q]+fb[p,q] + If[p==q, am[p]+atf[p]-fa[p,q]-fb[p,q], 0] / 2], {q, Select[Range[n/2], !Divisible[n-2#,3]& (*the opposite condition would give A371991*)]}] / 2; (* Eq. (5) *)
    Table[a[n], {n, 2, 40}] (* Andrei Zabolotskii, May 30 2025 *)
  • PARI
    apply( {A371992(n)=sum(q=1, n\2, if((n-2*q)%3, A051168(n,q)+A180424(n,q)))/2}, [1..40]) \\ M. F. Hasler, Jun 05 2025

Formula

a(n) + A371991(n) = A000046(n).
a(n+1)/a(n) = 2 - 2/n + o(1/n). - M. F. Hasler, Jun 09 2025

Extensions

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

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
Showing 1-2 of 2 results.