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 33 results. Next

A238453 Triangle read by rows: T(n,k) = A001088(n)/(A001088(k)*A001088(n-k)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 4, 2, 1, 1, 4, 8, 8, 4, 1, 1, 2, 8, 8, 8, 2, 1, 1, 6, 12, 24, 24, 12, 6, 1, 1, 4, 24, 24, 48, 24, 24, 4, 1, 1, 6, 24, 72, 72, 72, 72, 24, 6, 1, 1, 4, 24, 48, 144, 72, 144, 48, 24, 4, 1, 1, 10, 40, 120, 240, 360, 360, 240, 120
Offset: 0

Views

Author

Tom Edgar, Feb 26 2014

Keywords

Comments

We assume that A001088(0)=1 since it would be the empty product.
These are the generalized binomial coefficients associated with Euler's totient function A000010.
Another name might be the totienomial coefficients.

Examples

			The first five terms in Euler's totient function are 1,1,2,2,4 and so T(4,2) = 2*2*1*1/((1*1)*(1*1))=4 and T(5,3) = 4*2*2*1*1/((2*1*1)*(1*1))=8.
The triangle begins
1
1 1
1 1 1
1 2 2 1
1 2 4 2 1
1 4 8 8 4 1
1 2 8 8 8 2 1
		

Crossrefs

Programs

  • Haskell
    a238453 n k = a238453_tabl !! n !! k
    a238453_row n = a238453_tabl !! n
    a238453_tabl = [1] : f [1] a000010_list where
       f xs (z:zs) = (map (div y) $ zipWith (*) ys $ reverse ys) : f ys zs
         where ys = y : xs; y = head xs * z
    -- Reinhard Zumkeller, Feb 27 2014
    
  • Mathematica
    f[n_] := Product[EulerPhi@ k, {k, n}]; Table[f[n]/(f[k] f[n - k]), {n, 0, 11}, {k, 0, n}] // Flatten (* Michael De Vlieger, Apr 19 2016 *)
  • PARI
    T(n,k)={prod(i=1, k, eulerphi(n+1-i)/eulerphi(i))} \\ Andrew Howroyd, Nov 13 2018
  • Sage
    q=100 #change q for more rows
    P=[euler_phi(i) for i in [0..q]]
    [[prod(P[1:n+1])/(prod(P[1:k+1])*prod(P[1:(n-k)+1])) for k in [0..n]] for n in [0..len(P)-1]] #generates the triangle up to q rows.
    

Formula

T(n,k) = A001088(n)/(A001088(k)*A001088(n-k)).
T(n,k) = prod_{i=1..n} A000010(i)/(prod_{i=1..k} A000010(i)*prod_{i=1..n-k} A000010(i)).
T(n,k) = A000010(n)/n*(k/A000010(k)*T(n-1,k-1)+(n-k)/A000010(n-k)*T(n-1,k)).
T(n+1, 2) = A083542(n). - Michael Somos, Aug 26 2014
T(n,k) = Product_{i=1..k} (phi(n+1-i)/phi(i)), where phi is Euler's totient function (A000010). - Werner Schulte, Nov 14 2018

A231721 Partial sums of phitorials: a(n) = A001088(1)+A001088(2)+...+A001088(n).

Original entry on oeis.org

1, 2, 4, 8, 24, 56, 248, 1016, 5624, 24056, 208376, 945656, 9793016, 62877176, 487550456, 3884936696, 58243116536, 384392195576, 6255075618296, 53220543000056, 616806151581176, 6252662237392376, 130241496125238776, 1122152167228009976, 20960365589283433976
Offset: 1

Views

Author

Antti Karttunen, Nov 27 2013

Keywords

Comments

a(n) gives the index to the first term in each subrange of A231716. Specifically, for all n>=1, A231716(a(n)) = A007489(n).

Crossrefs

Cf. A001088 ("phitorials"), A231722, A231716, A007489.

Programs

  • Mathematica
    Accumulate[FoldList[Times,EulerPhi[Range[30]]]] (* Harvey P. Dale, Apr 02 2018 *)

Formula

a(n) = 1 if n=1, otherwise A001088(n)+a(n-1).
a(n) = A231722(n)+1. [Follows from the definitions]

A231722 Partial sums of A001088 starting from its second term; a(1)=0, a(n) = A001088(2)+...+A001088(n).

Original entry on oeis.org

0, 1, 3, 7, 23, 55, 247, 1015, 5623, 24055, 208375, 945655, 9793015, 62877175, 487550455, 3884936695, 58243116535, 384392195575, 6255075618295, 53220543000055, 616806151581175, 6252662237392375, 130241496125238775, 1122152167228009975, 20960365589283433975
Offset: 1

Views

Author

Antti Karttunen, Nov 27 2013

Keywords

Comments

a(n+1) gives the index to the last term in each row of A231716. Specifically, for all n>=1, A231716(a(n+1)) = A033312(n+1).
a(n) = natural number which is written as the n-th repunit in "totient phi number system": 0, 1, 10, 11, 100, 101, 110, 111, 200, 201, 210, 211, 300, 301, 310, 311, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 1200, ..., and so on. Note how the 1st, the 3rd, the 7th and 23rd terms of this list are 1, 11, 111, and 1111.
In this number system the i-th digit from right (the least significant digit = digit_0) may contain integers in range 0..A000010(i+3)-1, and the value of the number is obtained as sum_{i=0..} digit_i * A001088(i+2).

Crossrefs

One less than A231721.
Cf. A000010 (Euler's totient function phi), A001088 (its partial products, "phitorials"), A231716, A033312.

Programs

  • Maple
    with(numtheory): A231722:=n->add(product(phi(k), k=1..i), i=2..n): seq(A231722(n), n=1..20); # Wesley Ivan Hurt, Aug 09 2014
  • Mathematica
    Table[Sum[Product[EulerPhi[k], {k, i}], {i, 2, n}], {n, 20}] (* Wesley Ivan Hurt, Aug 09 2014 *)
  • PARI
    a(n) = sum(i=2, n, prod(k=1, i, eulerphi(k))); \\ Michel Marcus, Aug 09 2014
  • Scheme
    (define (A231722 n) (- (A231721 n) 1))
    

Formula

a(n) = A231721(n)-1. [The terms are one less than the partial sums of "phitorials", A001088, cumulatively summed from their first term]

A319688 Sum of digits when n is represented in phitorial (A001088) base.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 02 2018

Keywords

Examples

			For n = 9, its phitorial representation is "102" as 9 = 1*A001088(2) + 0*A001088(3) + 2*A001088(4) = 1*1 + 0*2 + 2*4. Thus a(9) = 1+0+2 = 3.
For n = 577, its phitorial representation is "300001" as 577 = 1*A001088(2) + 3*A001088(7) = 1*1 + 3*192, thus a(577) = 4.
		

Crossrefs

Cf. A000010, A001088 (gives the positions of ones), A231721, A231722.
Cf. also A000120, A034968, A276150.

Programs

  • Mathematica
    With[{max = 7}, bases = EulerPhi[Range[max, 1, -1]]; nmax = Times @@ bases - 1; a[n_] := Plus @@ IntegerDigits[n, MixedRadix[bases]]; Array[a, nmax, 0]] (* Amiram Eldar, Jul 29 2023 *)
  • PARI
    A319688(n) = { my(s=0, i=3, d, b); while(n, b = eulerphi(i); d = (n%b); s += d; n = (n-d)/b; i++); (s); };

Formula

Starting from i=3, compute the remainder when n is divided by phi(i), and then continue iterating with n -> floor(n/phi(i)), and i -> i+1, until n is zero. a(n) is the sum of remainders encountered in process.
For all n >= 0, a(A231722(n)) = n.

A066986 Integers of the form (Product_{i=1..k} sigma(i))/(Product_{i=1..k} phi(i)) = A066780(k)/A001088(k).

Original entry on oeis.org

1, 3, 6, 21, 189, 252, 945, 361179, 1083537
Offset: 1

Views

Author

Benoit Cloitre, Jan 27 2002

Keywords

Comments

If next term exists, it will be too large to be included.
A066780(k)/A001088(k) is an integer for k = 1, 2, 3, 4, 6, 7, 8, 14, 15, ... Is there such a k greater than 10^5 ? - Jinyuan Wang, Apr 06 2020

Crossrefs

A002088 Sum of totient function: a(n) = Sum_{k=1..n} phi(k), cf. A000010.

Original entry on oeis.org

0, 1, 2, 4, 6, 10, 12, 18, 22, 28, 32, 42, 46, 58, 64, 72, 80, 96, 102, 120, 128, 140, 150, 172, 180, 200, 212, 230, 242, 270, 278, 308, 324, 344, 360, 384, 396, 432, 450, 474, 490, 530, 542, 584, 604, 628, 650, 696, 712, 754, 774, 806, 830, 882, 900, 940, 964
Offset: 0

Views

Author

Keywords

Comments

Number of elements in the set {(x,y): 1 <= x <= y <= n, 1=gcd(x,y)}. - Michael Somos, Jun 13 1999
Sum_{k=1..n} phi(k) gives the number of distinct arithmetic progressions which contain an infinite number of primes and whose difference does not exceed n. E.g., {1k+1}, {2k+1}, {3k+1, 3k+2}, {4k+1, 4k+3}, {5k+1, ..5k+4} means 10 sequences. - Labos Elemer, May 02 2001
The quotient A024916(n)/a(n) = SummatorySigma/SummatoryTotient as n increases seems to approach Pi^4/36 = zeta(2)^2 = A098198 ~2.705808084277845. - Labos Elemer, Sep 20 2004 (corrected by Peter Pein, Apr 28 2009)
Also the number of rationals p/q in (0,1] with denominators q<=n. - Franz Vrabec, Jan 29 2005
a(n) is the number of initial segments of Beatty sequences for real numbers > 1, cut off when the next term in the sequence would be >= n. For example, the sequence 1,2 is included for n=3 and n=4, but not for n >= 5 because the next term of the Beatty sequence must be 3 or 4. Problem suggested by David W. Wilson. - Franklin T. Adams-Watters, Oct 19 2006
Number of complex numbers satisfying any one of {x^1=1, x^2=1, x^3=1, x^4=1, x^5=1, ..., x^n=1}. - Paul Smith (math.idiot(AT)gmail.com), Mar 19 2007
a(n+2) equals the number of Sturmian words of length n which are 'special', prefix of two Sturmian words of length n+1. - Fred Lunnon, Sep 05 2010
For n > 1: A020652(a(n)) = 1 and A038567(a(n)) = n; for n > 0: A214803(a(n)) = 1. - Reinhard Zumkeller, Jul 29 2012
Also number of elements in the set {(x,y): 1 <= x + y <= n, x >= 0, y > 0, with x and y relatively prime integers}. Thus, the number of reduced rational numbers x/y with x nonnegative, y positive, and x + y <= n. (For n >= 1, 0 <= x/y <= n - 1, clearly including each integer in this interval.) - Rick L. Shepherd, Apr 08 2014
This function, the partial sums of phi = A000010, is sometimes denoted by (uppercase) Phi. - M. F. Hasler, Apr 18 2015
From Roger Ford, Jan 16 2016: (Start)
For n >= 1: a(n) is the number of perfect arched semi-meander solutions with n arches. To be perfect the number of arch groupings must equal the number of arches with a length of 1 in the current generation and every preceding generation.
Example: p is the number of arches with length 1 (/\), g is the number of arch groups (-), n is number of arches in the top half of a semi-meander solution
/\
/\ //\\
//\\-/\-///\\\- n=6 p=3 g=3 Each preceding arch configuration
/\ /\ is formed by attaching the arch
/\-//\\-//\\- n=5 p=3 g=3 end in the first position and the
/\ arch end in the last position.
//\\
///\\\-/\- n=4 p=2 g=2
/\
//\\-/\- n=3 p=2 g=2
/\-/\- n=2 p=2 g=2
/\- n=1 p=1 g=1. (End)
a(n) is the number of distinct lists of binary words of length n that are balanced (Sturmian). - Dan Rockwell, Will Wodrich, Aaliyah Fiala, and Bob Burton, May 30 2019
2013 IMO Problem 6 shows that a(n) is the number of ways to arrange the numbers 0, 1, ..., n on a circle such that for any numbers 0 <= a < b < c < d <= n, the chord joining a and d does not intersect with the chord intersecting b and c, with rotation counted as same. - Yifan Xie, Aug 26 2025

Examples

			G.f. = x + 2*x^2 + 4*x^3 + 6*x^4 + 10*x^5 + 12*x^6 + 18*x^7 + 22*x^8 + 28*x^9 + ...
		

References

  • A. Beiler, Recreations in the Theory of Numbers, Dover Publications, 1966, Chap. XVI.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 115-119.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 138.
  • M. N. Huxley, The Distribution of Prime Numbers, Oxford Univ. Press, 1972, p. 6.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section I.21.
  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 94, Problem 11.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 111.

Crossrefs

Programs

  • GAP
    List([1..60],n->Sum([1..n],i->Phi(i))); # Muniru A Asiru, Jul 31 2018
    
  • Haskell
    a002088 n = a002088_list !! n
    a002088_list = scanl (+) 0 a000010_list -- Reinhard Zumkeller, Jul 29 2012
    
  • Magma
    [&+[EulerPhi(i): i in [1..n]]: n in [1..60]]; // Vincenzo Librandi, Aug 01 2018
    
  • Maple
    with(numtheory): A002088:=n->add(phi(i),i=1..n): seq(A002088(n), n=0..70);
  • Mathematica
    Table[Plus @@ EulerPhi[Range[n]], {n, 0, 57}] (* Alonso del Arte, May 30 2006 *)
    Accumulate[EulerPhi[Range[0,60]]] (* Harvey P. Dale, Aug 27 2011 *)
  • PARI
    a(n)=sum(k=1,n,eulerphi(k)) \\ Charles R Greathouse IV, Jun 16 2011
    
  • PARI
    a(n)=my(s=1); forsquarefree(k=1,n,s+=(n\k[1])^2*moebius(k)); s/2 \\ Charles R Greathouse IV, Oct 15 2021
    
  • PARI
    first(n)=my(v=vector(n),s); forfactored(k=1,n, v[k[1]]=s+=eulerphi(k)); v \\ Charles R Greathouse IV, Oct 15 2021
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A002088(n): # based on second formula in A018805
        if n == 0:
            return 0
        c, j = 0, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*(2*A002088(k1)-1)
            j, k1 = j2, n//j2
        return (n*(n-1)-c+j)//2 # Chai Wah Wu, Mar 24 2021
  • Sage
    [sum(euler_phi(k) for k in (1..n)) for n in (0..60)] # G. C. Greubel, Nov 25 2018
    

Formula

a(n) = (3*n^2)/(Pi^2) + O(n log n).
More precisely, a(n) = (3/Pi^2)*n^2 + O(n*(log(n))^(2/3)*(log(log(n)))^(4/3)), (A. Walfisz 1963). - Benoit Cloitre, Feb 02 2003
a(n) = (1/2)*Sum_{k>=1} mu(k)*floor(n/k)*floor(1+n/k). - Benoit Cloitre, Apr 11 2003
a(n) = A000217(n) - A063985(n) = A018805(n) - A015614(n). - Reinhard Zumkeller, Jan 21 2013
A slightly simpler version of Cloitre's formula is a(n) = 1/2 + Sum_{k=1..oo} floor(n/k)^2*mu(k)/2. - Bill Gosper, Jul 25 2020
The quotient A024916(n)/a(n) = SummatorySigma/SummatoryTotient as n increases seems to approach (Pi^4)/36 = Zeta(2)^2 = 2.705808084277845. See also A067282. - Labos Elemer, Sep 21 2004
A024916(n)/a(n) = zeta(2)^2 + O(log(n)/n). This follows from asymptotic formulas for the sequences. - Franklin T. Adams-Watters, Oct 19 2006
Row sums of triangle A134542. - Gary W. Adamson, Oct 31 2007
G.f.: (Sum_{n>=1} mu(n)*x^n/(1-x^n)^2)/(1-x), where mu(n) = A008683(n). - Mamuka Jibladze, Apr 06 2015
a(n) = A005728(n) - 1, for n >= 0. - Wolfdieter Lang, Nov 22 2016
a(n) = (Sum_{k=1..floor(sqrt(n))} k*(k+1) * (M(floor(n/k)) - M(floor(n/(k+1)))) + Sum_{k=1..floor(n/(1+floor(sqrt(n))))} mu(k) * floor(n/k) * floor(1+n/k))/2, where M(k) is the Mertens function (A002321) and mu(k) is the Moebius function (A008683). - Daniel Suteu, Nov 23 2018
a(n) = A015614(n)+1. - R. J. Mathar, Apr 26 2023
a(n) = A000217(n) - Sum{k=2..n} a(floor(n/k)). From summing over Id = 1 (Dirichlet convolution) phi. - Jason Xu, Jul 31 2024
a(n) = Sum_{k=1..n} k*A002321(floor(n/k)). - Ridouane Oudra, Jul 03 2025

Extensions

Additional comments from Len Smiley

A003989 Triangle T from the array A(x, y) = gcd(x,y), for x >= 1, y >= 1, read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

For m < n, the maximal number of nonattacking queens that can be placed on the n by m rectangular toroidal chessboard is gcd(m,n), except in the case m=3, n=6.
The determinant of the matrix of the first n rows and columns is A001088(n). [Smith, Mansion] - Michael Somos, Jun 25 2012
Imagine a torus having regular polygonal cross-section of m sides. Now, break the torus and twist the free ends, preserving rotational symmetry, then reattach the ends. Let n be the number of faces passed in twisting the torus before reattaching it. For example, if n = m, then the torus has exactly one full twist. Do this for arbitrary m and n (m > 1, n > 0). Now, count the independent, closed paths on the surface of the resulting torus, where a path is "closed" if and only if it returns to its starting point after a finite number of times around the surface of the torus. Conjecture: this number is always gcd(m,n). NOTE: This figure constitutes a group with m and n the binary arguments and gcd(m,n) the resulting value. Twisting in the reverse direction is the inverse operation, and breaking & reattaching in place is the identity operation. - Jason Richardson-White, May 06 2013
Regarded as a triangle, table of gcd(n - k +1, k) for 1 <= k <= n. - Franklin T. Adams-Watters, Oct 09 2014
The n-th row of the triangle is 1,...,1, if and only if, n + 1 is prime. - Alexandra Hercilia Pereira Silva, Oct 03 2020

Examples

			The array A begins:
  [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
  [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]
  [1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1]
  [1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4]
  [1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1]
  [1, 2, 3, 2, 1, 6, 1, 2, 3, 2, 1, 6, 1, 2, 3, 2]
  [1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1]
  [1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8]
  [1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1]
  [1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2]
  [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1]
  [1, 2, 3, 4, 1, 6, 1, 4, 3, 2, 1, 12, 1, 2, 3, 4]
  ...
The triangle T begins:
  n\k 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
  1:  1
  2:  1  1
  3:  1  2  1
  4:  1  1  1  1
  5:  1  2  3  2  1
  6:  1  1  1  1  1  1
  7:  1  2  1  4  1  2  1
  8:  1  1  3  1  1  3  1  1
  9:  1  2  1  2  5  2  1  2  1
 10:  1  1  1  1  1  1  1  1  1  1
 11:  1  2  3  4  1  6  1  4  3  2  1
 12:  1  1  1  1  1  1  1  1  1  1  1  1
 13:  1  2  1  2  1  2  7  2  1  2  1  2  1
 14:  1  1  3  1  5  3  1  1  3  5  1  3  1  1
 15:  1  2  1  4  1  2  1  8  1  2  1  4  1  2  1
 ...  - _Wolfdieter Lang_, May 12 2018
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, 2nd ed., 1994, ch. 4.
  • D. E. Knuth, The Art of Computer Programming, Addison-Wesley, section 4.5.2.

Crossrefs

Rows, columns and diagonals: A089128, A109007, A109008, A109009, A109010, A109011, A109012, A109013, A109014, A109015.
A109004 is (0, 0) based.
Cf. also A091255 for GF(2)[X] polynomial analog.
A(x, y) = A075174(A004198(A075173(x), A075173(y))) = A075176(A004198(A075175(x), A075175(y))).
Antidiagonal sums are in A006579.

Programs

  • GAP
    Flat(List([1..15],n->List([1..n],k->Gcd(n-k+1,k)))); # Muniru A Asiru, Aug 26 2018
  • Maple
    a:=(n,k)->gcd(n-k+1,k): seq(seq(a(n,k),k=1..n),n=1..15); # Muniru A Asiru, Aug 26 2018
  • Mathematica
    Table[ GCD[x - y + 1, y], {x, 1, 15}, {y, 1, x}] // Flatten (* Jean-François Alcover, Dec 12 2012 *)
  • PARI
    {A(n, m) = gcd(n, m)}; /* Michael Somos, Jun 25 2012 */
    

Formula

Multiplicative in both parameters with a(p^e, m) = gcd(p^e, m). - David W. Wilson, Jun 12 2005
T(n, k) = A(n - k + 1, k) = gcd(n - k + 1, k), n >= 1, k = 1..n. See a comment above and the Mathematica program. - Wolfdieter Lang, May 12 2018
Dirichlet generating function: Sum_{n>=1} Sum_{k>=1} gcd(n, k)/n^s/k^c = zeta(s)*zeta(c)*zeta(s + c - 1)/zeta(s + c). - Mats Granvik, Feb 13 2021
The LU decomposition of this square array = A051731 * transpose(A054522) (see Johnson (2003) or Chamberland (2013), p. 1673). - Peter Bala, Oct 15 2023

A066843 a(n) = Product_{k=1..n} d(k); d(k) = A000005(k) is the number of positive divisors of k.

Original entry on oeis.org

1, 1, 2, 4, 12, 24, 96, 192, 768, 2304, 9216, 18432, 110592, 221184, 884736, 3538944, 17694720, 35389440, 212336640, 424673280, 2548039680, 10192158720, 40768634880, 81537269760, 652298158080, 1956894474240, 7827577896960, 31310311587840, 187861869527040
Offset: 0

Views

Author

Leroy Quet, Jan 20 2002

Keywords

Comments

a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = d_3(gcd(i,j)) for 1 <= i,j <= n, where d_3(n) is A007425. - Enrique Pérez Herrero, Aug 12 2011
a(n) is the number of integer sequences of length n where a(m) divides m for every term. - Franklin T. Adams-Watters, Oct 29 2017

Crossrefs

Programs

  • Maple
    with(numtheory):seq(mul(tau(k),k=1..n), n=0..26); # Zerinvary Lajos, Jan 11 2009
    with(numtheory):a[0]:=1: for n from 2 to 26 do a[n]:=a[n-1]*tau(n) od: seq(a[n], n=0..26); # Zerinvary Lajos, Mar 21 2009
  • Mathematica
    A066843[n_] := Product[DivisorSigma[0,i], {i,1,n}]; Array[A066843,20] (* Enrique Pérez Herrero, Aug 12 2011 *)
    FoldList[Times, Array[DivisorSigma[0, #] &, 27]] (* Michael De Vlieger, Nov 01 2017 *)
  • PARI
    { p=1; for (n=1, 200, p*=length(divisors(n)); write("b066843.txt", n, " ", p) ) } \\ Harry J. Smith, Apr 01 2010

Formula

a(n) = Product_{p=primes<=n} Product_{1<=k<=log(n)/log(p)} (1 +1/k)^floor(n/p^k). - Leroy Quet, Mar 20 2007
a(n) = Product_{k=1..n} Product_{p prime<=n} (v_p(k) + 1), where v_p(k) is the exponent of highest power of p dividing k. - Ridouane Oudra, Apr 15 2024

Extensions

a(0)=1 prepended by Alois P. Heinz, Jul 19 2023

A124175 Decimal expansion of Product_{primes p} ((p-1)/p)^(1/p).

Original entry on oeis.org

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

Views

Author

David W. Wilson, Dec 05 2006

Keywords

Comments

This might be interpreted as the expected value of phi(n)/n for very large n.

Examples

			0.5598656169323734857237622442234167172576663702129060395542339339\
352031717975915936276540950630665470795373094197373037280781542375...
		

Crossrefs

Programs

  • Mathematica
    digits = 100; s = Exp[-NSum[PrimeZetaP[h+1]/h, {h, 1, Infinity}, WorkingPrecision -> digits+5, NSumTerms -> 3 digits]]; RealDigits[s, 10, digits][[1]] (* Jean-François Alcover, Dec 07 2015, after Robert Gerbicz *)
  • PARI
    default(realprecision,256);(f(k)=return(sum(n=1,512,moebius(n)/n*log(zeta(k*n)))));exp(sum(h=1,512,-1/h*f(h+1))) /* Robert Gerbicz */
    
  • PARI
    exp(-suminf(m=2,log(zeta(m))*sumdiv(m,k,if(kMartin Fuller */

Formula

exp(-suminf(h=1, primezeta(h+1)/h)). - Robert Gerbicz
[Notation not clear. Is this perhaps exp(-Sum_{h=1..oo} primezeta(h+1)/h) ? - N. J. A. Sloane, Oct 08 2017]
Equals exp(1) * lim_{n->infinity} (A001088(n)/n!)^(1/n). - Vaclav Kotesovec, Feb 05 2016

Extensions

Robert Gerbicz computed this to 130 decimal places.

A175836 a(n) = Product_{i=1..n} psi(i) where psi is the Dedekind psi function (A001615).

Original entry on oeis.org

1, 3, 12, 72, 432, 5184, 41472, 497664, 5971968, 107495424, 1289945088, 30958682112, 433421549568, 10402117189632, 249650812551168, 5991619501228032, 107849151022104576, 3882569436795764736
Offset: 1

Views

Author

Enrique Pérez Herrero, Sep 18 2010

Keywords

Comments

a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = A060648(gcd(i,j)) for 1 <= i,j <= n, note that A060648 is the Inverse Möbius transform of A001615. - Enrique Pérez Herrero, Aug 12 2011

Crossrefs

Programs

  • Haskell
    a175836 n = a175836_list !! (n-1)
    a175836_list = scanl1 (*) a001615_list
    -- Reinhard Zumkeller, Mar 01 2014
  • Maple
    A175836 := proc(n) option remember; local p; `if`(n<2,1, n*mul(1+1/p,p=factorset(n))*A175836(n-1)) end: # Peter Luschny, Feb 28 2014
  • Mathematica
    JordanTotient[n_,k_:1]:=DivisorSum[n,#^k*MoebiusMu[n/# ]&]/;(n>0)&&IntegerQ[n];
    DedekindPsi[n_]:=JordanTotient[n,2]/EulerPhi[n];
    A175836[n_]:=Times@@DedekindPsi/@Range[n]
  • PARI
    a=direuler(p=2, 100, (1+X)/(1-p*X));for(i=2,#a,a[i]*=a[i-1]);a
    \\ Charles R Greathouse IV, Jul 29 2011
    

Formula

a(n) = A059381(n)/A001088(n).
Showing 1-10 of 33 results. Next