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.

Previous Showing 31-40 of 93 results. Next

A139555 a(n) = number of prime-powers (including 1) that each are <= n and are coprime to n.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 5, 4, 6, 4, 8, 4, 9, 6, 7, 7, 11, 6, 12, 8, 10, 8, 13, 8, 13, 10, 13, 11, 16, 8, 17, 14, 15, 13, 16, 11, 19, 14, 16, 13, 20, 12, 21, 16, 17, 16, 22, 15, 22, 17, 20, 18, 24, 17, 22, 18, 21, 19, 25, 16, 26, 21, 22, 22, 25, 18, 28, 22, 25, 19, 29, 21, 30, 24, 26, 24
Offset: 1

Views

Author

Leroy Quet, Apr 27 2008

Keywords

Comments

Indices of first occurrence of each natural number: 1, 3, 5, 7, 9, 15, 11, 13, 21, 17, 19, 23, 32, 33, ..., . - Robert G. Wilson v
From Reinhard Zumkeller, Oct 27 2010: (Start)
a(n) <= A000010(n); a(A051250(n)) = A000010(A051250(n)), 1 <= n <= 17;
conjecture: a(n) < A000010(n) for n > 60, cf. A051250. (End)

Examples

			All the positive integers <= 21 that are coprime to 21 are 1,2,4,5,8,10,11,13,16,17,19,20. Of these integers, only 1,2,4,5,8,11,13,16,17,19 are prime-powers. There are 10 of these prime-powers; so a(21) = 10.
		

Crossrefs

Cf. A139556.
Cf. A065515. - Reinhard Zumkeller, Oct 27 2010

