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.

A290602 Irregular triangle read by rows. T(n, k) gives the period length of the periodic sequence {A290600(n, k)^i}_{i >= A290601(n, k)} (mod A002808(n)), for n >= 1 and k = 1..A290599(n).

Original entry on oeis.org

1, 2, 1, 1, 1, 1, 1, 1, 1, 4, 2, 1, 1, 4, 2, 2, 1, 1, 2, 1, 1, 3, 3, 2, 1, 1, 6, 6, 4, 2, 1, 2, 1, 4, 1, 1, 1, 1, 1, 1, 1, 6, 1, 3, 1, 2, 1, 1, 1, 6, 1, 3, 4, 2, 1, 1, 4, 1, 4, 2, 2, 1, 4, 6, 2, 1, 3, 6, 2, 1, 3, 10, 5, 10, 10, 2, 1, 1, 5, 5, 10, 5, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Wolfdieter Lang, Aug 30 2017

Keywords

Comments

The length of row n is A290599(n).
See A290601 for the proof that this sequence is defined, and the definition of the type of periodicity (imin,P) with imin = A290601(n, k) and the period length P = T(n, k).

Examples

			The irregular triangle T(n, k) begins (N(n) = A002808(n)):
n   N(n) \ k  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
1   4         1
2   6         2  1  1
3   8         1  1  1
4   9         1  1
5   10        4  2  1  1  4
6   12        2  2  1  1  2  1  1
7   14        3  3  2  1  1  6  6
8   15        4  2  1  2  1  4
9   16        1  1  1  1  1  1  1
10  18        6  1  3  1  2  1  1  1  6  1  3
11  20        4  2  1  1  4  1  4  2  2  1  4
12  21        6  2  1  3  6  2  1  3
13  22       10  5 10 10  2  1  1  5  5 10  5
14  24        2  2  1  1  2  1  1  1  2  2  1  1  2  2  1
15  25        1  1  1  1
...
T(5, 1) = 4 because A290600(5, 1) = 2, N(5) = A002808(5) = 10, A290601(5, 1) = 1 and {2^i}_{i>=1} (mod 10) == {repeat(2,4,8,6)} with period length 4. This is of the type (1,4).
T(7, 6) = 6 because A290600(7, 6) = 10, N(7) = A002808(7) = 14, A290601(7, 6) = 1 and {10^i}_{i>=1} (mod 14) == {repeat(10, 2, 6, 4, 12, 8)} with period length 4. Type (1,6).
The sequence {A290600(10, 1)^i}_{i >= A290601(10, 1)} (mod A002808(10)) = {2^i}_{i >= 1} (mod 18) is periodic with period length P = T(10, 1) = 6. Namely, {repeat(2, 4, 8, 16, 14, 10)}, of type (1,6).
The periodicity types (imin,P) = (A290601(n, k), A290602(n, k)) begin:
n   N(n) \ k    1     2      3      4     5     6     7     8     9      10    11
1   4         (2,1)
2   6         (1,2) (1,1)  (1,1)
3   8         (3,1) (2,1)  (3,1)
4   9         (2,1) (2,1)
5   10        (1,4) (1,2)  (1,1)  (1,1) (1,4)
6   12        (2,2) (1,2)  (1,1)  (2,1) (1,2) (1,1) (2,1)
7   14        (1,3) (1,3)  (1,2)  (1,1) (1,1) (1,6) (1,6)
8   15        (1,4) (1,2)  (1,1)  (1,2) (1,1) (1,4)
9   16        (4,1) (2,1)  (4,1)  (2,1) (4,1) (2,1) (4,1)
10  18        (1,6) (2,1)  (1,3)  (2,1) (1,2) (1,1) (1,1) (2,1) (1,6)  (2,1) (1,3)
11  20        (2,4) (1,2)  (1,1)  (2,1) (1,4) (2,1) (1,4) (2,2) (1,2)  (1,1) (2,4)
12  21        (1,6) (1,2)  (1,1)  (1,3) (1,6) (1,2) (1,1) (1,3)
13  22       (1,10) (1,5) (1,10) (1,10) (1,2) (1,1) (1,1) (1,5) (1,5) (1,10) (1,5)
...
----------------------------------------------------------------------------------
		

