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

A243808 Position within the triangular array A226314(n)/A054531(n) of rationals x/y such that x < y, gcd(x,y)=1 and x+y odd.

Original entry on oeis.org

2, 5, 7, 9, 12, 14, 16, 20, 23, 25, 27, 29, 31, 33, 35, 38, 40, 44, 46, 48, 52, 54, 57, 59, 61, 63, 65, 67, 71, 73, 77, 80, 82, 84, 86, 88, 90, 92, 94, 96, 100, 102, 104, 107, 109, 113, 119, 121, 123, 125, 127, 129, 131, 133, 135, 138, 140
Offset: 1

Views

Author

Frank M Jackson, Jun 13 2014

Keywords

Comments

If {x,y} are used as the generators of primitive Pythagorean triples (a,b,c) where a=y^2-x^2, b=2x*y and c=x^2+y^2, then the above sequence enumerates all PPT's as a 1-to-1 mapping into the integers.

Examples

			.  j       {A226314(n),A054531(n)}, 1<=i<=j<=12 and n=i+j(j-1)/2
.  --   ------------------------------------------------------------
.   1:  1,1
.   2:  1,2 2,1
.   3:  1,3 2,3 3,1
.   4:  1,4 3,2 3,4 4,1
.   5:  1,5 2,5 3,5 4,5 5,1
.   6:  1,6 4,3 5,2 5,3 5,6 6,1
.   7:  1,7 2,7 3,7 4,7 5,7 6,7 7,1
.   8:  1,8 5,4 3,8 7,2 5,8 7,4 7,8 8,1
.   9:  1,9 2,9 7,3 4,9 5,9 8,3 7,9 8,9 9,1
.  10:  1,10 6,5 3,10 7,5 9,2 8,5 7,10 9,5 9,10 10,1
.  11:  1,11 2,11 3,11 4,11 5,11 6,11 7,11 8,11 9,11 10,11 11,1
.  12:  1,12 7,6 9,4 10,3 5,12 11,2 7,12 11,3 11,4 11,6 11,12 12,1 .
a(4)=9, as the 4th PPT is generated from the 9th term of the triangular array at index (3,4). This gives (x,y) as (3,4) and it generates the PPT (7,24,25). Conversely the PPT (7,24,25) gives (x,y) = (sqrt((25-7)/2), sqrt((25+7)/2)) = (3,4). It is the 9th term of the triangular array and the 4th term of the enumerating sequence.
		

Crossrefs

Programs

  • Mathematica
    ratmap[p_, q_] := (q(q-1)/2+p); mm=20; lst={}; Do[If[OddQ[m+n]&&GCD[m, n]==1, AppendTo[lst, n/m]], {m, 1, mm}, {n, 1, m}]; Sort@Table[ratmap[Numerator[lst[[k]]], Denominator[lst[[k]]]], {k, 1, Length[lst]}]

A226555 Numerators of row sums of the triangular enumeration of rational numbers A226314(n,k) / A054531(n,k), 1 <= k <= n.

Original entry on oeis.org

1, 5, 4, 13, 7, 25, 10, 33, 17, 45, 16, 69, 19, 65, 38, 81, 25, 109, 28, 125, 55, 105, 34, 177, 53, 125, 68, 181, 43, 241, 46, 193, 89, 165, 100, 301, 55, 185, 106, 321, 61, 349, 64, 293, 167, 225, 70, 433, 109, 341, 140, 349, 79, 433, 162, 465, 157, 285, 88
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2013

Keywords

Examples

			.   n         A226314(n,k) / A054531(n,k), 1<=k<=n<=12           row sums
.  --   -------------------------------------------------------- --------
.   1:  1                                                           1
.   2:  1/2 2                                                       5/2
.   3:  1/3 2/3 3                                                   4
.   4:  1/4 3/2 3/4 4                                              13/2
.   5:  1/5 2/5 3/5 4/5 5                                           7
.   6:  1/6 4/3 5/2 5/3 5/6 6                                      25/2
.   7:  1/7 2/7 3/7 4/7 5/7 6/7 7                                  10
.   8:  1/8 5/4 3/8 7/2 5/8 7/4 7/8 8                              33/2
.   9:  1/9 2/9 7/3 4/9 5/9 8/3 7/9 8/9 9                          17
.  10:  1/10 6/5 3/10 7/5 9/2 8/5 7/10 9/5 9/10 10                 45/2
.  11:  1/11 2/11 3/11 4/11 5/11 6/11 7/11 8/11 9/11 10/11 11      16
.  12:  1/12 7/6 9/4 10/3 5/12 11/2 7/12 11/3 11/4 11/6 11/12 12   69/2 .
		

