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

A332440 Three-column array read by rows: the sequence of 14 triples of the positions of the numbers 0 to 13 in sequence A332439.

Original entry on oeis.org

0, 10, 14, 1, 5, 33, 24, 34, 38, 15, 25, 29, 6, 16, 20, 7, 11, 39, 2, 30, 40, 21, 31, 35, 12, 22, 26, 3, 13, 17, 4, 8, 36, 27, 37, 41, 18, 28, 32, 9, 19, 23
Offset: 0

Views

Author

Wolfdieter Lang, Apr 04 2020

Keywords

Comments

A332439 gives the vertex labels of a directed Euler tour (directed Eulerian cycle) on the regular 14-gon. Every label k from {0,1, ..., 13} for the vertices V^{(14)}_k (nodes) of this regular digraph of degree 6 appears thrice in this Euler tour of length 42.
The three positions of k in the tour A332439 = T are T(a(3*k)), T(a(3*k+1)) and T(a(3*k+2)), for k from {0,1, ..., 13}.

Examples

			The label 0 (vertex V^{14}_0 = (r, 0) in Cartesian coordinates) appears at positions 0, 10 and 14 in the Euler tour A332439. This means that starting at V^{14}_0, one reaches this vertex again after 10 steps (a closed directed trail, using only distinct arrows). But no periodicity has been reached yet, and after another four steps one visits V^{14}_0 again (position 14), and finally periodicity is reached after another 28 steps (position 42 == 0 (mod 14)).
The array T(n, k) in full is:
n\k  1   2   3
--------------
0:   0  10  14
1:   1   5  33
2:  24  34  38
3:  15  25  29
4:   6  16  20
5:   7  11  39
6:   2  30  40
7:  21  31  35
8:  12  22  26
9:   3  13  17
10:  4  8   36
11: 27  37  41
12: 18  28  32
13:  9  19  23
		

Crossrefs

Cf. A332439.

Formula

T(n, k), for n = 0, 1, ..., 13 and k = 1, 2, and 3, is the first, second and third appearance of n in A332439.

A216371 Odd primes with one coach: primes p such that A135303((p-1)/2) = 1.

Original entry on oeis.org

3, 5, 7, 11, 13, 19, 23, 29, 37, 47, 53, 59, 61, 67, 71, 79, 83, 101, 103, 107, 131, 139, 149, 163, 167, 173, 179, 181, 191, 197, 199, 211, 227, 239, 263, 269, 271, 293, 311, 317, 347, 349, 359, 367, 373, 379, 383, 389, 419, 421, 443, 461, 463, 467, 479, 487
Offset: 1

Views

Author

Gary W. Adamson, Sep 05 2012

Keywords

Comments

