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-3 of 3 results.

A139547 Triangle read by rows: T(n,k) = A003418(A010766).

Original entry on oeis.org

1, 2, 1, 6, 1, 1, 12, 2, 1, 1, 60, 2, 1, 1, 1, 60, 6, 2, 1, 1, 1, 420, 6, 2, 1, 1, 1, 1, 840, 12, 2, 2, 1, 1, 1, 1, 2520, 12, 6, 2, 1, 1, 1, 1, 1, 2520, 60, 6, 2, 2, 1, 1, 1, 1, 1, 27720, 60, 6, 2, 2, 1, 1, 1, 1, 1, 1, 27720, 60, 12, 6, 2, 2, 1, 1, 1, 1, 1, 1, 360360, 60, 12, 6, 2, 2, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Mats Granvik, Apr 27 2008, May 07 2008

Keywords

Comments

This triangle fits the formula of I. Vardi in the Mathworld link about the von Mangoldt function. That formula is the basis for Chebyshev's estimate for the number of primes.

Examples

			Triangle begins:
1;
2,1;
6,1,1;
12,2,1,1;
60,2,1,1,1;
60,6,2,1,1,1;
420,6,2,1,1,1,1;
840,12,2,2,1,1,1,1;
2520,12,6,2,1,1,1,1,1;
2520,60,6,2,2,1,1,1,1,1;
27720,60,6,2,2,1,1,1,1,1,1;
27720,60,12,6,2,2,1,1,1,1,1,1;
360360,60,12,6,2,2,1,1,1,1,1,1,1;
...
		

References

  • I. Vardi, Computational Recreations in Mathematica. Addison-Wesley, Redwood City, CA, 1991, p. 155.

Crossrefs

Programs

  • Mathematica
    nn = 13; a = Exp[Accumulate[MangoldtLambda[Range[nn]]]]; Flatten[Table[Table[a[[Floor[n/k]]], {k, 1, n}], {n, 1, nn}]][[1 ;; 89]]
    (*As a limit of a recurrence*)
    Clear[t, s, n, k, z, nn, ss, a, aa];(*z=1 corresponds to Zeta[1],z=2 corresponds to Zeta[2],z=ZetaZero[1] corresponds to Zeta[ZetaZero[1]],etc.*) z = 1; a = Normal[Series[Zeta[s], {s, z, 0}]]; ss = 10^40; s = N[z + 1/ss, 10^2]; nn = 13; t[n_, k_] := t[n, k] = If[k == 1, n*Zeta[s] - Sum[t[n, i]/i^(s - 1), {i, 2, n}], If[n >= k, t[Floor[n/k], 1], 0], 0]; aa = Table[Table[If[n >= k, t[n, k] - a, 0], {k, 1, n}], {n, 1, nn}]; Flatten[Round[Exp[aa]]][[1 ;; 89]]
    (* Mats Granvik, Jun 05 2016 *)

Formula

From Mats Granvik, Jun 05 2016: (Start)
T(n,k)=A003418(floor(n/k)).
Recurrence involving log(n!):
Let s=1.
T(n, k) = if k = 1 then log(n!) - Sum_{i=2..n} T(n, i)/i^(s - 1) else if n >= k then T(floor(n/k), 1) else 0 else 0.
Recurrence involving the Riemann zeta function:
Let z = 1.
Let a = the series expansion of zeta(s) at z.
Let ss -> Infinity.
Let s = z + 1/ss.
Then T(n,k) is generated by the recurrence:
a + Ts(n, k) = if k = 1 then n*zeta(s) - Sum_{i=2..n} Ts(n, i)/i^(s - 1) else if n >= k then Ts(floor(n/k), 1) else 0 else 0.
(End)

Extensions

Edited by Mats Granvik, Jun 28 2009
Further edits from N. J. A. Sloane, Jul 03 2009

A138618 Triangle of exponentials of Mangoldt function M(n) read by rows, in which row products give the natural numbers.

Original entry on oeis.org

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

Views

Author

Mats Granvik, May 14 2008

Keywords

Comments

Row sums are A001414. This table is similar to A139547 and A120885.
Cumulative column products are A003418, A139550, A139552, A139554.

Examples

			1 = 1
2*1 = 2
3*1*1 = 3
2*2*1*1 = 4
5*1*1*1*1 = 5
1*3*2*1*1*1 = 6
7*1*1*1*1*1*1 = 7
2*2*1*2*1*1*1*1 = 8
3*1*3*1*1*1*1*1*1 = 9
1*5*1*1*2*1*1*1*1*1 = 10
11*1*1*1*1*1*1*1*1*1*1 = 11
1*1*2*3*1*2*1*1*1*1*1*1 = 12
13*1*1*1*1*1*1*1*1*1*1*1*1 = 13
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Table[If[Mod[n, k] == 0, Exp[MangoldtLambda[n/k]], 1], {k, 1, n}], {n, 1, 14}]] (* Mats Granvik, May 23 2013 *)
  • PARI
    M(n) = ispower(n, , &n); if(isprime(n), n, 1); \\ A014963
    T(n,k) = if (n % k, 1, M(n/k));
    row(n) = vector(n, k, T(n,k)); \\ Michel Marcus, Mar 03 2023

Formula

T(n,k) = A014963(n/k) if n mod k = 0, otherwise 1. - Mats Granvik, May 23 2013

A139553 Triangle read by rows: T(n,k) = if n>=4*k and n<4*k*A014963(k) then k else 1; T(n,0)=1.

Original entry on oeis.org

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

Views

Author

Mats Granvik, Apr 27 2008

Keywords

Comments

Row products give A139554.

Examples

			Row products of the triangle are:
1 = 1
1*1 = 1
1*1*1 = 1
1*1*1*1 = 1
1*1*1*1*1 = 1
1*1*1*1*1*1 = 1
1*1*1*1*1*1*1 = 1
1*1*1*1*1*1*1*1 = 1
1*1*2*1*1*1*1*1*1 = 2
		

Crossrefs

Programs

  • Excel
    =if(and(row()-1>=(column()-1)*4;row()-1 < A014963(k-1)*(column()-1)*4);column()-1;1)
    
  • PARI
    up_to = 23220; \\ binomial(215+1,2)
    A014963(n) = { ispower(n, , &n); if(isprime(n), n, 1); }; \\ From A014963 by Charles R Greathouse IV, Jun 10 2011
    A139553tr(n, k) = if(0==k,1,if((n>=(4*k))&&(n<(4*k*A014963(k))),k,1));
    A139553list(up_to) = { my(v = vector(up_to), i=0); for(n=1,oo, for(k=1,n, i++; if(i > up_to, return(v)); v[i] = A139553tr(n-1,k-1))); (v); };
    v139553 = A139553list(up_to);
    A139553(n) = v139553[1+n]; \\ Antti Karttunen, Jan 03 2019

Extensions

Typo in the definition corrected by Antti Karttunen, Jan 03 2019
Showing 1-3 of 3 results.