Crossrefs

Cf. A040001 (denominators).

Programs

  • Haskell
    import Data.Ratio ((%), numerator); import Data.Function (on)
    a226555 n = numerator $ sum $
                zipWith ((%) `on` toInteger) (a226314_row n) (a054531_row n)

A278635 Least x such that ax-1 and bx-1 are simultaneously prime and n (sequence index) is the position of rational a/b (lowest form) in the triangular array A226314(n)/A054531(n).

Original entry on oeis.org

1, 3, 3, 4, 2, 4, 3, 2, 1, 3, 4, 4, 4, 6, 4, 3, 1, 4, 4, 4, 3, 6, 2, 2, 2, 6, 2, 6, 3, 6, 1, 2, 4, 2, 6, 3, 6, 2, 2, 2, 6, 1, 2, 6, 6, 3, 4, 2, 6, 2, 4, 2, 6, 2, 3, 4, 4, 4, 12, 4, 4, 12, 4, 10, 18, 4, 4, 2, 2, 2, 4, 4, 2, 4, 12, 4, 4, 4, 8, 24, 8, 8, 18, 8, 14, 24, 8, 8, 18
Offset: 1

Views

Author

Frank M Jackson and Michael B Rees, Nov 24 2016

Keywords

Comments

Rationals a/b (lowest form) can be mapped uniquely into a triangular array A226314(n)/A054531(n).
By Schinzel's Hypothesis H the functions f_1=ax-1 and f_2=bx-1 have infinite values of x such that f_1 and f_2 are simultaneously prime. Hence a/b can be expressed using two primes p and q as a/b=(p+1)/(q+1). This sequence determines the least x for generating p=f_1 and q=f_2 with the sequence index n selecting a/b from the triangular array A226314(n)/A054531(n).

Examples

			a(7)=3 because A226314(7)/A054531(7)=1/4 and with x=3 we have p=f_1=x-1=2 and q=f_2=4x-1=11. Therefore (p+1)/(q+1)=3/12=1/4.
		

Crossrefs

Programs

  • Mathematica
    func[{i_, j_}] := {j(j-1)/2+i->{j+(i-j)/GCD[i, j], j/GCD[i, j]}}; getx[{a_, b_}] := Module[{f1, f2, x}, If[a==b, 1, (f1=a*x-1; f2=b*x-1; x = 1; While[(!PrimeQ[f1]||!PrimeQ[f2])&&x<10^5, x++]; If[x==10^5, Abort[], x])]]; assoc=Association@Flatten[Table[func[{a, b}], {b, 1000}, {a, b}], 1]; Table[getx[assoc[n]], {n, 1, 100}]

A242061 Position within the triangular array A226314(n)/A054531(n) of rationals x/y such that x < y, gcd(x,y)=1, x+y odd and for the least y, {x, y} are integers such that x*y(y^2-x^2)/A006991(n) is a perfect square.

Original entry on oeis.org

14, 2, 129, 52686, 29, 7, 9, 1274, 296125969, 12012350, 5, 1279281, 44, 302583265614, 780914, 90, 316, 2605, 106023820090609, 1754402265205275806, 7794, 72957466300254, 768323201, 40, 18505, 23, 6478321, 3966329, 326, 14280500082452241
Offset: 1

Views

Author

Frank M Jackson, Aug 13 2014

Keywords

Comments

The triangle array A226314(n)/A054531(n) that enumerates all positive rationals x/y can be generalized to enumerate all ordered pairs {x, y} where x and y are natural numbers. For example, A243808 uses a subset of this triangular array to enumerate all primitive Pythagorean triples (PPT).
A006991(n) is the sequence of primitive congruent numbers and by definition there exists a PPT whose area is equal to k^2*A006991(n) for some integer k. a(n) is an enumeration of these PPT's and is a measure of the number of Pythagorean triangles that have to be searched to find a PPT with the least hypotenuse that has an area equal to k^2*A006991(n). If {x, y} are the generators of a PPT (a, b, c) where a = y^2-x^2, b = 2x*y, c=y^2+x^2 then its area = x*y(y^2-x^2). The Mathematica program limits searches to the first 12.5 million generated PPT's. All other results have been obtained from tables cataloged by Hisanori Mishima (see Links).

