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-10 of 25 results. Next

A357368 Triangle read by rows. Convolution triangle of the prime indicator sequence A089026.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 3, 4, 1, 0, 1, 10, 6, 1, 0, 5, 14, 21, 8, 1, 0, 1, 23, 47, 36, 10, 1, 0, 7, 28, 90, 108, 55, 12, 1, 0, 1, 49, 147, 258, 205, 78, 14, 1, 0, 1, 46, 249, 520, 595, 346, 105, 16, 1, 0, 1, 75, 360, 978, 1437, 1185, 539, 136, 18, 1
Offset: 0

Views

Author

Peter Luschny, Oct 03 2022

Keywords

Comments

To clarify our terminology: We say T is the convolution triangle of a (or T is the partition transform of a), if a is a sequence of integers defined for n >= 1, and the transformation, as defined by the Maple function below, applied to a, returns T. In the generated lower triangular matrix T, i.e., in the convolution triangle of a, T(n, 1) = a(n) for n >= 1.
For instance, let a(n) = Bell(n), then we call A357583 the convolution triangle of the Bell numbers, but not A205574, which is also called the "Bell convolution triangle" in the comments but leads to a different triangle. Similarly, if a(n) = n!, then A090238 is the convolution triangle of the factorial numbers, not A084938. Third example: A128899 is the convolution triangle of the Catalan numbers in our setup, not A059365. More generally, we recommend that when computing the transform of a 0-based sequence to use only the terms for n >= 1 and not to shift the sequence.
Note that T is (0, 0)-based and the first column of a convolution triangle always is 1, 0, 0, 0, ... and the main diagonal is 1, 1, 1, 1, ... if a(1) = 1. The (1, 1)-based subtriangle of a genuine convolution triangle, i.e., a convolution triangle without column 0 and row 0, is often used in place of the convolution triangle but does not fit well into some applications of the convolution triangles.

Examples

			Triangle T(n, k) starts:
[0] 1;
[1] 0, 1;
[2] 0, 2,  1;
[3] 0, 3,  4,   1;
[4] 0, 1, 10,   6,   1;
[5] 0, 5, 14,  21,   8,   1;
[6] 0, 1, 23,  47,  36,  10,   1;
[7] 0, 7, 28,  90, 108,  55,  12,   1;
[8] 0, 1, 49, 147, 258, 205,  78,  14,  1;
[9] 0, 1, 46, 249, 520, 595, 346, 105, 16, 1;
		

Crossrefs

