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.

A286941 Irregular triangle read by rows: the n-th row corresponds to the totatives of the n-th primorial, A002110(n).

Original entry on oeis.org

1, 1, 5, 1, 7, 11, 13, 17, 19, 23, 29, 1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209
Offset: 1

Views

Author

Jamie Morken and Michael De Vlieger, May 16 2017

Keywords

Comments

Values in row n of a(n) are those of row n of A286942 complement those of row n of A279864.
From Michael De Vlieger, May 18 2017: (Start)
Numbers t < p_n# such that gcd(t, p_n#) = 0, where p_n# = A002110(n).
Numbers in the reduced residue system of A002110(n).
A005867(n) = number of terms of a(n) in row n; local minimum of Euler's totient function.
A048862(n) = number of primes in row n of a(n).
A048863(n) = number of nonprimes in row n of a(n).
Since 1 is coprime to all n, it delimits the rows of a(n).
The prime A000040(n+1) is the second term in row n since it is the smallest prime coprime to A002110(n) by definition of primorial.
The smallest composite in row n is A001248(n+1) = A000040(n+1)^2.
The Kummer numbers A057588(n) = A002110(n) - 1 are the last terms of rows n, since (n - 1) is less than and coprime to all positive n. (End)

Examples

			The triangle starts
1;
1, 5;
1, 7, 11, 13, 17, 19, 23, 29;
1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209;
		

Crossrefs

Cf. A285784 (nonprimes that appear), A335334 (row sums).