Crossrefs

A290601 Irregular triangle read by rows: T(n, k) gives the least positive integer imin such that the sequence {A290600(n, k)^i}_{i >= imin} (mod A002808(n)) is periodic.

Original entry on oeis.org

2, 1, 1, 1, 3, 2, 3, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 2, 4, 2, 4, 2, 4, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 3, 1, 1, 3, 2, 3, 1, 1, 3, 2, 1, 3, 2, 2, 2, 2
Offset: 1

Views

Author

Wolfdieter Lang, Aug 30 2017

Keywords

Comments

The length of row n is A290599(n).
The corresponding period lengths are given in A290602(n, k).
Conjecture:There exists always an imin >= 1 such that the power sequence A290600(n, k)^i (mod A002808(n)) is periodic for i >= imin. Otherwise T(n, k) is undefined, and one could use T(n, k) = -1. See below for a proof.
This entry resulted from finding the correct initial exponent i for the power sequence considered in triangle A057593 for composite n and gcd(n, k) not equal to 1.
It is clear that the sequence {A290600(n, k)^i}_{i >= 1} is never congruent to 1 (mod A002808(n)) for k = 1..A290599(n). Proof by contradiction. Therefore one can replace 'least positive integer' with 'least nonnegative integer' in the name of this sequence.
The values of these powers of A290600(n, k) modulo A290599(n) are 0 or any of the row entries of A290600(n, k).
To prove periodicity of {A290600(n, k)^i (mod A290599(n))} of the type (imin,P) (starting at i = imin with period length P) one has to solve, with given K = A290600(n, k) and N = A002808(n), the congruence K^imin * (K^P - 1) == 0 (mod N).

Examples

			The irregular triangle T(n, k) begins (N(n) = A002808(n)):
n   N(n) \ k  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
1   4         2
2   6         1  1  1
3   8         3  2  3
4   9         2  2
5   10        1  1  1  1  1
6   12        2  1  1  2  1  1  2
7   14        1  1  1  1  1  1  1
8   15        1  1  1  1  1  1
9   16        4  2  4  2  4  2  4
10  18        1  2  1  2  1  1  1  2  1  2  1
11  20        2  1  1  2  1  2  1  2  1  1  2
12  21        1  1  1  1  1  1  1  1
13  22        1  1  1  1  1  1  1  1  1  1  1
14  24        3  1  2  3  1  1  3  2  3  1  1  3  2  1  3
15  25        2  2  2  2
...
T(4, 1) = 2 because A290600(4, 1) = 3, A002808(4) = 9 and {3^i}_{i>=2} (mod 9) = {repeat(0)}, but 3^0 == 1 (mod 9) and  3^1 == 3 (mod 9).
T(4, 2) = 2 because A290600(4, 2) = 6 and  {6^i}_{i>=2} (mod 9) == {repeat(0)}, and 6^0 (mod 9) = 1, 6^1 (mod 9) = 6.
Example for a proof of periodicity of type (1,6) for K = A290600(10, 1) = 2, N = A002808(10) = 18: 2^imin*(2^P - 1) == 0 (mod 18). gcd(2^imin, 18) = 2, and with imin = 1 one has  2^P == 1 (mod 9). Since gcd(2, 9) = 1, a solution exists (Euler): P = phi(9) = 6.
		

Crossrefs

A290599 Number of numbers from 1 to A002808(n) - 1 that are non-coprime to A002808(n).

Original entry on oeis.org