Examples

			.  j       {A226314(n),A054531(n)}, 1<=i<=j<=12 and n=i+j(j-1)/2
.  --   --------------------------------------------------------
.   1:  1,1
.   2:  1,2 2,1
.   3:  1,3 2,3 3,1
.   4:  1,4 3,2 3,4 4,1
.   5:  1,5 2,5 3,5 4,5 5,1
.   6:  1,6 4,3 5,2 5,3 5,6 6,1
.   7:  1,7 2,7 3,7 4,7 5,7 6,7 7,1
.   8:  1,8 5,4 3,8 7,2 5,8 7,4 7,8 8,1
.   9:  1,9 2,9 7,3 4,9 5,9 8,3 7,9 8,9 9,1
.  10:  1,10 6,5 3,10 7,5 9,2 8,5 7,10 9,5 9,10 10,1
.  11:  1,11 2,11 3,11 4,11 5,11 6,11 7,11 8,11 9,11 10,11 11,1
.  12:  1,12 7,6 9,4 10,3 5,12 11,2 7,12 11,3 11,4 11,6 11,12 12,1 .
a(13)=44 and A006991(13)=34 so 34 is the 13th congruent number. a(13) gives the 44th term of the triangular array at index (8, 9). This gives (x, y) as (8, 9), it generates the PPT (17, 144, 145) and has an area 6^2*34 = 1224.
		

Crossrefs

Programs

  • Mathematica
    lst1={5, 6, 7, 13, 14, 15, 21, 22, 23, 29, 30, 31, 34, 37, 38, 39, 41, 46, 47, 53, 55, 61, 62, 65, 69, 70, 71, 77, 78, 79, 85, 86, 87, 93, 94, 95, 101}; getpos[n0_] := (lst=0; Do[If[IntegerQ@Sqrt[m*n(m-n)(m+n)/n0]&&OddQ[m+n] && GCD[m, n]==1, (lst=m(m-1)/2+n; Break[])], {m, 2, 5000}, {n, 1, m-1}]; lst); SetAttributes[getpos, Listable]; getpos[lst1]

A279369 A mapping of rationals a/b (lowest form) to prime rationals p/q such that a/b = (p+1)/(q+1), where n (the sequence index) selects the rationals a/b from the triangle array A226314(n)/A054531(n) and a(n) selects the prime rationals p/q from the same array.

Original entry on oeis.org

1, 12, 18, 58, 13, 74, 57, 19, 5, 72, 174, 178, 182, 429, 217, 138, 8, 225, 247, 272, 162, 825, 81, 83, 85, 849, 89, 999, 255, 1047, 23, 110, 484, 103, 1122, 288, 1383, 139, 114, 143, 1407, 32, 149, 1425, 1518, 408, 711, 176, 1677, 165, 727, 184, 1701, 188, 450, 906, 910, 914
Offset: 1

Views

Author

Frank M Jackson and Michael B Rees, Dec 10 2016

Keywords

Comments

Rationals a/b (lowest form) can be mapped 1-to-1 to a positive integer n where a/b is the n-th term of the triangular array A226314(n)/A054531(n). Consider two function of x, f_1 = ax-1 and f_2 = bx-1. Then by Schinzel's Hypothesis H there are infinite values of x such that f_1 and f_2 are simultaneously prime allowing a/b to be expressed using two primes p and q as a/b=(p+1)/(q+1).
By choosing the least x for generating p=f_1 and q=f_2 (see A278635) it is possible to find a unique prime rational p/q that maps to rational a/b. If n is the sequence index that selects the rational a/b from the triangular array A226314(n)/A054531(n), then a(n) selects the prime rationals p/q from the same array.

Examples

			a(7)=57 because A226314(7)/A054531(7)=1/4 and with least x=3 we have p=f_1=x-1=2 and q=f_2=4x-1=11. Therefore (p+1)/(q+1)=3/12=1/4. Also A226314(57)/A054531(57)=p/q=2/11.
		

Crossrefs