Programs

  • Mathematica
    Table[Function[P, Select[Range@ P, CoprimeQ[#, P] &]]@ Product[Prime@ i, {i, n}], {n, 4}] // Flatten (* Michael De Vlieger, May 18 2017 *)
  • PARI
    row(n) = my(P=factorback(primes(n))); select(x->(gcd(x, P) == 1), [1..P]); \\ Michel Marcus, Jun 02 2020

Extensions

More terms from Michael De Vlieger, May 18 2017

A329815 Number of distinct terms in the first difference sequence of the reduced residue system of the n-th primorial.

Original entry on oeis.org

0, 1, 3, 5, 7, 10, 13, 16, 20, 23, 29, 33, 37, 43, 49, 53, 59, 66, 75, 84, 92, 99, 108, 116, 127, 132, 140, 148, 156, 164, 174, 185, 193, 206, 215, 224, 235, 245, 255, 267, 275, 286, 297, 308
Offset: 1

Views

Author

Jamie Morken, Nov 21 2019

Keywords

Comments

This sequence is the number of distinct terms in the first difference sequence for rows n in A286941 and A309497.
Number of distinct terms listed in row n of A331118. - Michael De Vlieger, Jul 11 2020

Examples

			For n = 3, A002110(3) = 30, RRS = {1, 7, 11, 13, 17, 19, 23, 29}, dRRS = {6, 4, 2, 4, 2, 4, 6}, so a(3) = 3.
		

Crossrefs

Programs

  • Mathematica
    Primorial[n_] := Times @@ Prime[Range[n]]; Table[Length@ Union@ Differences@ Select[Range@ Primorial[n], CoprimeQ[#, Primorial[n]] &], {n, 7}] (* after Michael De Vlieger Jul 15 2017 from A061498 *)
  • PARI
    f(n) = {my(va = select(x->(gcd(n, x)==1), [1..n])); vd = vector(#va-1, k, va[k+1] - va[k]); #Set(vd); } \\ A061498
    a(n) = f(prod(i=1, n, prime(i))); \\ Michel Marcus, Dec 19 2019

Formula

a(n) = A061498(A002110(n)).
a(n) <= A048670(n)/2.

Extensions

a(12)-a(44) from Jamie Morken, Jul 11 2020 (after Mario Ziller)

A307964 Irregular triangle read by rows: T(n,k) = A308121(A024556(n),k).

Original entry on oeis.org

7, 14, 13, 4, 11, 2, 1, 8, 3, 6, 5, 8, 3, 2, 5, 4, -1, 2, 1, 4, 13, 26, 19, 32, 25, 38, 31, 4, 17, 10, 23, 16, 29, 2, -5, 8, 1, 14, 7, 20, 11, 22, 33, 44, 31, 18, 29, 16, 27, 38, 1, 12, 23, 34, -3, 8, 19, 6, 17, 4, -9, 2, 13, 24, 5, 10, 7, 12, 9, 14, 11, 16, 5
Offset: 1

Views

Author

Jamie Morken, Jul 29 2019

Keywords

Comments

The sequence gives odd squarefree composite rows n in A308121, i.e., rows 15, 21, 33, 35, 39, 51, 55, 57, 65, ... given by A024556(n). These rows are the primitive rows of A308121.
Row n has length A000010(A024556(n)).
For row n:
T(n, 1) = T(n, 2) / 2.
T(n, phi(n)) - T(n, phi(n)-1) = T(n, 1).
T(n, phi(n)/2+1) - T(n, phi(n)/2) = T(n, 1).
From Charlie Neder, Jul 30 2019: (Start)
For row n, T(n, k) + T(n, phi(n)-k) is constant for all k.
For 2 <= k < lpf(A024556(n)), T(n, k) = k*T(n, 1). (End)

Examples

			The sequence as an irregular triangle:
1:  7, 14, 13, 4, 11, 2, 1, 8;
2:  3, 6, 5, 8, 3, 2, 5, 4, -1, 2, 1, 4;
3:  13, 26, 19, 32, 25, 38, 31, 4, 17, 10, 23, 16, 29, 2, -5, 8, 1, 14, 7, 20;
4:  11, 22, 33, 44, 31, 18, 29, 16, 27, 38, 1, 12, 23, 34, -3, 8, 19, 6, 17, 4, -9, 2, 13, 24;
5:  5, 10, 7, 12, 9, 14, 11, 16, 5, 2, 7, 4, 9, 6, 11, 8, -3, 2, -1, 4, 1, 6, 3, 8
6:  19, 38, 25, 44, 31, 50, 37, 56, 43, 62, 49, 4, 23, 10, 29, 16, 35, 22, 41, 28, 47, 2, -11, 8, -5, 14, 1, 20, 7, 26, 13, 32;
7:  3, 6, 9, 12, 7, 10, 13, 16, 3, 6, 9, 4, 7, 10, 13, 8, 3, 6, 1, 4, 7, 10, 5, 8, 3, -2, 1, 4, 7, 2, 5, 8, -5, -2, 1, 4, -1, 2, 5, 8;
8:  7, 14, 9, 16, 11, 18, 13, 20, 15, 22, 17, 24, 7, 2, 9, 4, 11, 6, 13, 8, 15, 10, 17, 12, -5, 2, -3, 4, -1, 6, 1, 8, 3, 10, 5, 12;
9:  17, 34, 51, 68, 37, 54, 71, 88, 57, 74, 43, 12, 29, 46, 63, 32, 49, 66, 83, 4, 21, 38, 7, 24, 41, 58, 27, 44, 61, -18, -1, 16, 33, 2, 19, 36, 53, 22, -9, 8, -23, -6, 11, 28, -3, 14, 31, 48;
  ...
		

Crossrefs

Programs

  • Mathematica
    rowsToCheck = 340;
    A024556 =
    Complement[Select[Range[3, rowsToCheck, 2], SquareFreeQ],
      Prime[Range[
        PrimePi[rowsToCheck]]]]; (* after Harvey P. Dale , Jan 26 2011 *)
    A308121 =
    Table[With[{a = n/GCD[n, #], b = Numerator[#/n]},
         MapIndexed[a First@#2 - b #1 &,
          Flatten@Position[GCD[Table[Mod[k, n], {k, n - 1}], n],
             1] /. {} -> {1}]] &@EulerPhi@n, {n,
       rowsToCheck}]; (* after Michael De Vlieger, Jun 06 2019 *)
    A307964 = {};
    For[i = 1, i <= Length[A024556], i++,
    AppendTo[A307964, A308121[[A024556[[i]]]]]]
    A307964flattened = Flatten[A307964]
    (* Jamie Morken, Apr 20 2021 *)

A335260 Irregular triangle S(n,k) = numerators of k*A002110(n)/A005867(n) for 1 <= k <= A005867(n).

Original entry on oeis.org

1, 2, 3, 6, 15, 15, 45, 15, 75, 45, 105, 30, 35, 35, 105, 35, 175, 105, 245, 35, 315, 175, 385, 105, 455, 245, 525, 70, 595, 315, 665, 175, 735, 385, 805, 105, 875, 455, 945, 245, 1015, 525, 1085, 140, 1155, 595, 1225, 315, 1295, 665, 1365, 175, 1435, 735, 1505
Offset: 1

Views

Author

Keywords

Comments

Alternatively, numerators of k*A060753(n)/A038110(n) for 1 <= k <= A005867(n).

Examples

			Table begins:
     1;
     2;
     3, 6;
    15, 15, 45, 15, 75, 45, 105, 30;
    ...
Row n = 4 contains the numerators of (35/8)*k for 1 <= k <= A005867(4): 35/8, 35/4, 105/8, 35/2, 175/8, 105/4, 245/8, 35, 315/8, 175/4, 385/8, 105/2, 455/8, 245/4, 525/8, 70, 595/8, 315/4, 665/8, 175/2, 735/8, 385/4, 805/8, 105, 875/8, 455/4, 945/8, 245/2, 1015/8, 525/4, 1085/8, 140, 1155/8, 595/4, 1225/8, 315/2, 1295/8, 665/4, 1365/8, 175, 1435/8, 735/4, 1505/8, 385/2, 1575/8, 805/4, 1645/8, 210.
		

Crossrefs

Programs

  • Mathematica
    Table[Numerator[P Range[EulerPhi[P]]/EulerPhi[P]], {P, FoldList[Times, Prime@ Range@ 5]}] (* or, more efficiently for larger datasets: *)
    Flatten@ Block[{nn = 7, s, t}, s = Array[Numerator@ Product[1 - 1/Prime[k], {k, # - 1}] &, nn]; t = Nest[Append[#, #[[-1]] (Prime[Length@ #] - 1)]&, {1}, nn]; u = Denominator@ Nest[Append[#, #[[-1]] + (1 - #[[-1]])/Prime[Length@ #]] &, {0}, nn]; MapIndexed[Function[{m, D, i},  u[[i]]*Range[t[[i]]]/ PadRight[{}, t[[i]], ReplacePart[ConstantArray[0, m], Flatten@ Map[Function[d, Map[# -> m/d &, m/d Select[Range[d], GCD[#, d] == 1 &]]], D]]]] @@ {#1, Divisors@ #1, First[#2]} &, s]]
    (* or, generate a single numerator of S(n,k): *)
    f[n_, k_] := #2 k/GCD[#1, Mod[k, #1]] & @@ {Numerator@ Product[1 - 1/Prime[i], {i, n - 1}], Denominator@ Last@ Nest[Append[#, #[[-1]] + (1 - #[[-1]])/Prime[Length@ #]] &, {0}, n - 1]}

Formula

S(n,k) = k*A060753(n)/GCD(k (mod m), m) for m = A038110(n).
Row lengths: A005867(n).
Least numerator in row n: A060753(n), all numerators are multiples j*A060753(n).

A335261 Irregular triangle S(n,k) = denominators of k*A002110(n)/A005867(n) for 1 <= k <= A005867(n).

Original entry on oeis.org

1, 1, 1, 1, 4, 2, 4, 1, 4, 2, 4, 1, 8, 4, 8, 2, 8, 4, 8, 1, 8, 4, 8, 2, 8, 4, 8, 1, 8, 4, 8, 2, 8, 4, 8, 1, 8, 4, 8, 2, 8, 4, 8, 1, 8, 4, 8, 2, 8, 4, 8, 1, 8, 4, 8, 2, 8, 4, 8, 1, 16, 8, 16, 4, 16, 8, 16, 2, 16, 8, 16, 4, 16, 8, 16, 1, 16, 8, 16, 4, 16, 8, 16
Offset: 1

Views

Author

Keywords

Comments

Alternatively, denominators of k*A060753(n)/A038110(n) for 1 <= k <= A005867(n).
Let m = A038110(n). For row n, the primitive denominators d | m.
The mean of row n is related to the mean of row n of A309497: A060753(n+1)/(A038110(n+1)*2) = Mean(A309497(n))/A038110(n+1).

Examples

			Table begins:
    1;
    1;
    1, 1;
    4, 2, 4, 1, 4, 2, 4, 1;
    8, 4, 8, 2, 8, 4, 8, 1, ..., 8, 1;
    ...
Row n = 4 contains the denominators of (35/8)*k for 1 <= k <= A005867(4): 35/8, 35/4, 105/8, 35/2, 175/8, 105/4, 245/8, 35, 315/8, 175/4, 385/8, 105/2, 455/8, 245/4, 525/8, 70, 595/8, 315/4, 665/8, 175/2, 735/8, 385/4, 805/8, 105, 875/8, 455/4, 945/8, 245/2, 1015/8, 525/4, 1085/8, 140, 1155/8, 595/4, 1225/8, 315/2, 1295/8, 665/4, 1365/8, 175, 1435/8, 735/4, 1505/8, 385/2, 1575/8, 805/4, 1645/8, 210.
The mean of row 4: (A060753(4+1)/(A038110(4+1)*2))*(A005867(4)+1) = (35/(8*2))*(48+1) = (35/16)*49 = 1715/16.
		

Crossrefs

Programs

  • Mathematica
    Table[Denominator[P Range[EulerPhi[P]]/EulerPhi[P]], {P, FoldList[Times, Prime@ Range@ 5]}] (* or, more efficiently for larger datasets: *)
    Flatten@ Block[{nn = 7, s, t}, s = Array[Numerator@ Product[1 - 1/Prime[k], {k, # - 1}] &, nn]; t = Nest[Append[#, #[[-1]] (Prime[Length@ #] - 1)]&, {1}, nn]; MapIndexed[Function[{m, D, i}, PadRight[{}, t[[i]], ReplacePart[ConstantArray[0, m], Flatten@ Map[Function[d, Map[# -> d &, m/d Select[Range[d], GCD[#, d] == 1 &]]], D]]]] @@ {#1, Divisors@ #1, First[#2]} &, s]]
    (* or, to generate a single denominator of T(n,k) *)
    f[n_, k_] := #/GCD[#, Mod[k, #]] &@ Numerator@ Product[1 - 1/Prime[i], {i, n - 1}]

Formula

T(n,k) = m/GCD(k (mod m), m) with m = A038110(n).
Row lengths: A005867(n).
Showing 1-5 of 5 results.