Programs

  • Haskell
    a139555 = sum . map a010055 . a038566_row
    -- Reinhard Zumkeller, Feb 23 2012, Oct 27 2010
  • Maple
    isA000961 := proc(n) if n = 1 or isprime(n) then true; else RETURN(nops(ifactors(n)[2]) =1) ; fi ; end: A139555 := proc(n) local a,i; a := 0 ; for i from 1 to n do if isA000961(i) and gcd(i,n) = 1 then a := a+1 ; fi ; od: a ; end: seq(A139555(n),n=1..100) ; # R. J. Mathar, May 12 2008
  • Mathematica
    f[n_] := Length@ Select[Range@ n, Length@ FactorInteger@ # == 1 == GCD[n, # ] &]; Array[f, 76] (* Robert G. Wilson v *)

Formula

a(n) = Sum_{k=1..A000010(n)} A010055(A038566(n,k)). - Reinhard Zumkeller, Feb 23 2012

Extensions

More terms from R. J. Mathar and Robert G. Wilson v, May 12 2008

A319514 The shell enumeration of N X N where N = {0, 1, 2, ...}, also called boustrophedonic Rosenberg-Strong function. Terms are interleaved x and y coordinates.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Sep 22 2018

Keywords

Comments

If (x, y) and (x', y') are adjacent points on the trajectory of the map then for the boustrophedonic Rosenberg-Strong function max(|x - x'|, |y - y'|) is always 1 whereas for the Rosenberg-Strong function this quantity can become arbitrarily large. In this sense the boustrophedonic variant is continuous in contrast to the original Rosenberg-Strong function.
We implemented the enumeration also as a state machine to avoid the evaluation of the square root function.
The inverse function, computing n for given (x, y), is m*(m + 1) + (-1)^(m mod 2)*(y - x) where m = max(x, y).

Examples

			The map starts, for n = 0, 1, 2, ...
(0, 0), (0, 1), (1, 1), (1, 0), (2, 0), (2, 1), (2, 2), (1, 2), (0, 2), (0, 3),
(1, 3), (2, 3), (3, 3), (3, 2), (3, 1), (3, 0), (4, 0), (4, 1), (4, 2), (4, 3),
(4, 4), (3, 4), (2, 4), (1, 4), (0, 4), (0, 5), (1, 5), (2, 5), (3, 5), (4, 5),
(5, 5), (5, 4), (5, 3), (5, 2), (5, 1), (5, 0), (6, 0), (6, 1), (6, 2), (6, 3),
(6, 4), (6, 5), (6, 6), (5, 6), (4, 6), (3, 6), (2, 6), (1, 6), (0, 6), ...
The enumeration can be seen as shells growing around the origin:
(0, 0);
(0, 1), (1, 1), (1, 0);
(2, 0), (2, 1), (2, 2), (1, 2), (0, 2);
(0, 3), (1, 3), (2, 3), (3, 3), (3, 2), (3, 1), (3, 0);
(4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (3, 4), (2, 4), (1, 4), (0, 4);
(0, 5), (1, 5), (2, 5), (3, 5), (4, 5), (5, 5), (5, 4), (5, 3), (5, 2),(5,1),(5,0);
		

References

  • A. L. Rosenberg, H. R. Strong, Addressing arrays by shells, IBM Technical Disclosure Bulletin, vol 14(10), 1972, p. 3026-3028.

Crossrefs

Cf. A319289 (x coordinates), A319290 (y coordinates).
Cf. A319571 (stripe enumeration), A319572 (stripe x), A319573 (stripe y).
A319513 uses the encoding 2^x*3*y.

Programs

  • Julia
    function A319514(n)
        k, r = divrem(n, 2)
        m = x = isqrt(k)
        y = k - x^2
        x <= y && ((x, y) = (2x - y, x))
        isodd(m) ? (y, x)[r+1] : (x, y)[r+1]
    end
    [A319514(n) for n in 0:52] |> println
    # The enumeration of N X N with a state machine:
    # PigeonRosenbergStrong(n)
    function PRS(x, y, state)
        x == 0 && state == 0 && return x, y+1, 1
        y == 0 && state == 2 && return x+1, y, 3
        x == y && state == 1 && return x, y-1, 2
        x == y && return x-1, y, 0
        state == 0 && return x-1, y, 0
        state == 1 && return x+1, y, 1
        state == 2 && return x, y-1, 2
        return x, y+1, 3
    end
    function ShellEnumeration(len)
        x, y, state = 0, 0, 0
        for n in 0:len
            println("$n -> ($x, $y)")
            x, y, state = PRS(x, y, state)
        end
    end
    # Computes n for given (x, y).
    function Pairing(x::Int, y::Int)
        m = max(x, y)
        d = isodd(m) ? x - y : y - x
        m*(m + 1) + d
    end
    ShellEnumeration(20)

A381801 Irregular triangle read by rows: row n lists the residues r mod n of numbers k such that rad(k) | n, where rad = A007947.

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, Mar 07 2025

Keywords

Comments

Define S(p,n) to be the set of residues r (mod n) taken by the power range of prime divisor p, i.e., {p^m, m >= 1}.
Define T(n) to be the union of the tensor product of distinct terms in S(p,n) for all p|n, where the products are expressed mod n.
Row n of this triangle is T(n), a superset of row n of A381799.
For n > 1, the intersection of row n of this triangle and row n of A038566 is {1}.

Examples

			Table of c(n) = A381800(n) and T(n) for select n:
 n  c(n)  T(n)
-----------------------------------------------------------------------------
 1    1   {0}
 2    2   {0, 1}
 3    2   {0, 1}
 4    3   {0, 1, 2}
 5    2   {0, 1}
 6    5   {0, 1, 2, 3, 4}
 8    4   {0, 1, 2, 4}
 9    3   {0, 1, 3}
10    7   {0, 1, 2, 4, 5, 6, 8}
11    2   {0, 1}
12    8   {0, 1, 2, 3, 4, 6, 8, 9}
14    6   {0, 1, 2, 4, 7, 8}
15    8   {0, 1, 3, 5, 6, 9, 10, 12}
16    5   {0, 1, 2, 4, 8}
18   12   {0, 1, 2, 3, 4, 6, 8, 9, 10, 12, 14, 16}
20    9   {0, 1, 2, 4, 5, 8, 10, 12, 16}
24   11   {0, 1, 2, 3, 4, 6, 8, 9, 12, 16, 18}
28    9   {0, 1, 2, 4, 7, 8, 14, 16, 21}
30   19   {0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 21, 24, 25, 27}
36   16   {0, 1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 20, 24, 27, 28, 32}
For n = 10, we have S(2,10) = {1, 2, 4, 6, 8} and S(5,10) = {1, 5}. Therefore we have the following distinct products:
   1  2  4  8  6
   5  0
Hence T(10) = {0, 1, 2, 4, 5, 6, 8}; terms in A003592 belong to these residues (mod 10).
For n = 12, we have S(2,12) = {1, 2, 4, 8} and S(3,12) = {1, 3, 9}. Therefore we have the following distinct products:
   1  2  4  8
   3  6  0
   9
Thus T(12) = {0, 1, 2, 3, 4, 6, 8, 9}, terms in A003586 belong to these residues (mod 12).
For n = 30, we have {1, 2, 4, 8, 16}, {1, 3, 9, 21, 27}, and {1, 5, 25}. Therefore we have the following distinct products:
   1  2  4  8  16         5  10  20         25
   3  6 12 24            15   0
   9 18
  27
Thus T(30) = {0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 21, 24, 25, 27}; terms in A051037 belong to these residues (mod 30).
		

Crossrefs

Programs

  • Mathematica
    Table[Union@ Flatten@ Mod[TensorProduct @@ Map[(p = #; NestWhileList[Mod[p*#, n] &, 1, UnsameQ, All]) &, FactorInteger[n][[All, 1]] ], n], {n, 30}]

Formula

Row 1 is {0} since 1 is the empty product and the only number that has zero prime factors is 1, congruent to 0 (mod 1).
Row n begins with {0,1} for n > 1.
For prime p, row p = {0,1}.
For prime power p^m, m > 0, row p = union of {0} and {p^i, i < m}.
Row n is a subset of row n of A121998, considering n in A121998 instead as n mod n = 0.
Row n is a superset of row n of A162306, considering n in A162306 instead as n mod n = 0.

A216319 Irregular triangle: row n lists the odd numbers of the reduced residue system modulo n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 3, 1, 5, 1, 3, 5, 1, 3, 5, 7, 1, 5, 7, 1, 3, 7, 9, 1, 3, 5, 7, 9, 1, 5, 7, 11, 1, 3, 5, 7, 9, 11, 1, 3, 5, 9, 11, 13, 1, 7, 11, 13, 1, 3, 5, 7, 9, 11, 13, 15, 1, 3, 5, 7, 9, 11, 13, 15, 1, 5, 7, 11, 13, 17, 1, 3, 5, 7, 9, 11, 13, 15, 17, 1, 3, 7, 9, 11, 13, 17, 19
Offset: 1

Views

Author

Wolfdieter Lang, Sep 21 2012

Keywords

Comments

The length of row n is delta(n) = A055034(n).
Here the smallest nonnegative complete system modulo n is used: {0,1,...,n-1}, and the reduced residue system modulo n (A038566) is the set of numbers k from this set which satisfy gcd(k, n) = 1. The present array lists only the odd numbers. For n = 1 one should take 0 because gcd(0, 1) = 1, but because 1 == 0 (mod 1) we prefer the odd 1.
This is the sub-array obtained from A038566 by deleting the even numbers.
In the multiplicative group Modd n (see a comment in A203571) each of the delta(n) members of row n forms a reduced residue class Modd n with only odd numbers. E.g., n=4 (only the positive members are listed, the negative members should be amended): [1] = {1, 7, 9, 15, 17, 23, 25, 31, 33, 39,...}; [3] = {3, 5, 11, 13, 19, 21, 27, 29, 35, 37...}. Multiplication Modd n can be done class-wise: 7*15 == 1*1 (Modd 4) = 1; 11*13 ==3*3 (Modd 4) = 1; 7*5 == 1*3 (Modd 4) = 3.
The orders 'Moddulo' n of the elements in row n are given in A216320.

Examples

			The array starts:
n\k 1  2   3   4   5   6   7   8   9...
---------------------------------------
1   1
2   1
3   1
4   1  3
5   1  3
6   1  5
7   1  3   5
8   1  3   5   7
9   1  5   7
10  1  3   7   9
11  1  3   5   7   9
12  1  5   7  11
13  1  3   5   7   9  11
14  1  3   5   9  11  13
15  1  7  11  13
16  1  3   5   7   9  11  13  15
17  1  3   5   7   9  11  13  15
18  1  5   7  11  13  17
19  1  3   5   7   9  11  13  15  17
20  1  3   7   9  11  13  17  19
...
		

Crossrefs

Cf. A038566 (row n lists all numbers in the reduced residue system modulo n).

Programs

  • Mathematica
    Table[Select[Range[1, n, 2], GCD[#, n] == 1 &], {n, 20}] (* Michael De Vlieger, Oct 15 2020 *)
  • PARI
    row(n) = select(x->(((x%2)==1) && (gcd(n, x)==1)), [1..n]); \\ Michel Marcus, Jun 10 2020

Formula

a(n, k) is the k-th odd member of the smallest nonnegative reduced residue system modulo n. See the comment above.

A352911 Cantor's List: Pairs (i, j) of relatively prime positive integers sorted first by i + j then by i.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 09 2022

Keywords

Comments

a(2*n-1) / a(2*n) is the n-th fraction in Cantor's enumeration of the positive rational numbers. - Peter Luschny, Oct 10 2023

Examples

			The first few pairs are, seen as an irregular triangle:
  [1, 1],
  [1, 2], [2, 1],
  [1, 3], [3, 1],
  [1, 4], [2, 3], [3, 2], [4, 1],
  [1, 5], [5, 1],
  [1, 6], [2, 5], [3, 4], [4, 3], [5, 2], [6, 1],
  [1, 7], [3, 5], [5, 3], [7, 1],
  [1, 8], [2, 7], [4, 5], [5, 4], [7, 2], [8, 1],
  [1, 9], [3, 7], [7, 3], [9, 1],
  ...
		

Crossrefs

Cf. A352909, A020652 or A038566 (i-coordinates), A020653 (j-coordinates), A366191.

Programs

  • Maple
    CantorsList := proc(upto) local C, F, n, t, count;
    C := NULL; count := 0:
    for n from 2 while count < upto do
        F := select(t -> igcd(t, n-t) = 1, [$1..n-1]);
        C := C, seq([t, n - t], t = F);
        count := count + nops(F) od:
    ListTools:-Flatten([C]) end:
    CantorsList(40);  # Peter Luschny, Oct 10 2023
  • Mathematica
    A352911row[n_]:=Select[Array[{#,n-#}&,n-1],CoprimeQ[First[#],Last[#]]&];
    Array[A352911row,10,2] (* Generates 10 rows *) (* Paolo Xausa, Oct 10 2023 *)
  • Python
    from math import gcd
    from itertools import chain, count, islice
    def A352911_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)
    A352911_list = list(islice(A352911_gen(),30)) # Chai Wah Wu, Oct 10 2023

A381799 Irregular triangle read by rows, where row n is a list of residues of powers of prime factors of n (mod n).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 2, 0, 1, 1, 2, 3, 4, 0, 1, 0, 1, 2, 4, 0, 1, 3, 1, 2, 4, 5, 6, 8, 0, 1, 1, 2, 3, 4, 8, 9, 0, 1, 1, 2, 4, 7, 8, 1, 3, 5, 6, 9, 10, 12, 0, 1, 2, 4, 8, 0, 1, 1, 2, 3, 4, 8, 9, 10, 14, 16, 0, 1, 1, 2, 4, 5, 8, 12, 16, 1, 3, 6, 7, 9, 12, 15, 18
Offset: 1

Views

Author

Michael De Vlieger, Mar 07 2025

Keywords

Comments

Define S(p,n) to be the set of residues r (mod n) taken by the power range of prime divisor p, i.e., {p^m, m >= 1}. Examples: S(2,10) = {1, 2, 4, 8, 6}, while S(2,8) = {0, 1, 2, 4} and S(2,12) = {1, 2, 4, 8}; S(3,6) = {1, 3}, S(3,9) = {0, 1, 3}, S(3,12) = {1, 3, 9}, etc.
Define T(n) to be the (sorted) union of S(p,n) for all prime factors p | n.
Row n of this table is T(n).
For n > 1, the intersection of row n of this table and row n of A038566 is {1}. Thus, 1 appears in each row except for n = 1, since p^0 = 1 for all primes p | n.
The number 0 appears in T(p^m) (where p is prime and m >= 1) since p^m is congruent to 0 (mod p^m).
Zero does not appear in T(n) for n in A024619.

Examples

			Triangle begins:
 n   row n
--------------------------
 1:  0;
 2:  0, 1;
 3:  0, 1;
 4:  0, 1, 2;
 5:  0, 1;
 6:  1, 2, 3, 4;
 7:  0, 1;
 8:  0, 1, 2, 4;
 9:  0, 1, 3;
10:  1, 2, 4, 5, 6, 8;
11:  0, 1;
12:  1, 2, 3, 4, 8, 9; etc.
For n = 10, we have S(2,10) = {1, 2, 4, 8, 6}, S(5,10) = {1, 5}, thus T(10) = {1, 2, 4, 5, 6, 8}.
For n = 12, we have S(2,12) = {1, 2, 4, 8}, S(3,12) = {1, 3, 9}, thus T(12) = {1, 2, 3, 4, 8, 9}.
For n = 16, we have S(2,16) = {1, 2, 4, 8, 0}, thus T(16) = {0, 1, 2, 4, 8}.
For n = 30, we have S(2,30) = {1, 2, 4, 8, 16}, S(3,30) = {1, 3, 9, 27, 21}, and S(5,30) = {1, 5, 25}, so T(30) = {1, 2, 3, 4, 5, 8, 9, 16, 21, 25, 27}, etc.
		

Crossrefs

Programs

  • Mathematica
    {{0}}~Join~Table[Union@ Flatten@ Map[(p = #; NestWhileList[Mod[p*#, n] &, 1, UnsameQ, All]) &, FactorInteger[n][[All, 1]] ], {n, 2, 30}]

Formula

Row 1 = {0} since 1 is the empty product.
For prime p, row p is {0, 1}.
For proper prime power p^m, m > 1, row p^m is the union of {0} and p^i, i < m.
A381798(n) = length of row n.

A051266 Numbers n such that maximal value of prime divisors of reduced residue system for n is 2.

Original entry on oeis.org

7, 11, 13, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 38, 39, 40, 44, 45, 46, 48, 50, 51, 52, 54, 56, 57, 58, 62, 63, 64, 66, 68, 69, 70, 72, 74, 75, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 105, 108, 110, 112, 114, 120, 126
Offset: 1

Views

Author

Keywords

Comments

Largest value of A001221(k) = 2 for 1 <= k <= n such that gcd (k, n) = 1, i.e., k in row n of A038566. - Michael De Vlieger, Aug 10 2017

Examples

			n = 29 is here because for terms of RRS(29) = {1, 2, ..., 27, 28} the number of prime divisors is 0(for 1), 1(for prime powers) or 2 (for 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28).
		

Crossrefs

Programs

  • Mathematica
    Block[{n = 2, P}, P = Product[Prime@ i, {i, n}]; P + Position[#, n][[All, 1]] &@ Array[Max@ Map[PrimeNu, Cases[Range@ #, k_ /; CoprimeQ[#, k]]] &, 120, P + 1]] (* Michael De Vlieger, Aug 10 2017 *)

A051267 Numbers n such that maximal value of prime divisors of reduced residue system for n is 3.

Original entry on oeis.org

31, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 106, 107, 109, 111, 113, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 127, 128, 129, 131, 133, 134, 136, 137, 139, 141, 142, 143, 145, 146, 147
Offset: 1

Views

Author

Keywords

Comments

Largest value of A001221(k) = 3 for 1 <= k <= n such that gcd(k, n) = 1, i.e., k in row n of A038566. - Michael De Vlieger, Aug 10 2017

Crossrefs

Programs

  • Mathematica
    Block[{n = 3, P}, P = Product[Prime@ i, {i, n}]; P + Position[#, n][[All, 1]] &@ Array[Max@ Map[PrimeNu, Cases[Range@ #, k_ /; CoprimeQ[#, k]]] &, 117, P + 1]] (* Michael De Vlieger, Aug 10 2017 *)

A051268 Numbers n such that maximal value of prime divisors of reduced residue system for n is 4.

Original entry on oeis.org

211, 221, 223, 227, 229, 233, 239, 241, 247, 251, 253, 257, 263, 269, 271, 277, 281, 283, 289, 293, 299, 307, 311, 313, 317, 319, 323, 331, 337, 341, 343, 347, 349, 353, 359, 361, 367, 371, 373, 377, 379, 383, 389, 391, 397, 401, 403, 407, 409, 413
Offset: 1

Views

Author

Keywords

Comments

Largest value of A001221(k) = 4 for 1 <= k <= n such that gcd(k, n) = 1, i.e., k in row n of A038566. - Michael De Vlieger, Aug 10 2017

Crossrefs

Programs

  • Mathematica
    Block[{n = 4, P}, P = Product[Prime@ i, {i, n}]; P + Position[#, n][[All, 1]] &@ Array[Max@ Map[PrimeNu, Cases[Range@ #, k_ /; CoprimeQ[#, k]]] &, 175, P + 1]] (* Michael De Vlieger, Aug 10 2017 *)

Extensions

More terms from Michael De Vlieger, Aug 10 2017

A057593 Triangle T(n, k) giving period length of the periodic sequence k^i (i >= imin) mod n (n >= 2, 1 <= k <= n-1).

Original entry on oeis.org

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

Views

Author

Gottfried Helms, Oct 05 2000

Keywords

Comments

From Wolfdieter Lang, Sep 04 2017: (Start)
i) If gcd(n, k) = 1 then imin = imin(n, k) = 0 and the length of the period P = T(n, k) = order(n, k), given in A216327 corresponding to the numbers of A038566. This is due to Euler's theorem. E.g., T(4, 3) = 2 because A216327(4, 2) = 2 corresponding to A038566(4, 2) = 3.
ii) If gcd(n, k) is not 1 then the smallest nonnegative index imin = imin(n, k) is obtained from A290601 with the corresponding length of the period given in A290602. Also in this case the sequence always becomes periodic, because one of the possible values from {0, 1, ..., n-1} has to appear a second time because the sequence has more than n entries. Example: T(4, 2) = 1 because imin is given by A290601(1, 1) = 2 (corresponding to the present n = 4, k = 2 values) with the length of the period P given by A290602(1, 1) = 1. (End)

Examples

			If n=7, k=2, (imin = 0) the sequence is 1,2,4,1,2,4,1,2,4,... of period 3, so T(7,2) = 3. The triangle T(n, k) begins:
n \ k 1   2   3  4   5   6   7   8  9  10  11  12  13  14 15 16 17 ...
2:    1
3:    1   2
4:    1   1   2
5:    1   4   4  2
6:    1   2   1  1   2
7:    1   3   6  3   6   2
8:    1   1   2  1   2   1   2
9:    1   6   1  3   6   1   3   2
10:   1   4   4  2   1   1   4   4  2
11:   1  10   5  5   5  10  10  10  5   2
12:   1   2   2  1   2   1   2   2  1   1   2
13:   1  12   3  6   4  12  12   4  3   6  12   2
14:   1   3   6  3   6   2   1   1  3   6   3   6   2
15:   1   4   4  2   2   1   4   4  2   1   2   4   4  2
16:   1   1   4  1   4   1   2   1  2   1   4   1   4  1  2
17:   1   8  16  4  16  16  16   8  8  16  16  16   4  16  8  2
18:   1   6   1  3   6   1   3   2  1   1   6   1   3   6  1  1  2
... Reformatted and extended. - _Wolfdieter Lang_, Sep 04 2017
From _Wolfdieter Lang_, Sep 04 2017: (Start)
The  table imin(n, k) begins:
n \ k 1   2   3   4   5   6   7   8  9  10  11  12  13  14  15  16 17 ...
2:    0
3:    0   0
4:    0   2   0
5:    0   0   0   0
6:    0   1   1   1   0
7:    0   0   0   0   0   0
8:    0   3   0   2   0   3   0
9:    0   0   2   0   0   2   0   0
10:   0   1   0   1   1   1   0   1  0
11:   0   0   0   0   0   0   0   0  0   0
12:   0   2   1   1   0   2   0   1  1   2   0
13:   0   0   0   0   0   0   0   0  0   0   0   0
14:   0   1   0   1   0   1   1   1  0   1   0   1   0
15:   0   0   1   0   1   1   0   0  1   1   0   1   0   0
16:   0   4   0   2   0   4   0   2  0   4   0   2   0   4   0
17:   0   0   0   0   0   0   0   0  0   0   0   0   0   0   0   0
18:   0   1   2   1   0   2   0   1  1   1   0   2   0   1   2   1  0
... (End)
		

Crossrefs

Cf. A086145 (prime rows), A216327 (entries with gcd(n,k) = 1), A139366.

Programs

  • Mathematica
    period[lst_] := Module[{n, i, j}, n=Length[lst]; For[j=2, j <= n, j++, For[i=1, iJean-François Alcover, Feb 04 2015 *)

Extensions

Constraint on k changed from 2 <= k <= n to 1 <= k < n, based on comment from Franklin T. Adams-Watters, Jan 19 2006, by David Applegate, Mar 11 2014
Name changed and table extended by Wolfdieter Lang, Sep 04 2017
Previous Showing 31-40 of 93 results. Next