Programs

  • Mathematica
    func[{i_, j_}] := {j(j-1)/2+i->{j+(i-j)/GCD[i, j], j/GCD[i, j]}}; rfunc[{i_, j_}] := {{j+(i-j)/GCD[i, j], j/GCD[i, j]}->j(j-1)/2+i}; getx[{a_, b_}] := Module[{f1, f2, x}, If[a==b, {1, 1}, (f1=a*x-1; f2=b*x-1; x=1; While[(!PrimeQ[f1]||!PrimeQ[f2])&&x<10^5, x++]; If[x==10^5, Abort[], {f1, f2}])]]; assoc=Association@Flatten[Table[func[{a, b}], {b, 1000}, {a, b}], 1]; rassoc=Association@Flatten[Table[rfunc[{a, b}], {b, 1000}, {a, b}], 1]; Table[rassoc[getx[assoc[n]]], {n, 1, 100}]

A057660 a(n) = Sum_{k=1..n} n/gcd(n,k).

Original entry on oeis.org

1, 3, 7, 11, 21, 21, 43, 43, 61, 63, 111, 77, 157, 129, 147, 171, 273, 183, 343, 231, 301, 333, 507, 301, 521, 471, 547, 473, 813, 441, 931, 683, 777, 819, 903, 671, 1333, 1029, 1099, 903, 1641, 903, 1807, 1221, 1281, 1521, 2163, 1197, 2101, 1563, 1911, 1727
Offset: 1

Views

Author

Henry Gould, Oct 15 2000

Keywords

Comments

Also sum of the orders of the elements in a cyclic group with n elements, i.e., row sums of A054531. - Avi Peretz (njk(AT)netvision.net.il), Mar 31 2001
Also inverse Moebius transform of EulerPhi(n^2), A002618.
Sequence is multiplicative with a(p^e) = (p^(2*e+1)+1)/(p+1). Example: a(10) = a(2)*a(5) = 3*21 = 63.
a(n) is the number of pairs (a, b) such that the equation ax = b is solvable in the ring (Zn, +, x). See the Mathematical Reflections link. - Michel Marcus, Jan 07 2017
From Jake Duzyk, Jun 06 2023: (Start)
These are the "contraharmonic means" of the improper divisors of square integers (inclusive of 1 and the square integer itself).
Permitting "Contraharmonic Divisor Numbers" to be defined analogously to Øystein Ore's Harmonic Divisor Numbers, the only numbers for which there exists an integer contraharmonic mean of the divisors are the square numbers, and a(n) is the n-th integer contraharmonic mean, expressible also as the sum of squares of divisors of n^2 divided by the sum of divisors of n^2. That is, a(n) = sigma_2(n^2)/sigma(n^2).
(a(n) = A001157(k)/A000203(k) where k is the n-th number such that A001157(k)/A000203(k) is an integer, i.e., k = n^2.)
This sequence is an analog of A001600 (Harmonic means of divisors of harmonic numbers) and A102187 (Arithmetic means of divisors of arithmetic numbers). (End)

References

  • David M. Burton, Elementary Number Theory, Allyn and Bacon Inc., Boston MA, 1976, p. 152.
  • H. W. Gould and Temba Shonhiwa, Functions of GCD's and LCM's, Indian J. Math. (Allahabad), Vol. 39, No. 1 (1997), pp. 11-35.
  • H. W. Gould and Temba Shonhiwa, A generalization of Cesaro's function and other results, Indian J. Math. (Allahabad), Vol. 39, No. 2 (1997), pp. 183-194.

Crossrefs

