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.

A193805 Square array read by antidiagonals: S(n,k) is the number of m which are prime to n and are not strong divisors of k.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Aug 05 2011

Keywords

Comments

We say d is a strong divisor of n iff d is a divisor of n and d > 1. Let phi(n) be Euler's totient function. Then phi(n) = S(n,1) = S(n,n). Thus S(n,k) can be regarded as a generalization of the totient function.

Examples

			[x][1][2][3][4][5][6][7][8]
[1] 1, 1, 1, 1, 1, 1, 1, 1
[2] 1, 1, 1, 1, 1, 1, 1, 1
[3] 2, 1, 2, 1, 2, 1, 2, 1
[4] 2, 2, 1, 2, 2, 1, 2, 2
[5] 4, 3, 3, 2, 4, 2, 4, 2
[6] 2, 2, 2, 2, 1, 2, 2, 2
[7] 6, 5, 5, 4, 5, 3, 6, 4
[8] 4, 4, 3, 4, 3, 3, 3, 4
Triangle k=1..n, n>=1:
[1]           1
[2]          1, 1
[3]        2, 1, 2
[4]       2, 2, 1, 2
[5]     4, 3, 3, 2, 4
[6]    2, 2, 2, 2, 1, 2
[7]  6, 5, 5, 4, 5, 3, 6
[8] 4, 4, 3, 4, 3, 3, 3, 4
Triangle n=1..k, k>=1:
[1]           1
[2]          1, 1
[3]        1, 1, 2
[4]       1, 1, 1, 2
[5]     1, 1, 2, 2, 4
[6]    1, 1, 1, 1, 2, 2
[7]  1, 1, 2, 2, 4, 2, 6
[8] 1, 1, 1, 2, 2, 2, 4, 4
S(15, 22) = card({1,4,7,8,13,14}) = 6 because the coprimes of 15 are {1,2,4,7,8,11,13,14} and the strong divisors of 22 are {2, 11, 22}.
		

Crossrefs

