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.
%I A011954 #15 Jul 08 2025 02:43:42 %S A011954 1,1,2,4,11,20,42,84,170,340,682,1364,2728,5461,10922,21844,43690, %T A011954 87374,174762,349524,699050,1398100,2796192,5592404,11184806,22369620, %U A011954 44739242,89478462,178956970,357913940,715827882,1431655754,2863311486,5726623060,11453246122,22906492244,45812984490 %N A011954 Barlow packings with group R3(bar)m(SO) that repeat after 6n+3 layers. %H A011954 J. E. Iglesias, <a href="https://doi.org/10.1524/zkri.2006.221.4.237">Enumeration of closest-packings by the space group: a simple approach</a>, Z. Krist. 221 (2006) 237-245. %H A011954 T. J. McLarnan, <a href="http://dx.doi.org/10.1524/zkri.1981.155.3-4.269">The numbers of polytypes in close packings and related structures</a>, Zeits. Krist. 155, 269-291 (1981). %p A011954 # eq (6) in Iglesias Z Krist. 221 (2006) %p A011954 b := proc(p,q) %p A011954 local d; %p A011954 a := 0 ; %p A011954 for d from 1 to min(p,q) do %p A011954 if modp(p,d)=0 and modp(q,d)=0 then %p A011954 ph := floor(p/2/d) ; %p A011954 qh := floor(q/2/d) ; %p A011954 a := a+numtheory[mobius](d)*binomial(ph+qh,ph) ; %p A011954 end if ; %p A011954 end do: %p A011954 a ; %p A011954 end proc: %p A011954 # eq (17) in Iglesias Z Krist. 221 (2006) %p A011954 bt := proc(p,q) %p A011954 if type(p+q,'odd') then %p A011954 b(p,q); %p A011954 else %p A011954 0; # never happens since p+q = P = 2n+1. - _M. F. Hasler_, May 27 2025 %p A011954 end if; %p A011954 end proc: %p A011954 # eq (31) in Iglesias Z Krist. 221 (2006) %p A011954 A011954 := proc(n) %p A011954 local a,P,p,q ; %p A011954 if n = 0 then %p A011954 1; %p A011954 else %p A011954 P := 2*n+1 ; %p A011954 a :=0 ; %p A011954 for q from 0 to P do %p A011954 p := P-q ; %p A011954 if modp(p-q,3) <> 0 and p < q then %p A011954 a := a+bt(p,q) ; %p A011954 end if; %p A011954 end do: %p A011954 a ; %p A011954 end if; %p A011954 end proc: %p A011954 seq(A011954(n),n=0..40) ; # _R. J. Mathar_, Apr 15 2024 %o A011954 (PARI) apply( {A011954(n)=if(n, my(P=2*n+1, b(p,q)=sum(d=1, min(p,q), if(!(p%d || q%d), moebius(d)*binomial(q\d\2+p\d\2, p\d\2)))); sum(q=P\/2,P, if((P-q*2)%3, b(P-q, q))),1)}, [0..33]) \\ _M. F. Hasler_, May 27 2025 %K A011954 nonn,easy %O A011954 0,3 %A A011954 _N. J. A. Sloane_