Programs

  • Haskell
    a057660 n = sum $ map (div n) $ a050873_row n
    -- Reinhard Zumkeller, Nov 25 2013
    
  • Mathematica
    Table[ DivisorSigma[ 2, n^2 ] / DivisorSigma[ 1, n^2 ], {n, 1, 128} ]
    Table[Total[Denominator[Range[n]/n]], {n, 55}] (* Alonso del Arte, Oct 07 2011 *)
    f[p_, e_] := (p^(2*e + 1) + 1)/(p + 1); a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Nov 21 2020 *)
  • PARI
    a(n)=if(n<1,0,sumdiv(n,d,d*eulerphi(d)))
    
  • PARI
    a(n)=sumdivmult(n,d, eulerphi(d)*d) \\ Charles R Greathouse IV, Sep 09 2014
    
  • Python
    from math import gcd
    def A057660(n): return sum(n//gcd(n,k) for k in range(1,n+1)) # Chai Wah Wu, Aug 24 2023
    
  • Python
    from math import prod
    from sympy import factorint
    def A057660(n): return prod((p**((e<<1)+1)+1)//(p+1) for p,e in factorint(n).items()) # Chai Wah Wu, Aug 05 2024

Formula

a(n) = Sum_{d|n} d*A000010(d) = Sum_{d|n} d*A054522(n,d), sum of d times phi(d) for all divisors d of n, where phi is Euler's phi function.
a(n) = sigma_2(n^2)/sigma_1(n^2) = A001157(A000290(n))/A000203(A000290(n)) = A001157(A000290(n))/A065764(n). - Labos Elemer, Nov 21 2001
a(n) = Sum_{d|n} A000010(d^2). - Enrique Pérez Herrero, Jul 12 2010
a(n) <= (n-1)*n + 1, with equality if and only if n is noncomposite. - Daniel Forgues, Apr 30 2013
G.f.: Sum_{n >= 1} n*phi(n)*x^n/(1 - x^n) = x + 3*x^2 + 7*x^3 + 11*x^4 + .... Dirichlet g.f.: sum {n >= 1} a(n)/n^s = zeta(s)*zeta(s-2)/zeta(s-1) for Re s > 3. Cf. A078747 and A176797. - Peter Bala, Dec 30 2013
a(n) = Sum_{i=1..n} numerator(n/i). - Wesley Ivan Hurt, Feb 26 2017
L.g.f.: -log(Product_{k>=1} (1 - x^k)^phi(k)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 21 2018
From Richard L. Ollerton, May 10 2021: (Start)
a(n) = Sum_{k=1..n} lcm(n,k)/k.
a(n) = Sum_{k=1..n} gcd(n,k)*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)
From Vaclav Kotesovec, Jun 13 2021: (Start)
Sum_{k=1..n} a(k)/k ~ 3*zeta(3)*n^2/Pi^2.
Sum_{k=1..n} k^2/a(k) ~ A345294 * n.
Sum_{k=1..n} k*A000010(k)/a(k) ~ A345295 * n. (End)
Sum_{k=1..n} a(k) ~ 2*zeta(3)*n^3/Pi^2. - Vaclav Kotesovec, Jun 10 2023

Extensions

More terms from James Sellers, Oct 16 2000

A054521 Triangle read by rows: T(n,k) = 1 if gcd(n, k) = 1, T(n,k) = 0 otherwise (n >= 1, 1 <= k <= n).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0
Offset: 1

Views

Author

N. J. A. Sloane, Apr 09 2000

Keywords

Comments

Row sums = phi(n), A000010: (1, 1, 2, 2, 4, 2, 6, ...). - Gary W. Adamson, May 20 2007
Characteristic function of A169581: a(A169581(n)) = 1; a(A169582(n)) = 0. - Reinhard Zumkeller, Dec 02 2009
The function T(n,k) = T(k,n) is defined for k > n but only the values for 1 <= k <= n as a triangular array are listed here.
T(n,k) = |K(n-k|k)| where K(i|j) is the Kronecker symbol. - Peter Luschny, Aug 05 2012
Twice the sum over the antidiagonals, starting with entry T(n-1,1), for n >= 3, is the same as the row n sum (i.e., phi(n): 2*Sum_{k=1..floor(n/2)} T(n-k,k) = phi(n), n >= 3). - Wolfdieter Lang, Apr 26 2013
The number of zeros in the n-th row of the triangle is cototient(n) = A051953(n). - Omar E. Pol, Apr 21 2017
This triangle is the j = 1 sub-triangle of A349221(n,k) = Sum_{j>=1} [k|binomial(n-1,k-1) AND gcd(n,k) = j], n >= 1, 1 <= k <= n, where [] is the Iverson bracket. - Richard L. Ollerton, Dec 14 2021

Examples

			The triangle T(n,k) begins:
  n\k  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
   1:  1
   2:  1  0
   3:  1  1  0
   4:  1  0  1  0
   5:  1  1  1  1  0
   6:  1  0  0  0  1  0
   7:  1  1  1  1  1  1  0
   8:  1  0  1  0  1  0  1  0
   9:  1  1  0  1  1  0  1  1  0
  10:  1  0  1  0  0  0  1  0  1  0
  11:  1  1  1  1  1  1  1  1  1  1  0
  12:  1  0  0  0  1  0  1  0  0  0  1  0
  13:  1  1  1  1  1  1  1  1  1  1  1  1  0
  14:  1  0  1  0  1  0  0  0  1  0  1  0  1  0
  15:  1  1  0  1  0  0  1  1  0  0  1  0  1  1  0
  ... (Reformatted by _Wolfdieter Lang_, Apr 26 2013)
Sums over antidiagonals: n = 3: 2*T(2,1) = 2 = T(3,1) + T(3,2) = phi(3). n = 4: 2*(T(3,1) + T(2,2)) = 2 = phi(4), etc. - _Wolfdieter Lang_, Apr 26 2013
		

Crossrefs

Programs

  • Haskell
    a054521 n k = a054521_tabl !! (n-1) !! (k-1)
    a054521_row n = a054521_tabl !! (n-1)
    a054521_tabl = map (map a063524) a050873_tabl
    a054521_list = concat a054521_tabl
    -- Reinhard Zumkeller, Sep 03 2015
  • Maple
    A054521_row := n -> seq(abs(numtheory[jacobi](n-k,k)),k=1..n);
    for n from 1 to 13 do A054521_row(n) od; # Peter Luschny, Aug 05 2012
  • Mathematica
    T[ n_, k_] := Boole[ n>0 && k>0 && GCD[ n, k] == 1] (* Michael Somos, Jul 17 2011 *)
    T[ n_, k_] := If[ n<1 || k<1, 0, If[ k>n, T[ k, n], If[ k==1, 1, If[ n>k, T[ k, Mod[ n, k, 1]], 0]]]] (* Michael Somos, Jul 17 2011 *)
  • PARI
    {T(n, k) = n>0 && k>0 && gcd(n, k)==1} /* Michael Somos, Jul 17 2011 */
    
  • Sage
    def A054521_row(n): return [abs(kronecker_symbol(n-k,k)) for k in (1..n)]
    for n in (1..13): print(A054521_row(n)) # Peter Luschny, Aug 05 2012
    

Formula

T(n,k) = A063524(A050873(n,k)). - Reinhard Zumkeller, Dec 02 2009, corrected Sep 03 2015
T(n,k) = A054431(n,k) = A054431(k,n). - R. J. Mathar, Jul 21 2016

A040001 1 followed by {1, 2} repeated.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Continued fraction for sqrt(3).
Also coefficient of the highest power of q in the expansion of the polynomial nu(n) defined by: nu(0)=1, nu(1)=b and for n>=2, nu(n)=b*nu(n-1)+lambda*(n-1)_q*nu(n-2) with (b,lambda)=(1,1), where (n)_q=(1+q+...+q^(n-1)) and q is a root of unity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002
nu(0)=1 nu(1)=1; nu(2)=2; nu(3)=3+q; nu(4)=5+3q+2q^2; nu(5)=8+7q+6q^2+4q^3+q^4; nu(6)=13+15q+16q^2+14q^3+11q^4+5q^5+2q^6.
From Jaroslav Krizek, May 28 2010: (Start)
a(n) = denominators of arithmetic means of the first n positive integers for n >= 1.
See A026741(n+1) or A145051(n) - denominators of arithmetic means of the first n positive integers. (End)
From R. J. Mathar, Feb 16 2011: (Start)
This is a prototype of multiplicative sequences defined by a(p^e)=1 for odd primes p, and a(2^e)=c with some constant c, here c=2. They have Dirichlet generating functions (1+(c-1)/2^s)*zeta(s).
Examples are A153284, A176040 (c=3), A040005 (c=4), A021070, A176260 (c=5), A040011, A176355 (c=6), A176415 (c=7), A040019, A021059 (c=8), A040029 (c=10), A040041 (c=12). (End)
a(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = A000325(k) for k = 0, 1, ..., n. - Michael Somos, May 12 2012
For n > 0: denominators of row sums of the triangular enumeration of rational numbers A226314(n,k) / A054531(n,k), 1 <= k <= n; see A226555 for numerators. - Reinhard Zumkeller, Jun 10 2013
From Jianing Song, Nov 01 2022: (Start)
For n > 0, a(n) is the minimal gap of distinct numbers coprime to n. Proof: denote the minimal gap by b(n). For odd n we have A058026(n) > 0, hence b(n) = 1. For even n, since 1 and -1 are both coprime to n we have b(n) <= 2, and that b(n) >= 2 is obvious.
The maximal gap is given by A048669. (End)

Examples

			1.732050807568877293527446341... = 1 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...))))