Programs

  • Maple
    strongdivisors := n -> numtheory[divisors](n) minus {1}:
    coprimes := n -> select(k->igcd(k,n)=1,{$1..n}):
    S := (n,k) -> nops(coprimes(n) minus strongdivisors(k)):
    seq(seq(S(n-k+1,k), k=1..n),n=1..13);  # Square array by antidiagonals.
    seq(print(seq(S(n,k),k=1..n)),n=1..8); # Lower triangle.
    seq(print(seq(S(n,k),n=1..k)),k=1..8); # Upper triangle.
  • Mathematica
    s[n_, k_] := Complement[ Select[ Range[n], GCD [#, n] == 1 &], Rest[ Divisors[k]]] // Length; Table[ s[n-k+1, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 25 2013 *)
  • PARI
    S(n,k)=eulerphi(n)-sumdiv(k,d, gcd(d,n)==1 && d1)
    for(s=2,15, for(k=1,s-1, print1(S(s-k,k)", "))) \\ Charles R Greathouse IV, Aug 01 2016

A193823 Triangular array: the fusion of polynomial sequences P and Q given by p(n,x)=(2x+1)^n and q(n,x)=x^n+x^(n-1)+...+x+1.

Original entry on oeis.org

1, 1, 1, 1, 3, 3, 1, 5, 9, 9, 1, 7, 19, 27, 27, 1, 9, 33, 65, 81, 81, 1, 11, 51, 131, 211, 243, 243, 1, 13, 73, 233, 473, 665, 729, 729, 1, 15, 99, 379, 939, 1611, 2059, 2187, 2187, 1, 17, 129, 577, 1697, 3489, 5281, 6305, 6561, 6561, 1, 19, 163, 835, 2851
Offset: 0

Views

Author

Clark Kimberling, Aug 06 2011

Keywords

Comments

See A193722 for the definition of fusion of two sequences of polynomials or triangular arrays.

Examples

			First six rows:
1
1....1
1....3....3
1....5....9....9
1....7....19...27...27
1....9....33...65...81...81
		

Crossrefs

Programs

  • Mathematica
    z = 10; a = 2; b = 1;
    p[n_, x_] := (a*x + b)^n
    q[0, x_] := 1
    q[n_, x_] := x*q[n - 1, x] + 1; q[n_, 0] := q[n, x] /. x -> 0;
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]]   (* A193823 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]  (* A193824 *)

Formula

From Peter Bala, Jul 16 2013: (Start)
T(n,k) = sum {i = 0..k} binomial(n-1,k-i)*2^(k-i) for 0 <= k <= n.
O.g.f.: (1 - 2*x*t)^2/( (1 - 3*x*t)*(1 - (2*x + 1)*t) ) = 1 + (1 + x)*t + (1 + 3*x + 3*x^2)*t^2 + .... Cf. A193860.
For n >= 1, the n-th row polynomial R(n,x) = 1/(x-1)*( 3^(n-1)*x^(n+1) - (2*x + 1)^(n-1) ). (End)

A198066 Square array read by antidiagonals, n>=1, k>=1; T(n,k) is the number of primes which are prime to n and are not strong divisors of k.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Nov 07 2011

Keywords

Comments

We say d is a strong divisor of n iff d is a divisor of n and d > 1. Let prime_phi(n) be number of primes in the reduced residue system mod n. Then prime_phi(n) = T(n,1) = T(n,n).

Examples

			T(15, 22) = card({7,13}) = 2 because the coprimes of 15 are {1,2,4,7,8,11,13,14} and the strong divisors of 22 are {2,11,22}.
-
[x][1][2][3][4][5][6][7][8]
[1] 0, 0, 0, 0, 0, 0, 0, 0
[2] 0, 0, 0, 0, 0, 0, 0, 0
[3] 1, 0, 1, 0, 1, 0, 1, 0
[4] 1, 1, 0, 1, 1, 0, 1, 1
[5] 2, 1, 1, 1, 2, 0, 2, 1
[6] 1, 1, 1, 1, 0, 1, 1, 1
[7] 3, 2, 2, 2, 2, 1, 3, 2
[8] 3, 3, 2, 3, 2, 2, 2, 3
-
Triangle k=1..n, n>=1:
[1]           0
[2]          0, 0
[3]        1, 0, 1
[4]       1, 1, 0, 1
[5]     2, 1, 1, 1, 2
[6]    1, 1, 1, 1, 0, 1
[7]  3, 2, 2, 2, 2, 1, 3
[8] 3, 3, 2, 3, 2, 2, 2, 3
-
Triangle n=1..k, k>=1:
[1]            0
[2]           0, 0
[3]         0, 0, 1
[4]        0, 0, 0, 1
[5]      0, 0, 1, 1, 2
[6]     0, 0, 0, 0, 0, 1
[7]   0, 0, 1, 1, 2, 1, 3
[8]  0, 0, 0, 1, 1, 1, 2, 3
		

Crossrefs

Programs

  • Maple
    strongdivisors := n -> numtheory[divisors](n) minus {1}:
    coprimes := n -> select(k->igcd(k, n)=1, {$1..n}):
    primes := n -> select(isprime, {$1..n}):
    T := (n,k) -> nops(primes(n) intersect (coprimes(n) minus strongdivisors(k))):
    seq(seq(T(n-k+1, k), k=1..n), n=1..13);  # Square array by antidiagonals.
    seq(print(seq(T(n,k), k=1..n)), n=1..8); # Lower triangle.
    seq(print(seq(T(n,k), n=1..k)), k=1..8); # Upper triangle.
  • Mathematica
    T[n_, k_] := Complement[Select[Range[n-1], PrimeQ[#] && CoprimeQ[#, n]&], Rest[Divisors[k]]] // Length;
    Table[T[n-k+1, k], {n, 1, 13}, {k, 1, n}] (* Jean-François Alcover, Jun 29 2019 *)

A198067 Square array read by antidiagonals, n>=1, k>=1; T(n,k) is the number of nonprime numbers which are prime to n and are not strong divisors of k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 2, 1, 1, 1, 1, 2, 3, 1, 2, 1, 2, 1, 1, 1, 1, 6, 2, 3, 1, 3, 1, 2, 1, 1, 1, 1, 1, 6, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 7, 1, 6, 2, 3, 1, 3, 1, 2
Offset: 1

Views

Author

Peter Luschny, Nov 07 2011

Keywords

Comments

We say d is a strong divisor of n iff d is a divisor of n and d > 1. Let alpha(n) be number of nonprime numbers in the reduced residue system of n. Then alpha(n) = T(n,1) = T(n,n).

Examples

			T(15, 22) = card({1,4,8,14}) = 4 because the coprimes of 15 are {1,2,4,7,8,11,13,14} and the strong divisors of 22 are {2,11,22}.
-
[x][1][2][3][4][5][6][7][8]
[1] 1, 1, 1, 1, 1, 1, 1, 1
[2] 1, 1, 1, 1, 1, 1, 1, 1
[3] 1, 1, 1, 1, 1, 1, 1, 1
[4] 1, 1, 1, 1, 1, 1, 1, 1
[5] 2, 2, 2, 1, 2, 2, 2, 1
[6] 1, 1, 1, 1, 1, 1, 1, 1
[7] 3, 3, 3, 2, 3, 2, 3, 2
[8] 1, 1, 1, 1, 1, 1, 1, 1
-
Triangle k=1..n, n>=1:
[1]           1
[2]          1, 1
[3]        1, 1, 1
[4]       1, 1, 1, 1
[5]     2, 2, 2, 1, 2
[6]    1, 1, 1, 1, 1, 1
[7]  3, 3, 3, 2, 3, 2, 3
[8] 1, 1, 1, 1, 1, 1, 1, 1
-
Triangle n=1..k, k>=1:
[1]           1
[2]          1, 1
[3]        1, 1, 1
[4]       1, 1, 1, 1
[5]     1, 1, 1, 1, 2
[6]    1, 1, 1, 1, 2, 1
[7]  1, 1, 1, 1, 2, 1, 3
[8] 1, 1, 1, 1, 1, 1, 2, 1
		

Crossrefs

Programs

  • Maple
    strongdivisors := n -> numtheory[divisors](n) minus {1}:
    coprimes  := n -> select(k->igcd(k, n)=1, {$1..n}):
    nonprimes := n -> remove(isprime, {$1..n});
    T := (n,k) -> nops(nonprimes(n) intersect (coprimes(n) minus strongdivisors(k))):
    seq(seq(T(n-k+1, k), k=1..n), n=1..13);  # Square array by antidiagonals.
    seq(print(seq(T(n,k), k=1..n)), n=1..8); # Lower triangle.
    seq(print(seq(T(n,k), n=1..k)), k=1..8); # Upper triangle.

A198068 Square array read by antidiagonals, n>=1, k>=1; T(n,k) is the number of primes which are prime to n and are not strong divisors of k.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 0, 1, 2, 2, 1, 1, 1, 0, 1, 2, 2, 2, 1, 2, 1, 0, 1, 1, 2, 2, 1, 2, 1, 1, 0, 2, 2, 2, 2, 3, 3, 1, 2, 1, 0, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 0, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 1, 0, 1, 2, 2, 2, 2, 2, 1, 2, 2
Offset: 1

Views

Author

Peter Luschny, Nov 08 2011

Keywords

Comments

We say d is a strong divisor of n iff d is a divisor of n and d > 1. Let omega(n) be the number of distinct primes dividing n. Then omega(n) = T(n,1) = T(n,n).

Examples

			T(15, 22) = card({2,3,5,11}) = 4 because the coprimes of 15 are {1,2,4,7,8,11,13,14} and the strong divisors of 22 are {2,11,22}.
-
[x][1][2][3][4][5][6][7][8]
[1] 0, 0, 0, 0, 0, 0, 0, 0
[2] 1, 1, 1, 1, 1, 1, 1, 1
[3] 1, 2, 1, 2, 1, 2, 1, 2
[4] 1, 1, 2, 1, 1, 2, 1, 1
[5] 1, 2, 2, 2, 1, 3, 1, 2
[6] 2, 2, 2, 2, 3, 2, 2, 2
[7] 1, 2, 2, 2, 2, 3, 1, 2
[8] 1, 1, 2, 1, 2, 2, 2, 1
-
Triangle k=1..n, n>=1:
[1]           0
[2]          1, 1
[3]        1, 2, 1
[4]       1, 1, 2, 1
[5]     1, 2, 2, 2, 1
[6]    2, 2, 2, 2, 3, 2
[7]  1, 2, 2, 2, 2, 3, 1
[8] 1, 1, 2, 1, 2, 2, 2, 1
-
Triangle n=1..k, k>=1:
[1]           0
[2]          0, 1
[3]        0, 1, 1
[4]       0, 1, 2, 1
[5]     0, 1, 1, 1, 1
[6]    0, 1, 2, 2, 3, 2
[7]  0, 1, 1, 1, 1, 2, 1
[8] 0, 1, 2, 1, 2, 2, 2, 1
		

Crossrefs

Programs

  • Maple
    strongdivisors := n -> numtheory[divisors](n) minus {1}:
    coprimes  := n -> select(k->igcd(k, n)=1, {$1..n}):
    primes := n -> select(isprime, {$1..n});
    T := (n,k) -> nops(primes(n) intersect ({$1..n} minus (coprimes(n) minus strongdivisors(k)))):
    seq(seq(T(n-k+1,k), k=1..n), n=1..13);  # Square array by antidiagonals.
    seq(print(seq(T(n,k), k=1..n)), n=1..8); # Lower triangle.
    seq(print(seq(T(n,k), n=1..k)), k=1..8); # Upper triangle.
Showing 1-5 of 5 results.