Given that prime p has only one coach, the corresponding value of k in A003558 must be (p-1)/2, and vice versa. Using the Coach theorem of Jean Pedersen et al., phi(b) = 2 * c * k, with b odd. Let b = p, prime. Then phi(p) = (p-1), and k must be (p-1)/2 iff c = 1. Or, phi(p) = (p-1) = 2 * 1 * (p-1)/2.
Conjecture relating to odd integers: iff an integer is in the set A216371 and is either of the form 4q - 1 or 4q + 1, (q>0); then the top row of its coach (cf. A003558) is composed of a permutation of the first q odd integers. Examples: 11 is of the form 4q - 1, q = 3; with the top row of its coach [1, 5, 3]. 13 is of the form 4q + 1, q = 3; so has a coach of [1, 3, 5]. 37 is of the form 4q + 1, q = 9; so has a coach with the top row composed of a permutation of the first 9 odd integers: [1, 9, 7, 15, 11, 13, 3, 17, 5]. - Gary W. Adamson, Sep 08 2012
Odd primes p such that 2^m is not congruent to 1 or -1 (mod p) for 0 < m < (p-1)/2. - Charles R Greathouse IV, Sep 15 2012
These are also the odd primes a(n) for which there is only one periodic Schick sequence (see the reference, and also the Brändli and Beyne link, eq. (2) for the recurrence but using various inputs. See also a comment in A332439). This sequence has primitive period length (named pes in Schick's book) A003558((a(n)-1)/2) = A005034(a(n)) = A000010(a(n))/2 = (a(n) - 1)/2, for n >= 1. - Wolfdieter Lang, Apr 09 2020
From Jianing Song, Dec 24 2022: (Start)
Primes p such that the multiplicative order of 4 modulo p is (p-1)/2. Proof of equivalence: let ord(a,k) be the multiplicative of a modulo k.
If 2^m is not 1 or -1 (mod p) for 0 < m < (p-1)/2, then ord(2,p) is either p-1 or (p-1)/2. If ord(2,p) = p-1, then ord(4,p) = (p-1)/2. If ord(2,p) = (p-1)/2, then p == 3 (mod 4), otherwise 2^((p-1)/4) == -1 (mod p), so ord(4,p) = (p-1)/2.
Conversely, if ord(4,p) = (p-1)/2, then ord(2,p) = p-1, or ord(2,p) = (p-1)/2 and p == 3 (mod 4) (otherwise ord(4,p) = (p-1)/4). In the first case, (p-1)/2 is the smallest m > 0 such that 2^m == +-1 (mod p); in the second case, since (p-1)/2 is odd, 2^m == -1 (mod p) has no solution. In either case, so 2^m is not 1 or -1 (mod p) for 0 < m < (p-1)/2.
{(a(n)-1)/2} is the sequence of indices of fixed points of A053447.
A prime p is a term if and only if one of the two following conditions holds: (a) 2 is a primitive root modulo p; (b) p == 3 (mod 4), and the multiplicative order of 2 modulo p is (p-1)/2 (in this case, we have p == 7 (mod 8) since 2 is a quadratic residue modulo p). (End)
From Jianing Song, Aug 11 2023: (Start)
Primes p such that 2 or -2 (or both) is a primitive root modulo p. Proof of equivalence: if ord(2,p) = p-1, then clearly ord(4,p) = (p-1)/2. If ord(-2,p) = p-1, then we also have ord(4,p) = (p-1)/2. Conversely, suppose that ord(4,p) = (p-1)/2, then ord(2,p) = p-1 or (p-1)/2, and ord(-2,p) = p-1 or (p-1)/2. If ord(2,p) = ord(-2,p) = (p-1)/2, then we have that (p-1)/2 is odd and (-1)^((p-1)/2) == 1 (mod p), a contradiction.
A prime p is a term if and only if one of the two following conditions holds: (a) -2 is a primitive root modulo p; (b) p == 3 (mod 4), and the multiplicative order of -2 modulo p is (p-1)/2 (in this case, we have p == 3 (mod 8) since -2 is a quadratic residue modulo p). (End)
No terms are congruent to 1 modulo 8, since otherwise we would have 4^((p-1)/4) = (+-2)^((p-1)/2) == 1 (mod p). - Jianing Song, May 14 2024
The n-th prime A000040(n) is a term iff A376010(n) = 2. - Max Alekseyev, Sep 05 2024

Examples

			Prime 23 has a k value of 11 = (23 - 1)/2 (Cf. A003558(11)). It follows that 23 has only one coach (A135303(11) = 1). 23 is thus in the set. On the other hand 31 is not in the set since A135303(15) shows 3 coaches, with A003558(15) = 5.
13 is in the set since A135303(6) = 1; but 17 isn't since A135303(8) = 2.
		

References

  • P. Hilton and J. Pedersen, A Mathematical Tapestry, Demonstrating the Beautiful Unity of Mathematics, 2010, Cambridge University Press, pages 260-264.
  • 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

Union of A001122 and A105874.
A105876 is the subsequence of terms congruent to 3 modulo 4.
Complement of A268923 in the set of odd primes.
Cf. A082654 (order of 4 mod n-th prime), A000010, A000040, A003558, A005034, A053447, A054639, A135303, A364867, A376010.

Programs

  • Maple
    isA216371 := proc(n)
        if isprime(n) then
            if A135303((n-1)/2) = 1 then
                true;
            else
                false;
            end if;
        else
            false;
        end if;
    end proc:
    A216371 := proc(n)
        local p;
        if n = 1 then
            3;
        else
            p := nextprime(procname(n-1)) ;
            while true do
                if isA216371(p) then
                    return p;
                end if;
                p := nextprime(p) ;
            end do:
        end if;
    end proc:
    seq(A216371(n),n=1..40) ; # R. J. Mathar, Dec 01 2014
  • Mathematica
    Suborder[a_, n_] := If[n > 1 && GCD[a, n] == 1, Min[MultiplicativeOrder[a, n, {-1, 1}]], 0]; nn = 150; Select[Prime[Range[2, nn]], EulerPhi[#]/(2*Suborder[2, #]) == 1 &] (* T. D. Noe, Sep 18 2012 *)
    f[p_] := Sum[Cos[2^n Pi/((2 p + 1))], {n, p}]; 1 + 2 * Select[Range[500], Reduce[f[#] == -1/2, Rationals] &]; (* Gerry Martens, May 01 2016 *)
  • PARI
    is(p)=for(m=1,p\2-1, if(abs(centerlift(Mod(2,p)^m))==1, return(0))); p>2 && isprime(p) \\ Charles R Greathouse IV, Sep 18 2012
    
  • PARI
    is(p) = isprime(p) && (p>2) && znorder(Mod(4,p)) == (p-1)/2 \\ Jianing Song, Dec 24 2022

Formula

a(n) = 2*A054639(n) + 1. - L. Edson Jeffery, Dec 18 2012

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

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.

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