G.f. = 1 + x + 2*x^2 + x^3 + 2*x^4 + x^5 + 2*x^6 + x^7 + 2*x^8 + x^9 + ...
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.4 Powers and Roots, p. 144.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Cf. A000034, A002194, A133566, A083329 (binomial Transf).
Apart from a(0) the same as A134451.

Programs

  • Haskell
    a040001 0 = 1; a040001 n = 2 - mod n 2
    a040001_list = 1 : cycle [1, 2]  -- Reinhard Zumkeller, Apr 16 2015
  • Maple
    Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
  • Mathematica
    ContinuedFraction[Sqrt[3],300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *)
    PadRight[{1},120,{2,1}] (* Harvey P. Dale, Nov 26 2015 *)
  • PARI
    {a(n) = 2 - (n==0) - (n%2)} /* Michael Somos, Jun 11 2003 */
    
  • PARI
    { allocatemem(932245000); default(realprecision, 12000); x=contfrac(sqrt(3)); for (n=0, 20000, write("b040001.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 01 2009
    

Formula

Multiplicative with a(p^e) = 2 if p even; 1 if p odd. - David W. Wilson, Aug 01 2001
G.f.: (1 + x + x^2) / (1 - x^2). E.g.f.: (3*exp(x)-2*exp(0)+exp(-x))/2. - Paul Barry, Apr 27 2003
a(n) = (3-2*0^n +(-1)^n)/2. a(-n)=a(n). a(2n+1)=1, a(2n)=2, n nonzero.
a(n) = sum{k=0..n, F(n-k+1)*(-2+(1+(-1)^k)/2+C(2, k)+0^k)}. - Paul Barry, Jun 22 2007
Row sums of triangle A133566. - Gary W. Adamson, Sep 16 2007
Euler transform of length 3 sequence [ 1, 1, -1]. - Michael Somos, Aug 04 2009
Moebius transform is length 2 sequence [ 1, 1]. - Michael Somos, Aug 04 2009
a(n) = sign(n) + ((n+1) mod 2) = 1 + sign(n) - (n mod 2). - Wesley Ivan Hurt, Dec 13 2013

A050873 Triangular array T read by rows: T(n,k) = gcd(n,k).

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Comments

The function T(n,k) = T(k,n) is defined for all integer k,n but only the values for 1 <= k <= n as a triangular array are listed here.
For each divisor d of n, the number of d's in row n is phi(n/d). Furthermore, if {a_1, a_2, ..., a_phi(n/d)} is the set of positive integers <= n/d that are relatively prime to n/d then T(n,a_i * d) = d. - Geoffrey Critzer, Feb 22 2015
Starting with any row n and working downwards, consider the infinite rectangular array with k = 1..n. A repeating pattern occurs every A003418(n) rows. For example, n=3: A003418(3) = 6. The 6-row pattern starting with row 3 is {1,1,3}, {1,2,1}, {1,1,1}, {1,2,3}, {1,1,1}, {1,2,1}, and this pattern repeats every 6 rows, i.e., starting with rows {9,15,21,27,...}. - Bob Selcoe and Jamie Morken, Aug 02 2017

Examples

			Rows:
  1;
  1, 2;
  1, 1, 3;
  1, 2, 1, 4;
  1, 1, 1, 1, 5;
  1, 2, 3, 2, 1, 6; ...
		

Crossrefs

Cf. A003989.
Cf. A018804 (row sums), A245717.
Cf. A132442 (sums of divisors).
Cf. A003418.

Programs

  • Haskell
    a050873 = gcd
    a050873_row n = a050873_tabl !! (n-1)
    a050873_tabl = zipWith (map . gcd ) [1..] a002260_tabl
    -- Reinhard Zumkeller, Dec 12 2015, Aug 13 2013, Jun 10 2013
  • Mathematica
    ColumnForm[Table[GCD[n, k], {k, 12}, {n, k}], Center] (* Alonso del Arte, Jan 14 2011 *)
  • PARI
    {T(n, k) = gcd(n, k)} /* Michael Somos, Jul 18 2011 */
    

Formula

a(n) = gcd(A002260(n), A002024(n)); A054521(n) = A000007(a(n)). - Reinhard Zumkeller, Dec 02 2009
T(n,k) = A075362(n,k)/A051173(n,k), 1 <= k <= n. - Reinhard Zumkeller, Apr 25 2011
T(n, k) = T(k, n) = T(-n, k) = T(n, -k) = T(n, n+k) = T(n+k, k). - Michael Somos, Jul 18 2011
T(n,k) = A051173(n,k) / A051537(n,k). - Reinhard Zumkeller, Jul 07 2013

A051537 Triangle read by rows: T(i,j) = lcm(i,j)/gcd(i,j) for 1 <= j <= i.

Original entry on oeis.org

1, 2, 1, 3, 6, 1, 4, 2, 12, 1, 5, 10, 15, 20, 1, 6, 3, 2, 6, 30, 1, 7, 14, 21, 28, 35, 42, 1, 8, 4, 24, 2, 40, 12, 56, 1, 9, 18, 3, 36, 45, 6, 63, 72, 1, 10, 5, 30, 10, 2, 15, 70, 20, 90, 1, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 1, 12, 6, 4, 3, 60, 2, 84, 6, 12, 30, 132, 1, 13, 26, 39
Offset: 1

Views

Author

N. J. A. Sloane and Amarnath Murthy, May 10 2002

Keywords

Comments

From Robert G. Wilson v, May 10 2002: (Start)
The first term of the k-th row is k. The first leading diagonal contains all 1's. The second leading diagonal contains twice the triangular numbers = n*(n-1).
For p prime, the sum of the p-th row is (p^3 - p^2 + 2)/2.
Proof: The p-th row is p, 2*p, 3*p, ..., (p-2)*p, (p-1)*p, 1. The sum of the row = p*(1 + 2 + 3 + ... + (p-2) + (p-1)) + 1 = p*(p-1)*p/2 + 1 = (p^3 - p^2 + 2)/2. (End) [Edited by Petros Hadjicostas, May 27 2020]
In the square array where T(i,j) = T(j,i), the natural extension of the triangle, each set of rows and columns with common indices [d1, d2, ..., ds] define a group multiplication table on their grid, if the d1, d2, ..., ds are the set of divisors of a squarefree number [A. Jorza]. - R. J. Mathar, May 03 2007
T(n,k) is the minimum number of squares necessary to fill a rectangle with sides of length n and k. - Stefano Spezia, Oct 06 2018

Examples

			Triangle T(n,k) (with rows n >= 1 and columns k = 1..n) begins
  1;
  2,  1;
  3,  6,  1;
  4,  2, 12,  1;
  5, 10, 15, 20,  1;
  6,  3,  2,  6, 30,  1;
  7, 14, 21, 28, 35, 42,  1;
  8,  4, 24,  2, 40, 12, 56,  1;
  ...
		

Crossrefs

Diagonals give A002378, A070260, A070261, A070262.
Row sums give A056789.

Programs

  • GAP
    Flat(List([1..13],n->List([1..n],k->Lcm(n,k)/Gcd(n,k)))); # Muniru A Asiru, Oct 06 2018
    
  • Haskell
    a051537 n k = a051537_tabl !! (n-1) !! (k-1)
    a051537_row n = a051537_tabl !! (n-1)
    a051537_tabl = zipWith (zipWith div) a051173_tabl a050873_tabl
    -- Reinhard Zumkeller, Jul 07 2013
    
  • Magma
    /* As triangle */ [[Lcm(n,k)/Gcd(n,k): k in [1..n]]: n in [1.. 15]]; // Vincenzo Librandi, Oct 07 2018
  • Maple
    T:=proc(n,k) n*k/gcd(n,k)^2; end proc: seq(seq(T(n,k),k=1..n),n=1..13); # Muniru A Asiru, Oct 06 2018
  • Mathematica
    Flatten[ Table[ LCM[i, j] / GCD[i, j], {i, 1, 13}, {j, 1, i}]]
    T[n_,k_]:=n*k/GCD[n,k]^2; Flatten[Table[T[n,k],{k,1,13},{n,1,k}]] (* Stefano Spezia, Oct 06 2018 *)

Formula

T(n,k) = A054531(n,k)*A164306(n,k). - Reinhard Zumkeller, Oct 30 2009
T(n,k) = A051173(n,k) / A050873(n,k). - Reinhard Zumkeller, Jul 07 2013
T(n,k) = n*k/gcd(n,k)^2. - Stefano Spezia, Oct 06 2018

Extensions

More terms from Robert G. Wilson v, May 10 2002
Showing 1-10 of 20 results. Next