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.

A039791 Sequence arising in search for Legendre sequences.

Original entry on oeis.org

1, 1, 2, 4, 6, 14, 66, 95, 280, 1464, 2694, 10452, 41410, 95640, 323396, 1770963, 5405026, 13269146, 73663402, 164107650, 582538732, 3811895344, 7457847082, 30712068524, 151938788640, 353218528324, 1738341231644, 7326366290632, 17280039555348, 63583110959728
Offset: 1

Views

Author

Keywords

Comments

Number of bit strings of length L = 2n+1 and Hamming weight n (or n+1, as generated by Fletcher et al.) up to chord equivalence (i.e., up to color and general linear permutation x -> Ax+b mod L for A on Z/LZ* and b on Z/LZ--essentially a multiplicative necklace of phi(L) additive necklaces of L black and white beads where L is odd and the colors are as balanced as possible). The same strings are counted up to bracelet equivalence (x -> +-x+b mod L) at A007123, up to necklace equivalence (x -> x+b mod L) at A000108, and in full (x -> x) at A001700. - Travis Scott, Nov 24 2022

Examples

			From _Travis Scott_, Nov 24 2022: (Start)
If we decompose by weight the classes of period 2n+1 counted at A002729, a(n) appears as the twin towers of that triangle.
                              a(n)
                             |   |
                            (1) (1)
                         1   1   1   1
                     1   1   1   1   1   1
                 1   1   1   2   2   1   1   1
             1   1   2   3   4   4   3   2   1   1
         1   1   1   2   4   6   6   4   2   1   1  1
      1  1   1   3   7  10  14  14  10   7   3   1  1  1
   1  1  3   7  18  34  54  66  66  54  34  18   7  3  1  1
1  1  1  3  11  25  49  75  95  95  75  49  25  11  3  1  1  1. (End)
		

Crossrefs

Coincides with A002995 offset by -1 at the A005097-th terms.

Programs

  • Mathematica
    Module[{a,b,g,L,m,x,z,Z},Table[L=2n+1;Z=Sum[Sum[Product[g=L/GCD[L,(k-1)i+j];Subscript[x,#]^(1/#)&@If[k==1,g,m=MultiplicativeOrder[k,g];g/GCD[g,(k^m-1)/(k-1)]m],{i,L}]L/GCD[L,k-1],{j,GCD[L,k-1]}],{k,Select[Range@L,CoprimeQ[#,L]&]}]/L/EulerPhi@L/.Subscript[x,z_]->a^z+b^z;CoefficientList[Z,{a,b}][[n+1,n+2]],{n,30}]] (* Travis Scott, Nov 24 2022 *)

Formula

a(n) ~ C(2n+1, n)/(2n+1)/phi(2n+1)
Empirical: a(n) == 1 (mod 2) for 2n+1 of the form 2^k+1 but not of the form p^2, else == 0.

Extensions

More terms from Travis Scott, Nov 24 2022