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

A333849 a(n) = gcd(A333848(n), 2*(2*n+1)), for n >= 0.

Original entry on oeis.org

2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 6, 1, 2, 1, 2, 1, 2, 2, 2, 6, 2, 1, 2, 1, 1, 2, 2, 10, 6, 1, 2, 6, 2, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 6, 2, 2, 2, 2, 1, 6, 1, 2, 6, 2, 2, 6, 2, 1, 2, 2, 1, 6, 1, 2, 2, 2, 1, 2, 2, 2, 6, 2, 1, 2, 10, 2, 2, 2, 1, 10, 1, 2, 18, 2, 2, 2, 1, 2
Offset: 0

Views

Author

Wolfdieter Lang, May 01 2020

Keywords

Comments

For n >= 1, a(n) enters the formula for the length L(2*n+1) = A332441(n) of the directed Euler tour ET(2*n+1, q0 = 1) based on the unsigned Schick sequence for 2*n+1, namely L(2*n+1) = A003558(n)*2*(2*n+1)/a(n). For Schick sequences and references see A332439.

Crossrefs

Programs

  • Mathematica
    {2}~Join~Table[GCD[Total@ Select[Range[1, m, 2], GCD[#, m] == 1 &], 2 m], {m, Array[2 # + 1 &, 85]}] (* Michael De Vlieger, Oct 15 2020 *)
  • PARI
    f(n) = if (n==0, 0, my(m=2*n+1); vecsum(select(x->((gcd(m, x)==1) && (x%2)), [1..m]))); \\ A333848
    a(n) = gcd(f(n), 2*(2*n+1)); \\ Michel Marcus, May 05 2020

Formula

a(n) = gcd(A333848(n), 2*(2*n+1)), for n >= 0.

A332441 The lengths of the primitive periods of the partial sums of the periodic unsigned Schick sequences with initial value 1, for N = 2*n + 1, for n >= 1, taken modulo 2*N.

Original entry on oeis.org

6, 10, 42, 54, 110, 78, 60, 68, 342, 42, 506, 250, 486, 406, 310, 330, 420, 666, 156, 410, 602, 540, 2162, 2058, 408, 1378, 220, 342, 3422, 1830, 378, 390, 4422, 1518, 4970, 1314, 1500, 2310, 6162, 4374, 6806, 680, 2436, 1958, 1092, 930, 3420, 2328, 2970, 5050, 10506
Offset: 1

Views

Author

Wolfdieter Lang, Apr 04 2020

Keywords

Comments

For the signed Schick sequences see the Schick reference, where the odd N is named p. The unsigned Schick sequences are used in the Brändli and Beyne paper.
See also a comment in A332439 where the periodic unsigned Schick sequences are named SBBseq(N, q0), with B(N) = A135303((N-1)/2) different odd initial values q0 satisfying gcd(q0, N) = 1. The complete set of the primitive periods SBB(N, q0) of these sequences is named SBB(N).
The length of the primitive periods SBB(N, q0) is identical for each of the B(N) different q0 values, and named pes(N) by Schick.
Here only the lengths of the primitive periods of the partial sums of SBBseq(N, q0 = 1) (mod 2*N) is given, namely a(n) = L(2*n+1, 1).
Note that this length depends in general on the initial value q0: L(2*n+1, q0). For example, the B(65) = 4 initial values q0 = 1, 3, 7, and 11 for n = 32, N = 65, have lengths a(32) = 390, 390, 78 = 390/5, and 390, respectively.
The general length formula is L(N, q0) = 2*N*pes(N)/gcd(SUM(SBB(N, q0)), 2*N), with pes(N) = A003558((N-1)/2), and the gcd values are shown for the N values with B(N) = 1 (q0 = 1) in A333849, and for more than one initial value (B(N) >= 2) in A333851.
a(n) gives also the length of the corresponding Euler tour ET(2*n+1, q0 = 1), which may not involve all vertices of a regular (2*(2*n+1))-gon. Also the digraphs underlying these Euler tours are not always regular. See some examples below.

Examples

			n = 8 (N = 17): B(17) = 2, pes(17) = 4. SBBseq(17, 1) = repeat(1, 15, 13, 9, ),  SBBseq(17, 3) = repeat(3, 11, 5, 7, ). Euler tour ET(N, 1) = [0, 1, 16, 29, 4, 5, 20, 33, 8, 9, 24, 3, 12, 13, 28, 7, 16, 17, 32, 11, 20, 21, 2, 15, 24, 25, 6, 19, 28, 29, 10, 23, 32, 33, 14, 27, 2, 3, 18, 31, 6, 7, 22, 1, 10, 11, 26, 5, 14, 15, 30, 9, 18, 19, 0, 13, 22, 23, 4, 17, 26, 27, 8, 21, 30, 31, 12, 25, 0]. This corresponds to a regular digraph of degree 4. Neff(17) = 2*17 = 34, L(17) = 34*4/2 = 68 = a(8). Note that for N = 17 the denominator is A333851(1, 1) = 2. There is another Euler tour ET(N, 2) of the same length.
n = 10 (N = 21): B(21) = 1, pes(21) = 6. SBBseq(21, 1) = repeat(1, 19, 17, 13, 5, 11, ). The Euler tour ET(N, 1) = [0, 1, 20, 37, 8, 13, 24, 25, 2, 19, 32, 37, 6, 7, 26, 1, 14, 19, 30, 31, 8, 25, 38, 1, 12, 13, 32, 7, 20, 25, 36, 37, 14, 31, 2, 7, 18, 19, 38, 13, 26, 31, 0]. The Neff(21) = 21 vertex labels for the 42-gon are {6*k, 6*k+1, 6*k+2}, for k = 0..6. The digraph is not regular, the vertices with labels 6*k have degree 2 (visited once), for labels 6*k+1 the degree is 6, and for labels 6*k+2 the degree is 4. All other 21 vertices of the 42-gon are not involved (or have degree 0, and the connectivity number of the unconnected digraph is 22). L(21) = 7*(2/2 + 6/2 + 4/2) = 7*6 = 42 = a(10) = 2*21*6/6, because A333849(10) = 6.
		

References

  • Carl Schick, Trigonometrie und unterhaltsame Zahlentheorie, Bokos Druck, Zürich, 2003 (ISBN 3-9522917-0-6). Tables 3.1 to 3.10, for odd p = 3..113 (with gaps), pp. 158-166.

Crossrefs

Programs

  • PARI
    A333848(n) = if (n==0, 0, my(m=2*n+1); vecsum(select(x->((gcd(m, x)==1) && (x%2)), [1..m])));
    A333849(n) = gcd(A333848(n), 2*(2*n+1));
    isok8(m, n) = my(md = Mod(2, 2*n+1)^m); (md==1) || (md==-1);
    A003558(n) = my(m=1); while(!isok8(m, n) , m++); m;
    B(n) = eulerphi(n)/(2*A003558((n-1)/2));
    a(n) = {my(m = 2*n+1, period = A003558(n)); if (B(m) == 1, return(2*m*period/A333849(n))); my(q=1, qs = List([q])); for (i=1, period-1, q = abs(m-2*q); listput(qs, q);); 2*m*period/gcd(vecsum(Vec(qs)), 2*m);} \\ Michel Marcus, Jun 14 2020

Formula

The length a(n) = L(2*n+1 = N) = Sum_{j=1..Neff(N)} degree(Veff^{(2*N)}(j))/2, where Neff(N) is the number of vertices Veff^{(2*N)}, which are visited by the Euler tour. See the example N = 21 with Neff = 21 (not 2*N = 42) below.
a(n) = L(2*n+1 = N) = 2*N*A003558((N-1)/2)/A333849((N-1)/2), except for those N values from A333855 with the denominator replaced by the first gcd value given in the rows of array A333851. See a comment above for the general L(N, q0) formula.

Extensions

More terms from Michel Marcus, Jun 14 2020

A333850 Irregular triangle read by rows: T(n, k) gives the sums of the members of the primitive period of the unsigned Schick sequences for the odd numbers from A333855.

Original entry on oeis.org

38, 26, 95, 71, 59, 103, 67, 224, 176, 175, 151, 115, 232, 184, 303, 219, 254, 170, 146, 264, 204, 180, 144, 405, 309, 321, 261, 428, 368, 284, 296, 571, 511, 475, 379, 600, 612, 444, 538, 466, 406, 1254, 1050, 763, 727, 732, 516, 996, 1080, 840, 952, 772, 688, 724, 844, 712, 556, 1488, 1392, 1336, 1144
Offset: 1

Views

Author

Wolfdieter Lang, Jun 08 2020

Keywords

Comments

For Schick's sequences see comments in A332439. In A333848 the sum for members of the primitive periods of the unsigned Schick sequences SBB(N, q0 = 1) (BB for Brändli and Beyne) for the odd numbers N from A333854 are given. (In Schick's book p is used instead of odd N >= 3, and in A333848 his B(p) = 1).
The length of row n is A135303(A333855(n)) (the B numbers for A333855(n)).
The corresponding gcd(T(n,k), 2*A333855(n)) values are given in A333851. They are used for the formula of the length of the Euler tours ET(A333855(n), q0_k), for k = 1, 2, ..., B(A333855(n)) based on the unsigned Schick sequences.

Examples

			The irregular triangle T(n, k) begins (here A(n) = A333855(n)):
n,  A(n) \ k   1     2    3    4    5    6    7   8   9 ...
-------------------------------------------------------------
1,   17:      38    26
2,   31:      95    71   59
3,   33:     103    67
4,   41:     224   176
5,   43:     175   151  115
6,   51:     232   184
7,   57:     303   219
8,   63:     254   170  146
9,   65:     264   204  180  144
10,  73:     405   309  321  261
11,  85:     428   368  284  296
12,  89:     571   511  475  379
13,  91:     600   612  444
14,  93:     538   466  406
15,  97:    1254  1050
16,  99:     763   727
17, 105:     732   516
18, 109:     996  1080  840
19, 113:     952   772  688  724
20, 117:     844   712  556
21, 119:    1488  1392
22, 123:    1336  1144
23, 127:     637   517  457  469  433  385  385 361 325
24, 129:     649   469  469  385  397  361
25, 133:    1374  1218 1026
28, 137:    2456  2168
...
--------------------------------------------------------------------------
n = 1, N = 17, B(17) = A135303((17-1)/2) = 2. In cycle notation:
SBB(17, q0_1) = (1, 15, 13, 9) and SBB(17, q0_2) = (3, 11, 5, 7), with sums
T(1, 1) = 1 + 15 + 13 + 9 = 38 and T(1, 2) = 26. (38 + 26 = 64 = A333848(8) .)
		

References

  • Carl Schick, Trigonometrie und unterhaltsame Zahlentheorie, Bokos Druck, Zürich, 2003 (ISBN 3-9522917-0-6). Tables 3.1 to 3.10, for odd p = 3..113 (with gaps), pp. 158-166.

Crossrefs

Programs

  • PARI
    RRS(n) = select(x->(((x%2)==1) && (gcd(n, x)==1)), [1..n]);
    isok8(m, n) = my(md = Mod(2, 2*n+1)^m); (md==1) || (md==-1);
    A003558(n) = my(m=1); while(!isok8(m, n) , m++); m;
    B(n) = eulerphi(n)/(2*A003558((n-1)/2));
    fmiss(rrs, qs) = {for (i=1, #rrs, if (! setsearch(qs, rrs[i]), return (rrs[i])););}
    listb(nn) = {my(v=List()); forstep (n=3, nn, 2, my(bn = B(n)); if (bn >= 2, listput(v, n););); Vec(v);}
    persum(n) = {my(bn = B(n)); if (bn >= 2, my(vn = vector(bn)); my(q=1, qt = List()); my(p = A003558((n-1)/2)); my(rrs = RRS(n)); for (k=1, bn, my(qp = List()); q = fmiss(rrs, Set(qt)); listput(qp, q); listput(qt, q); for (i=1, p-1, q = abs(n-2*q); listput(qp, q); listput(qt, q);); vn[k] = vecsum(Vec(qp));); return (vn););}
    listas(nn) = {my(v = listb(nn)); vector(#v, k, persum(v[k]));} \\ Michel Marcus, Jun 13 2020

Formula

T(n, k) = Sum_{j=1..A003558(A333855(n))} SBB(A333855(n), q0_k)_j, with the unsigned Schick sequence SBB(N, q0) for all used initial values q0 = q0_k for k = 1, 2, ..., A135303(A333855(n)) (B numbers >= 2).

Extensions

Some terms were corrected by Michel Marcus, Jun 11 2010

A333851 Irregular triangle read by rows: T(n, k) = gcd(A333850(n, k), 2*A333855(n)), for n >= 1, and k = 1,2, ..., A135303(A333855(n)).

Original entry on oeis.org

2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 3, 2, 2, 2, 2, 2, 10, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 14, 38, 2, 2
Offset: 1

Views

Author

Wolfdieter Lang, Jun 08 2020

Keywords

Comments

The length of row n is A135303(A333855(n)) (the B numbers for A333855(n)).

Examples

			The irregular triangle T(n, k) begins (here A(n) = A333855(n)):
n,  A(n) \ k   1     2    3    4   5  6  7  8  9 ...
----------------------------------------------------------------
1,   17:       2     2
2,   31:       1     1    1
3,   33:       1     1
4,   41:       2     2
5,   43:       1     1    1
6,   51:       2     2
7,   57:       3     3
8,   63:       2     2    2
9,   65:       2     2   10    2
10,  73:       1     1    1    1
11,  85:       2     2    2    2
12,  89:       1     1    1    1
13,  91:       2     2    2
14,  93:       2     2    2
15,  97:       2     2
16,  99:       1     1
17, 105:       6     6
18, 109:       2     2    2
19, 113:       2     2    2    2
20, 117:       2     2    2
21, 119:       2     2
22, 123:       2     2
23, 127:       1     1    1    1   1  1  1  1  1
24, 129:       1     1    1    1   1  1
25, 133:       2    14   38
26, 137:       2     2
...
		

Crossrefs

Programs

  • PARI
    RRS(n) = select(x->(((x%2)==1) && (gcd(n, x)==1)), [1..n]);
    isok8(m, n) = my(md = Mod(2, 2*n+1)^m); (md==1) || (md==-1);
    A003558(n) = my(m=1); while(!isok8(m, n) , m++); m;
    B(n) = eulerphi(n)/(2*A003558((n-1)/2));
    fmiss(rrs, qs) = {for (i=1, #rrs, if (! setsearch(qs, rrs[i]), return (rrs[i])););}
    listb(nn) = {my(v=List()); forstep (n=3, nn, 2, my(bn = B(n)); if (bn >= 2, listput(v, n););); Vec(v);}
    pergcd(n) = {my(bn = B(n)); if (bn >= 2, my(vn = vector(bn)); my(q=1, qt = List()); my(p = A003558((n-1)/2)); my(rrs = RRS(n)); for (k=1, bn, my(qp = List()); q = fmiss(rrs, Set(qt)); listput(qp, q); listput(qt, q); for (i=1, p-1, q = abs(n-2*q); listput(qp, q); listput(qt, q);); vn[k] = gcd(vecsum(Vec(qp)), 2*n);); return (vn););}
    listag(nn) = {my(v = listb(nn)); vector(#v, k, pergcd(v[k]));} \\ Michel Marcus, Jun 14 2020

Formula

T(n, k) = gcd(A333850(n, k), 2*A333855(n)), for n >= 1, and k = 1, 2, ..., A135303(A333855(n)) (B numbers >= 2 for A333855(n)).

Extensions

Some incorrect terms were found by Michel Marcus, Jun 11 2010
Showing 1-4 of 4 results.