Programs

  • Maple
    PMatrix := proc(dim, a) local n, k, m, g, M, A;
       if n = 0 then return [1] fi;
       A := [seq(a(i), i = 1..dim-1)];
       M := Matrix(dim, shape=triangular[lower]); M[1, 1] := 1;
       for m from 2 to dim do
           M[m, m] := M[m - 1, m - 1] * A[1];
           for k from m-1 by -1 to 2 do
               M[m, k] := add(A[i]*M[m-i, k-1], i = 1..m-k+1)
    od od; M end:
    a := n -> if isprime(n) then n else 1 fi: PMatrix(10, a);
    # Alternatively, as the coefficients of row polynomials:
    P := proc(n, x, a) option remember; ifelse(n = 0, 1,
        x*add(a(n - k)*P(k, x, a), k = 0..n-1)) end:
    Pcoeffs := proc(n, a) seq(coeff(P(n, x, a), x, k), k=0..n) end:
    seq(Pcoeffs(n, a), n = 0..9);
    # Alternatively, term by term:
    T := proc(n, k, a) option remember; # Alois P. Heinz style
        `if`(k=0, `if`(n=0, 1, 0), `if`(k=1, `if`(n=0, 0, a(n)),
        (q->add(T(j, q, a)*T(n-j, k-q, a), j=0..n))(iquo(k, 2)))) end:
    seq(seq(T(n, k, a), k=0..n), n=0..9);
  • Mathematica
    PMatrix[dim_, a_] := Module[{n, k, m, g, M, A}, If[n == 0, Return[1]]; A = Array[a, dim-1]; M = Array[0&, {dim, dim}]; M[[1, 1]] = 1; For[m = 2, m <= dim, m++, M[[m, m]] = M[[m-1, m-1]]*A[[1]]; For[k = m-1, k >= 2, k--, M[[m, k]] = Sum[A[[i]]*M[[m-i, k-1]], {i, 1, m-k+1}]]]; M];
    a[n_] :=  If[PrimeQ[n], n, 1];
    nmax = 10;
    PM = PMatrix[nmax+1, a];
    T[n_, k_] := PM[[n+1, k+1]];
    Table[T[n, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Oct 21 2022 *)
  • Python
    def ConvTriangle(dim: int, a) -> list[list[int]]:
        if callable(a): # Cache the input sequence.
            A = [a(i) for i in range(1, dim)]
        else:
            A = a
        print("In:", A)
        C = [[0 for k in range(m + 1)] for m in range(dim)]
        C[0][0] = 1
        for m in range(1, dim):
            C[m][m] = C[m - 1][m - 1] * A[0]
            for k in range(m - 1, 0, -1):
                C[m][k] = sum(A[i] * C[m - i - 1][k - 1] for i in range(m - k + 1))
        return C
    from sympy import isprime, flatten
    def a(n): return n if isprime(n) else 1
    print(flatten(ConvTriangle(10, a)))

A166120 a(n) = A027642(n-1) / A089026(n).

Original entry on oeis.org

1, 1, 2, 1, 6, 1, 6, 1, 30, 1, 6, 1, 210, 1, 6, 1, 30, 1, 42, 1, 330, 1, 6, 1, 2730, 1, 6, 1, 30, 1, 462, 1, 510, 1, 6, 1, 51870, 1, 6, 1, 330, 1, 42, 1, 690, 1, 6, 1, 46410, 1, 66, 1, 30, 1, 798, 1, 870, 1, 6, 1, 930930, 1, 6, 1, 510, 1, 966, 1, 30, 1, 66, 1, 1919190, 1, 6, 1, 30, 1, 42, 1
Offset: 1

Views

Author

Paul Curtz, Oct 07 2009

Keywords

Comments

As in A166062, the offset is rather arbitrary.
The sequence contains numbers like 210 which are not in A006954.
One could also consider dividing by the largest prime divisor of A027642 instead of A089026, which yields 1, 1, 2, 1, 6, 1, 6, 1, 6, 1, 6, 1, 210, 1, 2, 1, 30, 1, 42, 1, 30, ... as an alternative version.
These are the Clausen numbers based on the proper divisors of n whereas the classical Clausen numbers A160014 are based on all divisors of n. (The proper divisors are the divisors of n that are less than n.) - Peter Luschny, Aug 20 2022

Crossrefs

Programs

  • Maple
    A027642 := proc(n) denom(bernoulli(n)) ; end:
    A089026 := proc(n) if isprime(n) then n; else 1; end if; end proc:
    A166120 := proc(n) A027642(n-1)/A089026(n) ; end proc: seq(A166120(n), n=1..80) ; # R. J. Mathar, Mar 25 2010
    # Second program, assuming offset 0:
    clausen := proc(n) if irem(n,2)=1 then 1 else numtheory[divisors](n) minus {n};
    map(i -> i+1, %); select(isprime, %); mul(i, i=%) fi end:
    seq(clausen(n), n = 0..79); # Peter Luschny, Aug 20 2022

Extensions

Extended by R. J. Mathar, Mar 25 2010

A195183 Fractalization of the prime marker sequence A089026.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Sep 10 2011

Keywords

Comments

See A194959 for a discussion of fractalization and the interspersion fractally induced by a sequence. (The prime marker sequence A089026 is defined by p(n)=n if n is prime and p(n)=1 otherwise.)

Crossrefs

Programs

  • Mathematica
    Table[p[n], {n, 1, 90}]  (* A089026 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20] (* A195183 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13}, {k, 1, n}]]  (* A195184 *)
    q[n_] := Position[w, n]; Flatten[Table[q[n], {n, 1, 80}]]  (* A195185 *)

A195184 Interspersion fractally induced by the prime marker sequence A089026.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 7, 12, 13, 14, 11, 15, 18, 19, 20, 17, 21, 16, 24, 25, 26, 23, 27, 22, 28, 32, 33, 34, 31, 35, 30, 36, 29, 41, 42, 43, 40, 44, 39, 45, 38, 37, 51, 52, 53, 50, 54, 49, 55, 48, 47, 46, 61, 62, 63, 60, 64, 59, 65, 58, 57, 56, 66, 73, 74, 75
Offset: 1

Views

Author

Clark Kimberling, Sep 10 2011

Keywords

Comments

