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.

A364933 a(n) = Sum_{k=1..n} A191898(n,k)*[A191904(n,k) = A191898(n,k)].

Original entry on oeis.org

0, -1, -1, 0, -1, -2, -1, 2, 3, -2, -1, 0, -1, -2, 1, 6, -1, 2, -1, 2, 3, -2, -1, 4, 15, -2, 15, 4, -1, 0, -1, 14, 7, -2, 13, 8, -1, -2, 9, 10, -1, 2, -1, 8, 17, -2, -1, 12, 35, 14, 13, 10, -1, 14, 25, 16, 15, -2, -1, 8, -1, -2, 27, 30, 31, 6, -1, 14, 19, 12
Offset: 1

Views

Author

Mats Granvik, Aug 13 2023

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := DivisorSum[n, MoebiusMu[#] # &]; Table[Sum[If[If[Mod[n, k] == 0, 1 - k, 1] == f[GCD[n, k]], f[GCD[n, k]], 0], {k, 1, n}], {n, 1, 70}]

Formula

a(n) = Sum_{k=1..n} A191898(n,k)*[A191904(n,k) = A191898(n,k)].
Conjecture: a(n) = A057859(n) - A008472(n) - 1.

A176079 Triangle T(n,k) read by rows: If k divides n then k-1, otherwise -1.

Original entry on oeis.org

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

Views

Author

Mats Granvik, Apr 08 2010

Keywords

Examples

			Table begins:
  0;
  0,  1;
  0, -1,  2;
  0,  1, -1,  3;
  0, -1, -1, -1,  4;
  0,  1,  2, -1, -1,  5;
  0, -1, -1, -1, -1, -1,  6;
  0,  1, -1,  3, -1, -1, -1,  7;
  0, -1,  2, -1, -1, -1, -1, -1,  8;
  0,  1, -1, -1,  4, -1, -1, -1, -1, 9;
		

Crossrefs

Cf. A001065 (row sums), A191904.

Programs

  • GAP
    T:= function(n,k)
        if (n mod k = 0) then return k-1;
        else return -1;
        fi; end;
    Flat(List([1..15], n-> List([1..n], k-> T(n,k) ))); # G. C. Greubel, Nov 27 2019
  • Magma
    [(n mod k) eq 0 select k-1 else -1: k in [1..n], n in [1..15]]; // G. C. Greubel, Nov 27 2019
    
  • Maple
    seq(seq( `if`(mod(n,k)=0, k-1, -1) , k=1..n), n=1..15); # G. C. Greubel, Nov 27 2019
  • Mathematica
    Table[If[Divisible[n,k],k-1,-1],{n,15},{k,n}]//Flatten (* Harvey P. Dale, May 20 2016 *)
  • PARI
    T(n,k)= if(Mod(n,k)==0, k-1, -1); \\ G. C. Greubel, Nov 27 2019
    
  • Sage
    def T(n, k):
        if (mod(n,k)==0): return k-1
        else: return -1
    [[T(n, k) for k in (1..n)] for n in (1..15)] # G. C. Greubel, Nov 27 2019
    

Formula

T(n,k) = -A191904(n,k) for n >= k.
Sum_{k=1..n} T(n,k) = A001065(n). - Jon E. Schoenfield, Nov 29 2019

A191907 Square array read by antidiagonals up: T(n,k) = -(n-1) if n divides k, else 1.

Original entry on oeis.org

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

Views

Author

Mats Granvik, Jun 19 2011

Keywords

Comments

Apart from the top row, the same as A177121.
Sum_{k>=1} T(n,k)/k = log(n); this has been pointed out by Jaume Oliver Lafont in A061347 and A002162.

Examples

			Table starts:
0..0..0..0..0..0..0..0..0...
1.-1..1.-1..1.-1..1.-1..1...
1..1.-2..1..1.-2..1..1.-2...
1..1..1.-3..1..1..1.-3..1...
1..1..1..1.-4..1..1..1..1...
1..1..1..1..1.-5..1..1..1...
1..1..1..1..1..1.-6..1..1...
1..1..1..1..1..1..1.-7..1...
1..1..1..1..1..1..1..1.-8...
		

Crossrefs

Programs

  • Mathematica
    Clear[t, n, k];
    nn = 30;
    t[n_, k_] := t[n, k] = If[Mod[n, k] == 0, -(k - 1), 1]
    MatrixForm[Transpose[Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}]]]
  • PARI
    N=20; M=matrix(N,N,n,k, if(n%k==0,1-k,1))~

Formula

If n divides k then T(n,k) = -(n-1) else 1.

A143343 Triangle T(n,k) (n>=0, 1<=k<=n+1) read by rows: T(n,1)=1 for n>=0, T(1,2)=2. If n>=3 is odd then T(n,k)=1 for all k. If n>=3 is even then if k is prime and k-1 divides n then T(n,k)=k, otherwise T(n,k)=1.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 1, 1, 1, 1, 2, 3, 1, 5, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 5, 1, 7, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Gary W. Adamson & Mats Granvik, Aug 09 2008

Keywords

Comments

By the von Stadt-Clausen theorem, the product of the terms in row n is the denominator of the Bernoulli number B_n.

Examples

			The triangle begins:
1,
1,2,
1,2,3,
1,1,1,1,
1,2,3,1,5,
1,1,1,1,1,1,
1,2,3,1,1,1,7,
1,1,1,1,1,1,1,1,
1,2,3,1,5,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,2,3,1,1,1,1,1,1,1,11,
1,1,1,1,1,1,1,1,1,1,1,1,
1,2,3,1,5,1,7,1,1,1,1,1,13,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,
...
		

References

  • H. Rademacher, Topics in Analytic Number Theory, Springer, 1973, Chap. 1.

Crossrefs

Extensions

Entry revised by N. J. A. Sloane, Aug 10 2019
Showing 1-4 of 4 results.