1, 3, 3, 2, 5, 7, 7, 6, 7, 11, 11, 8, 11, 15, 4, 13, 8, 15, 21, 15, 12, 17, 10, 23, 19, 14, 23, 29, 23, 20, 23, 31, 6, 29, 18, 27, 35, 14, 31, 20, 29, 43, 31, 26, 31, 16, 45, 35, 24, 45, 47, 37, 34, 39, 16, 53, 47, 26, 41, 59, 20, 43, 30, 47, 65, 18, 47, 32, 47, 22, 63, 55, 38, 59
Offset: 1

Views

Author

Wolfdieter Lang, Aug 30 2017

Keywords

Comments

a(n) is the number of positive numbers k < A002808(n) with gcd(A002808(n), k) not 1.
a(n) gives the row length of the irregular triangle A290600.

Examples

			a(4) = 2 because A002808(4) = 9, with the two non-coprime positive numbers smaller than 9, namely 3 and 6. See row n = 4 of A290600.
		

Crossrefs

Programs

  • PARI
    [k-1-eulerphi(k) | k<-[2..100], !isprime(k)] \\ Andrew Howroyd, Apr 26 2020

Formula

a(n) = A016035(A002808(n)). - Andrew Howroyd, Apr 26 2020

Extensions

Terms a(51) and beyond from Andrew Howroyd, Apr 26 2020

A366192 Pairs (i, j) of noncoprime positive integers sorted first by i + j then by i.

Original entry on oeis.org

2, 2, 2, 4, 3, 3, 4, 2, 2, 6, 4, 4, 6, 2, 3, 6, 6, 3, 2, 8, 4, 6, 5, 5, 6, 4, 8, 2, 2, 10, 3, 9, 4, 8, 6, 6, 8, 4, 9, 3, 10, 2, 2, 12, 4, 10, 6, 8, 7, 7, 8, 6, 10, 4, 12, 2, 3, 12, 5, 10, 6, 9, 9, 6, 10, 5, 12, 3, 2, 14, 4, 12, 6, 10, 8, 8, 10, 6, 12, 4, 14, 2
Offset: 1

Views

Author

Peter Luschny, Oct 10 2023

Keywords

Comments

The rows of A290600 interleaved term by term with the reversed rows of A290600. - Peter Munn, Jan 28 2024

Examples

			The first few pairs are, seen as an irregular triangle (where rows with a prime index are empty (and are therefore missing)):
  [2,  2],
  [2,  4], [3,  3], [4, 2],
  [2,  6], [4,  4], [6, 2],
  [3,  6], [6,  3],
  [2,  8], [4,  6], [5, 5], [6, 4], [ 8, 2],
  [2, 10], [3,  9], [4, 8], [6, 6], [ 8, 4], [ 9, 3], [10, 2],
  [2, 12], [4, 10], [6, 8], [7, 7], [ 8, 6], [10, 4], [12, 2],
  [3, 12], [5, 10], [6, 9], [9, 6], [10, 5], [12, 3],
  ...
There are A016035(n) pairs in row n.
		

Crossrefs

Cf. A016035, A290600 (first bisection), A352911 (complement).

Programs

  • Maple
    aList := proc(upto) local F, P, n, t, count;
    P := NULL; count := 0:
    for n from 2 while count < upto do
        F := select(t -> igcd(t, n - t) <> 1, [$1..n-1]);
        P := P, seq([t, n - t], t = F);
        count := count + nops([F]) od:
    ListTools:-Flatten([P]) end:
    aList(16);
  • Mathematica
    A366192row[n_]:=Select[Array[{#,n-#}&,n-1],!CoprimeQ[First[#],Last[#]]&];
    Array[A366192row,20,2] (* Paolo Xausa, Nov 28 2023 *)
  • Python
    from math import gcd
    from itertools import chain, count, islice
    def A366192_gen(): # generator of terms
        return chain.from_iterable((i,n-i) for n in count(2) for i in range(1,n) if gcd(i,n-i)>1)
    A366192_list = list(islice(A366192_gen(),30)) # Chai Wah Wu, Oct 10 2023
Showing 1-4 of 4 results.