See A194959 for a discussion of fractalization and the interspersion fractally induced by a sequence. Every pair of rows eventually intersperse. As a sequence, A194184 is a permutation of the positive integers, with inverse A195185. (The prime marker sequence A089026 is given by p(n)=n if n is prime and p(n)=1 otherwise).

Examples

			Northwest corner:
1...2...4...8...12..18..24..32
3...5...9...13..19..26..33..42
6...10..14..20..26..34..43..53
7...11..17..23..31..40..50..60
15..21..27..35..44..54..64..76
		

Crossrefs

Programs

  • Mathematica
    p[n_] := If[PrimeQ[n], n, 1]
    Table[p[n], {n, 1, 90}]  (* A089026 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20] (* A195183 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13}, {k, 1, n}]]  (* A195184 *)
    q[n_] := Position[w, n]; Flatten[Table[q[n], {n, 1, 80}]]  (* A195185 *)

A166260 a(n) = A089026(n) - 1.

Original entry on oeis.org

0, 1, 2, 0, 4, 0, 6, 0, 0, 0, 10, 0, 12, 0, 0, 0, 16, 0, 18, 0, 0, 0, 22, 0, 0, 0, 0, 0, 28, 0, 30, 0, 0, 0, 0, 0, 36, 0, 0, 0, 40, 0, 42, 0, 0, 0, 46, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 58, 0, 60, 0, 0, 0, 0, 0, 66, 0, 0, 0, 70, 0, 72, 0, 0, 0, 0, 0, 78, 0, 0, 0, 82, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Mats Granvik, Oct 10 2009

Keywords

Comments

Same as A061006 except for a(4) = 0 (Wilson's Theorem). - Georg Fischer, Oct 12 2018

Crossrefs

Cf. A119690. - R. J. Mathar, Oct 16 2009

Programs

  • PARI
    a(n) = if (isprime(n), n-1, 0); \\ Michel Marcus, Oct 12 2018

Formula

a(n) = (n-1) * A010051(n). - Wesley Ivan Hurt, Oct 12 2018

A025475 1 and the prime powers p^m where m >= 2, thus excluding the primes.

Original entry on oeis.org

1, 4, 8, 9, 16, 25, 27, 32, 49, 64, 81, 121, 125, 128, 169, 243, 256, 289, 343, 361, 512, 529, 625, 729, 841, 961, 1024, 1331, 1369, 1681, 1849, 2048, 2187, 2197, 2209, 2401, 2809, 3125, 3481, 3721, 4096, 4489, 4913, 5041, 5329, 6241, 6561, 6859, 6889, 7921, 8192
Offset: 1

Views

Author

Keywords

Comments

Also nonprime n such that sigma(n)*phi(n) > (n-1)^2. - Benoit Cloitre, Apr 12 2002
If p is a term of the sequence, then the index n for which a(n) = p is given by n := b(p) := 1 + Sum_{k>=2} PrimePi(p^(1/k)). Here, the sum has floor(log_2(p)) positive terms. For any m > 0, the greatest number n such that a(n) <= m is also given by b(m), thus, b(m) is the number of such prime powers <= m. - Hieronymus Fischer, May 31 2013
That 8 and 9 are the only two consecutive integers in this sequence is known as Catalan's Conjecture and was proved in 2002 by Preda Mihăilescu. - Geoffrey Critzer, Nov 15 2015

Crossrefs

Subsequence of A000961. - Reinhard Zumkeller, Jun 22 2011
Differences give A053707.
Cf. A076048 (number of terms < 10^n).
There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean. Also A001597 is the sequence of nontrivial powers n^k, n >= 1, k >= 2. - N. J. A. Sloane, Mar 24 2018

Programs

  • Haskell
    a025475 n = a025475_list !! (n-1)
    a025475_list = filter ((== 0) . a010051) a000961_list
    -- Reinhard Zumkeller, Jun 22 2011
    
  • Maple
    isA025475 := proc(n)
        if n < 1 then
            false;
        elif n = 1 then
            true;
        elif isprime(n) then
            false;
        elif nops(numtheory[factorset](n)) = 1 then
            true;
        else
            false;
        end if;
    end proc:
    A025475 := proc(n)
        option remember;
        local a;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA025475(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    # R. J. Mathar, Jun 06 2013
    # alternative:
    N:= 10^5: # to get all terms <= N
    Primes:= select(isprime, [2,(2*i+1 $ i = 1 .. floor((sqrt(N)-1)/2))]):
    sort([1,seq(seq(p^i, i=2..floor(log[p](N))),p=Primes)]); # Robert Israel, Jul 27 2015
  • Mathematica
    A025475 = Select[ Range[ 2, 10000 ], ! PrimeQ[ # ] && Mod[ #, # - EulerPhi[ # ] ] == 0 & ]
    A025475 = Sort[ Flatten[ Table[ Prime[n]^i, {n, 1, PrimePi[ Sqrt[10^4]]}, {i, 2, Log[ Prime[n], 10^4]}]]]
    {1}~Join~Select[Range[10^4], And[! PrimeQ@ #, PrimePowerQ@ #] &] (* Michael De Vlieger, Jul 04 2016 *)
    Join[{1},Select[Range[100000],PrimePowerQ[#]&&!PrimeQ[#]&]] (* Harvey P. Dale, Oct 29 2023 *)
  • PARI
    for(n=1,10000,if(sigma(n)*eulerphi(n)*(1-isprime(n))>(n-1)^2,print1(n,",")))
    
  • PARI
    is_A025475(n)={ ispower(n,,&p) && isprime(p) || n==1 }  \\ M. F. Hasler, Sep 25 2011
    
  • PARI
    list(lim)=my(v=List([1]),L=log(lim+.5));forprime(p=2,(lim+.5)^(1/3),for(e=3,L\log(p),listput(v,p^e))); vecsort(concat(Vec(v), apply(n->n^2,primes(primepi(sqrtint(lim\1)))))) \\ Charles R Greathouse IV, Nov 12 2012
    
  • PARI
    list(lim)=my(v=List([1])); for(m=2,logint(lim\=1,2), forprime(p=2,sqrtnint(lim,m), listput(v, p^m))); Set(v) \\ Charles R Greathouse IV, Aug 26 2015
    
  • Python
    from sympy import primerange
    A025475_list, m = [1], 10*2
    m2 = m**2
    for p in primerange(1,m):
        a = p**2
        while a < m2:
            A025475_list.append(a)
            a *= p
    A025475_list = sorted(A025475_list) # Chai Wah Wu, Sep 08 2014
    
  • Python
    from sympy import primepi, integer_nthroot
    def A025475(n):
        if n==1: return 1
        def f(x): return int(n-2+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 13 2024

Formula

The number of terms <= N is O(sqrt(N)*log N). [See Weisstein link] - N. J. A. Sloane, May 27 2022
A005171(a(n))*A010055(a(n)) = 1. - Reinhard Zumkeller, Nov 01 2009
A192280(a(n)) = 0 for n > 1. - Reinhard Zumkeller, Aug 26 2011
A014963(a(n)) - A089026(a(n)) = A014963(a(n)) - 1. - Eric Desbiaux, May 18 2013
From Hieronymus Fischer, May 31 2013: (Start)
The greatest number n such that a(n) <= m is given by 1 + Sum_{k>=2} A000720(floor(m^(1/k))).
Example 1: m = 10^10 ==> n = 10085;
Example 2: m = 10^11 ==> n = 28157;
Example 3: m = 10^12 ==> n = 80071;
Example 4: m = 10^15 ==> n = 1962690. (End)
Sum_{n>=2} 1/a(n) = Sum_{p prime} 1/(p*(p-1)) = A136141. - Amiram Eldar, Oct 11 2020
From Amiram Eldar, Jan 28 2021: (Start)
Product_{n>=2} (1 + 1/a(n)) = Product_{k>=2} zeta(k)/zeta(2*k) = 2.0729553047...
Product_{n>=2} (1 - 1/a(n)) = A068982. (End)

Extensions

Edited by Daniel Forgues, Aug 18 2009

A007406 Wolstenholme numbers: numerator of Sum_{k=1..n} 1/k^2.

Original entry on oeis.org

1, 5, 49, 205, 5269, 5369, 266681, 1077749, 9778141, 1968329, 239437889, 240505109, 40799043101, 40931552621, 205234915681, 822968714749, 238357395880861, 238820721143261, 86364397717734821, 17299975731542641, 353562301485889, 354019312583809, 187497409728228241
Offset: 1

Views

Author

Keywords

Comments

By Wolstenholme's theorem, p divides a(p-1) for prime p > 3. - T. D. Noe, Sep 05 2002
Also p divides a( (p-1)/2 ) for prime p > 3. - Alexander Adamchuk, Jun 07 2006
The rationals a(n)/A007407(n) converge to Zeta(2) = (Pi^2)/6 = 1.6449340668... (see the decimal expansion A013661).
For the rationals a(n)/A007407(n), n >= 1, see the W. Lang link under A103345 (case k=2).
See the Wolfdieter Lang link under A103345 on Zeta(k, n) with the rationals for k=1..10, g.f.s and polygamma formulas. - Wolfdieter Lang, Dec 03 2013
Denominator of the harmonic mean of the first n squares. - Colin Barker, Nov 13 2014
Conjecture: for n > 3, gcd(n, a(n-1)) = A089026(n). Checked up to n = 10^5. - Amiram Eldar and Thomas Ordowski, Jul 28 2019
True if n is prime, by Wolstenholme's theorem. It remains to show that gcd(n, a(n-1)) = 1 if n > 3 is composite. - Jonathan Sondow, Jul 29 2019
From Peter Bala, Feb 16 2022: (Start)
Sum_{k = 1..n} 1/k^2 = 1 + (1 - 1/2^2)*(n-1)/(n+1) - (1/2^2 - 1/3^2)*(n-1)*(n-2)/((n+1)*(n+2)) + (1/3^2 - 1/4^2)*(n-1)*(n-2)*(n-3)/((n+1)*(n+2)*(n+3)) - (1/4^2 - 1/5^2)*(n-1)*(n-2)*(n-3)*(n-4)/((n+1)*(n+2)*(n+3)*(n+4)) + .... Cf. A082687 and A120778.
This identity allows us to extend the definition of Sum_{k = 1..n} 1/k^2 to non-integral values of n. (End)
Numerators of the Eulerian numbers T(-2,k) for k = 0,1..., if T(n,k) is extended to negative n by the recurrence T(n,k) = (k+1)*T(n-1,k) + (n-k)*T(n-1,k-1) (indexed as in A173018). - Michael J. Collins, Oct 10 2024

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001008, A007407 (denominators), A000290, A082687, A120778.
Numbers n such that a(n) is prime are listed in A111354. Primes in {a(n)} are listed in A123751. - Alexander Adamchuk, Oct 11 2006

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    a007406 n = a007406_list !! (n-1)
    a007406_list = map numerator $ scanl1 (+) $ map (1 %) $ tail a000290_list
    -- Reinhard Zumkeller, Jul 06 2012
    
  • Magma
    [Numerator(&+[1/k^2:k in [1..n]]):n in [1..23]]; // Marius A. Burtea, Aug 02 2019
  • Maple
    a:= n-> numer(add(1/i^2, i=1..n)): seq(a(n), n=1..24);  # Zerinvary Lajos, Mar 28 2007
  • Mathematica
    a[n_] := If[ n<1, 0, Numerator[HarmonicNumber[n, 2]]]; Table[a[n], {n, 100}]
    Numerator[HarmonicNumber[Range[20],2]] (* Harvey P. Dale, Jul 06 2014 *)
  • PARI
    {a(n) = if( n<1, 0, numerator( sum( k=1, n, 1 / k^2 ) ) )} /* Michael Somos, Jan 16 2011 */
    

Formula

Sum_{k=1..n} 1/k^2 = sqrt(Sum_{j=1..n} Sum_{i=1..n} 1/(i*j)^2). - Alexander Adamchuk, Oct 26 2004
G.f. for rationals a(n)/A007407(n), n >= 1: polylog(2,x)/(1-x).
a(n) = Numerator of (Pi^2)/6 - Zeta(2,n). - Artur Jasinski, Mar 03 2010

A191898 Symmetric square array read by antidiagonals: T(n,1)=1, T(1,k)=1, T(n,k) = -Sum_{i=1..k-1} T(n-i,k) for n >= k, -Sum_{i=1..n-1} T(k-i,n) for n < k.

Original entry on oeis.org

1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -2, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -2, 1, 1, -2, 1, 1, 1, -1, 1, -1, -4, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, -1, 1, -1, 1, -1, -6, -1, 1, -1, 1, -1, 1
Offset: 1

Views

Author

Mats Granvik, Jun 19 2011

Keywords

Comments

Rows equal columns and are periodic. No zero elements are found (conjecture). The recurrence is related to the recurrence for the Mahonian numbers. The main diagonal is the Dirichlet inverse of the Euler totient function A023900 (conjecture). [The 2nd and 3rd formulas state that the conjecture is correct. R. J. Mathar, Sep 16 2017]
The sums from n=1 to infinity of T(n,k)/n converge to the Mangoldt function for column k (conjecture).
If gcd(n,k)=1 then T(n,k)=1 and if T(n,k)=1 then gcd(n,k)=1 (conjecture).
The Dirichlet generating functions for s > 1 for the columns appear to be (see A054535):
Zeta(s)*(1 + (Sum over all possible combinations of products of negative distinct prime factors of k, up to rearrangement, 1/((-1* first distinct prime factor)*(-1*second distinct prime factor)*(-1*third distinct prime factor * ...))^(s-1))).
Examples:
k=1: Zeta(s)
k=2: Zeta(s)*(1 - 1/2^(s-1))
k=3: Zeta(s)*(1 - 1/3^(s-1))
k=4: Zeta(s)*(1 - 1/2^(s-1))
k=5: Zeta(s)*(1 - 1/5^(s-1))
k=6: Zeta(s)*(1 - 1/2^(s-1) - 1/3^(s-1) + 1/6^(s-1))
k=7: Zeta(s)*(1 - 1/7^(s-1))
...
k=30: Zeta(s)*(1 - 1/2^(s-1) - 1/3^(s-1) - 1/5^(s-1) + 1/6^(s-1) + 1/10^(s-1) + 1/15^(s-1) - 1/30^(s-1))
...
(conjecture)
See triangle A142971 for negative distinct prime factors.
This could probably be checked by matrix multiplication.
The signs of the eigenvalues of this matrix are a rearrangement of the Mobius function A008683 (conjecture). The first few eigenvalues are:
{1.0000}
{-1.4142, 1.4142}
{-2.6554, 1.8662, -1.2108}
{-3.4393, 2.1004, -1.6611, 0}
{-4.7711, -3.3867, 2.5910, -1.4332, 0}
{-5.2439, -3.4641, 3.4641, 2.5169, -2.2730, 0}
The relation to Dirichlet characters for the entries in this matrix appears appears to be formulated in terms of the sequence A089026 which is equal to n if n is a prime, otherwise equal to 1. See Mathematica program below. [Mats Granvik, Nov 23 2013]
From Mats Granvik, Jun 19 2016: (Start)
Remark about the Dirichlet generating function for the whole matrix: Subtracting the first column (in the form of zeta(c)) of the matrix gives us the limit: lim_{c->1} zeta(s)*zeta(c)/zeta(c+s-1)-zeta(c) = -zeta'(s)/zeta(s) which is the classical Dirichlet generating function for the von Mangoldt function.
For n >= k, see A231425, this matrix has row sums equal to zero except for the first row:
1=1
1-1=0
1+1-2=0
1-1+1-1=0
1+1+1+1-4=0
...
log(A014963(n)) = Sum_{k>=1} A191898(n,k)/k, for n>1.
log(A014963(k)) = Sum_{n>=1} A191898(n,k)/n, for k>1.
log(A014963(n)) = limit of zeta(s)*(Sum_{d divides n} A008683(d)/d^(s-1)) as s->1, for n>1.
A008683(n) = Sum_{k=1..n} A191898(n,k)*exp(-i*2*Pi*k/n)/n.
A008683(n) = Sum_{n=1..k} A191898(n,k)*exp(-i*2*Pi*n/k)/k.
(End)
From Mats Granvik, Aug 09 2016: (Start)
The Dirichlet generating function for the matrix is zero for any pair c and s = 2 - c and any pair s and c = 2 - s except at the pole c = 1 and s = 1 where it is indeterminate.
In the Mathematica program section, in the expression for the matrix as Dirichlets characters, the variables s and c can apparently be any pair of positive integers.
Limits related to the Dirichlet generating function for the matrix: Let s = ZetaZero(n), then lim_{c->1} zeta(s*c)/zeta(c+s-1) = ZetaZero(n). Let s = ZetaZero(n), then lim_{c->1} zeta(s*c)/zeta(c+s*c-1) = ZetaZero(n)/(1+ZetaZero(n)).
(End)

Examples

			Array starts:
n\k | 1    2    3    4    5    6    7    8    9   10
----+-----------------------------------------------------
1   | 1,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
2   | 1,  -1,   1,  -1,   1,  -1,   1,  -1,   1,  -1, ...
3   | 1,   1,  -2,   1,   1,  -2,   1,   1,  -2,   1, ...
4   | 1,  -1,   1,  -1,   1,  -1,   1,  -1,   1,  -1, ...
5   | 1,   1,   1,   1,  -4,   1,   1,   1,   1,  -4, ...
6   | 1,  -1,  -2,  -1,   1,   2,   1,  -1,  -2,  -1, ...
7   | 1,   1,   1,   1,   1,   1,  -6,   1,   1,   1, ...
8   | 1,  -1,   1,  -1,   1,  -1,   1,  -1,   1,  -1, ...
9   | 1,   1,  -2,   1,   1,  -2,   1,   1,  -2,   1, ...
10  | 1,  -1,   1,  -1,  -4,  -1,   1,  -1,   1,   4, ...
		

Crossrefs

Programs

  • Mathematica
    T[ n_, k_] := T[ n, k] = Which[ n < 1 || k < 1, 0, n == 1 || k == 1, 1, k > n, T[k, n], n > k,T[k, Mod[n, k, 1]], True, -Sum[ T[n, i], {i, n - 1}]]; (* Michael Somos, Jul 18 2011 *)
    (* Conjectured expression for the matrix as Dirichlet characters *) s = RandomInteger[{1, 3}]; c = RandomInteger[{1, 3}]; nn = 12; b = Table[Exp[MangoldtLambda[Divisors[n]]]^-MoebiusMu[Divisors[n]], {n, 1, nn^Max[s, c]}]; j = 1; MatrixForm[Table[Table[Product[(b[[n^s]][[m]]*DirichletCharacter[b[[n^s]][[m]], j, k^c] - (b[[n^s]][[m]] - 1)), {m, 1, Length[Divisors[n]]}], {n, 1, nn}], {k, 1, nn}]] (* Mats Granvik, Nov 23 2013 and Aug 09 2016 *)
  • PARI
    {T(n, k) = if( n<1 || k<1, 0, n==1 || k==1, 1, k>n, T(k, n), kMichael Somos, Jul 18 2011 */
    
  • Python
    from sympy.core.cache import cacheit
    @cacheit
    def T(n, k): return 0 if n<1 or k<1 else 1 if n==1 or k==1 else T(k, n) if k>n else T(k, (n - 1)%k + 1) if n>k else -sum([T(n, i) for i in range(1, n)])
    for n in range(1, 21): print([T(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Oct 23 2017

Formula

T(n,1)=1, T(1,k)=1, n>=k: -Sum_{i=1..k-1} T(n-i,k), n
T(n, n) = A023900(n). - Michael Somos, Jul 18 2011
T(n, k) = A023900(gcd(n,k)). - Mats Granvik, Jun 18 2012
Dirichlet generating function for sequence in the n-th row: zeta(s)*Sum_{ d divides n } mu(d)/d^(s-1). - Mats Granvik, Jun 18 2012 & Jun 19 2016
From Mats Granvik, Jun 19 2016: (Start)
Dirichlet generating function for the whole matrix: Sum_{k>=1} (Sum_{n>=1} T(n,k)/(n^c*k^s)) = Sum_{n>=1} (zeta(s)*Sum_{ d divides n } mu(d)/d^(s-1))/n^c = zeta(s)*zeta(c)/zeta( c + s - 1 ).
T(n,k) = A127093(n,k)^(1/2-i*a(k))*transpose(A008683(k)*(A127093(n,k)^(1/2+i*a(n)))) where a(x) is some real number. An example would be T(n,k) = A127093(n,k)^(zetazero(k))*transpose(A008683(k)*(A127093(n,k)^(zetazero(-k)))) but this is of course not special for only the zeta zeros.
Recurrence for a subset of A191898 that is a cross-directional variant of the recurrence in A051731: T(1,1)=1, T(1,2..k)=0, T(2..n,1)=0, n >= k: -Sum_{i=1..k-1} T(n-i,k) - T(n-i,k-1), n < k: -Sum_{i=1..n-1} T(k-i,n) - T(k-i,n-1). Notice that the identity matrix in linear algebra satisfies a similar recurrence:
T(1,1)=1, T(1,2..k)=0, T(2..n,1)=0, n >= k: -Sum_{i=1..n-1} T(n-i,k) - T(n-i,k-1), n < k: -Sum_{i=1..k-1} T(k-i,n) - T(k-i,n-1).
(End)
This array equals A051731*transpose(A143256). - Mats Granvik, Jul 22 2016
T(n,k) = sqrt(A143256(n,k))*transpose(sqrt(A143256(n,k))). - Mats Granvik, Aug 10 2018
Dirichlet generating function for absolute values: Sum_{k>=1} (Sum_{n>=1} abs(T(n,k))/(n^c*k^s)) = zeta(s)*zeta(c)*zeta(s + c - 1)/zeta(2*(s + c - 1))*Product_{k>=1} (1 - 2/(prime(k) + prime(k)^(s + c))). After Vaclav Kotesovec in A173557. - Mats Granvik, Apr 25 2021

A357588 The compositional inverse of n -> n^[isprime(n)], where [b] is the Iverson bracket of b.

Original entry on oeis.org

1, -2, 5, -11, 6, 146, -1295, 7712, -36937, 141514, -357676, -322973, 12078666, -102218510, 623243991, -3041134727, 11440387382, -23657862864, -95377084665, 1570488584608, -12255377466362, 72288056416374, -340793435817068, 1186234942871544, -1525020468715715
Offset: 1

Author

Peter Luschny, Oct 04 2022

Keywords

Crossrefs

Programs

  • Maple
    # REVERT from N. J. A. Sloane's 'Transforms' (see the footer of the page).
    REVERT([seq(if isprime(k) then k else 1 fi, k = 1..25)]);
    # Alternative:
    CompInv := proc(len, seqfun) local n, k, m, g, M, A;
    A := [seq(seqfun(i), i=1..len)];
    M := Matrix(len+1, shape=triangular[lower]); M[1,1] := 1;
    for m from 2 to len + 1 do M[m, m] := M[m - 1, m - 1]/A[1];
    for k from m-1 by -1 to 2 do M[m, k] := M[m-1, k-1] -
    add(A[i+1]*M[m, k+i], i=1..m-k)/A[1] od od; seq(M[k, 2], k=2..len + 1) end:
    CompInv(25, n -> if isprime(n) then n else 1 fi);

A090585 Numerator of (Sum_{k=1..n} k) / (Product_{k=1..n} k).

Original entry on oeis.org

1, 3, 1, 5, 1, 7, 1, 1, 1, 11, 1, 13, 1, 1, 1, 17, 1, 19, 1, 1, 1, 23, 1, 1, 1, 1, 1, 29, 1, 31, 1, 1, 1, 1, 1, 37, 1, 1, 1, 41, 1, 43, 1, 1, 1, 47, 1, 1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 59, 1, 61, 1, 1, 1, 1, 1, 67, 1, 1, 1, 71, 1, 73, 1, 1, 1, 1, 1, 79, 1, 1, 1, 83, 1
Offset: 1

Author

Reinhard Zumkeller, Dec 03 2003

Keywords

Comments

If the offset is set to 2 then [a(n) <> 1] is the indicator function of the odd primes ([] Iverson bracket). [Peter Luschny, Jul 05 2009]

Examples

			For n=5, (1+2+3+4+5)/(1*2*3*4*5) = 15/120 = 1/8, so a(5) = 1. For n=6, (1+2+3+4+5+6)/(1*2*3*4*5*6) = 21/720 = 7/240, so a(6) = 7. - _Michael B. Porter_, Jul 02 2016
		

Crossrefs

Denominator = A090586.

Programs

  • Maple
    a := n -> denom(2*n!/(n+1)); # Peter Luschny, Jul 05 2009
  • Mathematica
    With[{nn=100},Numerator[Accumulate[Range[nn]]/Rest[FoldList[Times,1,Range[nn]]]]] (* Harvey P. Dale, Sep 09 2014 *)
  • PARI
    for(n=1,100,print1(gcd(n*(n+1)/2,round(factorial(n))+1),", ")); \\ Jaume Oliver Lafont, Jan 23 2009

Formula

a(n) = A000217(n) / A069268(n).
a(n) = A089026(n+1) for n>1.
Also for n>1, a(n) is a numerator of determinant of (n-1) X (n-1) matrix with M(i,j) = (i+2)/(i+1) if i=j, otherwise 1. E.g., a(2) = Numerator[Det[{{3/2}}]] = Numerator[3/2] = 3. a(3) = Numerator[Det[{{3/2,1},{1,4/3}}]] = Numerator[1/1] = 1. a(4) = Numerator[Det[{{3/2,1,1},{1,4/3,1},{1,1,5/4}}]] = Numerator[5/12] = 5. - Alexander Adamchuk, May 26 2006
a(n) = gcd(n*(n+1)/2, n!+1). [Jaume Oliver Lafont, Jan 23 2009]
Showing 1-10 of 25 results. Next