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

A061049 Numerator of 1/64 - 1/n^2.

Original entry on oeis.org

0, 17, 9, 57, 5, 105, 33, 161, 3, 225, 65, 297, 21, 377, 105, 465, 1, 561, 153, 665, 45, 777, 209, 897, 15, 1025, 273, 1161, 77, 1305, 345, 1457, 3, 1617, 425, 1785, 117, 1961, 513, 2145, 35, 2337, 609, 2537, 165, 2745, 713, 2961, 3, 3185, 825
Offset: 8

Views

Author

N. J. A. Sloane, May 26 2001

Keywords

Comments

The 495 initial terms are the same as A000265(n * (n+16)), n > 0. - Simon Strandgaard, Oct 30 2021

Crossrefs

Cf. also A191871.

Programs

  • Mathematica
    Table[ Numerator[1/64 - 1/n^2], {n, 8, 58}] (* Jean-François Alcover, May 31 2013 *)
  • PARI
    for(n=8,50, print1(numerator(1/64 - 1/n^2), ", ")) \\ G. C. Greubel, Jul 07 2017

A228564 Largest odd divisor of n^2 + 1.

Original entry on oeis.org

1, 1, 5, 5, 17, 13, 37, 25, 65, 41, 101, 61, 145, 85, 197, 113, 257, 145, 325, 181, 401, 221, 485, 265, 577, 313, 677, 365, 785, 421, 901, 481, 1025, 545, 1157, 613, 1297, 685, 1445, 761, 1601, 841, 1765, 925, 1937, 1013, 2117, 1105, 2305, 1201, 2501, 1301, 2705
Offset: 0

Views

Author

Jeremy Gardiner, Aug 25 2013

Keywords

Comments

From Lamine Ngom, Jan 04 2023: (Start)
For n>2, a(n) = hypotenuse c of the primitive Pythagorean triple (a, b, c) such that n*a = b + c.
Terms that appear twice (1, 5, 145, 4901, ...) are the positive terms of A076218. Equivalently, the products of two consecutive terms of A001653, or one more than the squares of A001542.
These duplicated terms appear at indices i and j (i>j) such that (i^2-1)/2 = j^2 (A001541). In addition, they are hypotenuse in two primitive Pythagorean triples: (i, j^2, a(i)) and (2*j, j^2-1, a(i)). (End)

Examples

			A002522(3) = 3^2+1 = 10 => a(3) = 10/2 = 5.
		

Crossrefs

Programs

  • BASIC
    for n = 0 to 45 : t=n^2+1
    x: if not t mod 2 then t=t/2 : goto x
    print str$(t);", "; : next n
    print
    end
    
  • GAP
    List([0..60],n->NumeratorRat((n^2+1)/(n+1))); # Muniru A Asiru, Feb 20 2019
    
  • Magma
    [(n^2+1)*(3+(-1)^n)/4: n in [0..60]]; // Bruno Berselli, Aug 26 2013
    
  • Magma
    [Denominator(2*n^2/(n^2+1)): n in [0..60]]; // Vincenzo Librandi, Aug 19 2014
    
  • Maple
    lod:= t -> t/2^padic:-ordp(t,2):
    seq(lod(n^2+1),n=0..60); # Robert Israel, Aug 19 2014
  • Mathematica
    Table[(n^2 + 1) (3 + (-1)^n)/4, {n, 0, 60}] (* Bruno Berselli, Aug 26 2013 *)
  • PARI
    a(n)=if(n<2,n>0,m=n\4;[4*a(2*m)-3,2*a(2*m)+4*m-1,4*a(2*m)+16*m+1,2*a(2*m)+12*m+3][(n%4)+1]) \\ Ralf Stephan, Aug 26 2013
    
  • PARI
    a(n)=(n^2+1)/2^valuation(n^2+1,2) \\ Ralf Stephan, Aug 26 2013
    
  • Sage
    [(n^2+1)*(3+(-1)^n)/4 for n in (0..60)] # G. C. Greubel, Feb 20 2019

Formula

a(n) = A000265(A002522(n)).
From Ralf Stephan, Aug 26 2013: (Start)
a(4n) = 4*a(2n) - 3.
a(4n+1) = 2*a(2n) + 4*n - 1.
a(4n+2) = 4*a(2n) + 16*n + 1.
a(4n+3) = 2*a(2n) + 12*n + 3. (End)
From Bruno Berselli, Aug 26 2013: (Start)
G.f.: (1 + x + 2*x^2 + 2*x^3 + 5*x^4 + x^5) / (1-x^2)^3.
a(n) = 3*a(n-2) -3*a(n-4) +a(n-6).
a(n) = (n^2+1)*(3+(-1)^n)/4. (End)
From Peter Bala, Feb 14 2019: (Start)
a(n) = numerator((n^2 + 1)/(n + 1)).
a(n) is a quasi-polynomial in n: a(2*n) = 4*n^2 + 1; a(2*n + 1) = 2*n^2 + 2*n + 1. (End)
From Amiram Eldar, Aug 09 2022: (Start)
a(n) = numerator((n^2+1)/2).
Sum_{n>=0} 1/a(n) = (1 + coth(Pi/2)*Pi/2 + tanh(Pi/2)*Pi)/2. (End)
E.g.f.: ((2 + x + 2*x^2)*cosh(x) + (1 + x)^2*sinh(x))/2. - Stefano Spezia, Aug 04 2025

A206771 0 followed by the numerators of the reduced (A001803(n) + A001790(n)) / (2*A046161(n)).

Original entry on oeis.org

0, 1, 1, 9, 5, 175, 189, 1617, 429, 57915, 60775, 508079, 264537, 8788507, 9100525, 75218625, 9694845, 5109183315, 5250613995, 43106892675, 22090789875, 723694276305, 740104577355, 6049284520695, 1543768261425, 201547523019375
Offset: 0

Views

Author

Paul Curtz, Jan 10 2013

Keywords

Comments

We write the fractions a(n)/b(n) and higher order differences as a matrix:
0, 1, 1, 9/8, 5/4,...
1, 0, 1/8, 1/8, 15/128,... = (A001790(n)/A046161(n) +Lorbeta(n)) /2
-1, 1/8, 0, -1/128, -1/128,... = (Lorbeta(n+1) +A161200(n+1)/A046161(n+1)) / 2
9/8, -1/8, -1/128, 0, 1/1024,...
-5/4, 15/128, 1/128, 1/1024, 0,...
Here, Lorbeta(0)=1 and Lorbeta(n) = -A098597(n-1)/A046161(n) for n>0 is the inverse of the Lorentz factor.
The first line with numerators a(n) and denominators b(n) is 0, 1, 1, 9/8, 5/4, 175/128, 189/128, 1617/1024, 429/256, 57915/32768, 60775/32768,... It is an autosequence: Its inverse binomial transform is the signed sequence.
a(n+1)/(2*n-1)= 1, 3, 1, 25, 21, 147, 33, 3861, 3575, 26741,... .
a(n+1)/A146535(n) = 9, 5, 35, 27, 539, 39, 4455,... .
A001790(n)/A046161(n) yields the coefficients of the Lorentz factor (or Lorentz gamma factor). With b for beta and g for gamma:
g = (1-b^2)^-1 = 1 + (b^2)/2 + 3*(b^4)/8 + 5*(b^6)/16 + ... .
b = (1-g^-2)^-1 = 1 - (g^-2)/2 - (g^-4)/8 - (g^-6)/16 - ... .
Are the denominators of the first subdiagonal 1, 1/8, -1/128, 1/1024,... A061549(n) ?
a(n+1)/(A000108(n)*b(n)) = 1, 1, 9/16, 1/4, 25/256, 9/256, 49/4096, 1/256, 81/65536, 25/65536, 121/1048576,... = A191871(n+1)/ A084623(n+1)^2 ?

Examples

			From the first formula: a(1)=1*1, a(2)=1*1, a(3)=3*3, a(4)=1*5, a(5)=5*35, a(6)=3*63.
		

Crossrefs

Programs

  • Magma
    /* By definition: */ m:=25; R:=PowerSeriesRing(Rationals(), m); p:=Coefficients(R!(1/(1-x)^(1/2))); q:=Coefficients(R!((1-x)^(-3/2))); A001790:=[Numerator(p[i]): i in [1..m]]; A001803:=[Numerator(q[i]): i in [1..m]]; A046161:=[Denominator(Binomial(2*n,n)/4^n): n in [0..m-1]]; [0] cat [Numerator((A001803[n]+A001790[n])/(2*A046161[n])): n in [1..m]]; // Bruno Berselli, Mar 11 2013
  • Maple
    A206771 := proc(n)
            A001790(n)+A001803(n) ;
            %/2/A046161(n) ;
            numer(%) ;
    end proc: # R. J. Mathar, Jan 18 2013
  • Mathematica
    max = 25; A001803 = CoefficientList[Series[(1 - x)^(-3/2), {x, 0, max}], x] // Numerator; A001790 = CoefficientList[Series[1/Sqrt[(1 - x)], {x, 0, max}], x] // Numerator; A046161 = Table[Binomial[2n, n]/4^n, {n, 0, max}] // Denominator; a[n_] := (A001803[[n]] + A001790[[n]])/(2*A046161[[n]]) // Numerator; a[0] = 0; Table[a[n], {n, 0, max}]
    (* or (from 1st formula) : *) Table[ n*Numerator[4^(1-n)*Binomial[2n-2, n-1]]/2^IntegerExponent[n, 2], {n, 0, max}]
    (* or (from 2nd formula) : *) Table[ Numerator[ CatalanNumber[n-1]/2^(2n-1)]*Numerator[n^2/2^n], {n, 0, max}] (* Jean-François Alcover, Jan 31 2013 *)

Formula

a(n) = A000265(n) * A001790(n-1).
a(n) = A098597(n-1) * A191871(n). See also A181318
a(n) = numerator of n*binomial(2n-2,n-1)/4^(n-1). - Nathaniel Johnston, Dec 16 2022

Extensions

a(11)-a(25) from Jean-François Alcover, Jan 13 2013

A301279 Denominator of variance of n-th row of Pascal's triangle.

Original entry on oeis.org

1, 1, 3, 3, 10, 15, 21, 7, 36, 45, 11, 33, 13, 91, 105, 15, 136, 153, 171, 95, 105, 231, 253, 69, 150, 325, 351, 189, 203, 435, 155, 31, 528, 51, 595, 315, 111, 703, 741, 195, 410, 861, 903, 473, 495, 1035, 1081, 141, 588, 1225, 255, 663, 689, 1431, 1485
Offset: 0

Views

Author

N. J. A. Sloane, Mar 18 2018

Keywords

Comments

Variance here is sample variance unbiased estimator. For population variance, the denominator is A191871(n+1) = A000265(n+1)^2. - Chai Wah Wu, Mar 25 2018

Examples

			The first few variances are 0, 0, 1/3, 4/3, 47/10, 244/15, 1186/21, 1384/7, 25147/36, 112028/45, 98374/11, 1067720/33, 1531401/13, 39249768/91, 166656772/105, 88008656/15, 2961699667/136, 12412521388/153, 51854046982/171, 108006842264/95, 448816369361/105, ...
		

Crossrefs

Mean and variance of n-th row of Pascal's triangle: A084623/A000265, A301278/A301279, A054650, A301280.

Programs

  • Maple
    M:=70;
    m := n -> 2^n/(n+1);
    m1:=[seq(m(n),n=0..M)]; # A084623/A000265
    v := n -> (1/n) * add((binomial(n,i) - m(n))^2, i=0..n );
    v1:= [0, 0, seq(v(n),n=2..60)]; # A301278/A301279
  • PARI
    a(n) = if(n==0, 1, denominator(binomial(2*n,n)/n - 4^n/(n*(n+1)))); \\ Altug Alkan, Mar 25 2018
  • Python
    from fractions import Fraction
    from sympy import binomial
    def A301279(n):
        return (Fraction(int(binomial(2*n,n)))/n - Fraction(4**n)/(n*(n+1))).denominator if n > 0 else 1 # Chai Wah Wu, Mar 23 2018
    

Formula

a(0) = 1; a(n) = denominator of binomial(2n,n)/n - 4^n/(n*(n+1)) for n >= 1. - Chai Wah Wu, Mar 23 2018

A301631 Numerator of population variance of n-th row of Pascal's triangle.

Original entry on oeis.org

0, 0, 2, 1, 94, 122, 2372, 173, 50294, 56014, 983740, 266930, 18376812, 19624884, 333313544, 5500541, 5923399334, 6206260694, 103708093964, 27001710566, 1795265477444, 1860906681644, 30802090121144, 1988024895074, 524715115366844, 540193965134732, 8886200762228312
Offset: 0

Views

Author

N. J. A. Sloane and Chai Wah Wu, Mar 24 2018

Keywords

Comments

Denominator of population variance of n-th row of Pascal's triangle is A191871(n+1) = A000265(n+1)^2.

Examples

			The first few population variances are 0, 0, 2/9, 1, 94/25, 122/9, 2372/49, 173, 50294/81, 56014/25, 983740/121, 266930/9, 18376812/169, 19624884/49, 333313544/225, 5500541, 5923399334/289, ...
		

Crossrefs

Programs

  • PARI
    a(n) = numerator(binomial(2*n,n)/(n+1) - 4^n/(n+1)^2); \\ Altug Alkan, Mar 25 2018
  • Python
    from fractions import Fraction
    from sympy import binomial
    def A301631(n):
        return (Fraction(int(binomial(2*n,n)))/(n+1) - Fraction(4**n)/(n+1)**2).numerator
    

Formula

a(n) = numerator of binomial(2n,n)/(n+1) - 4^n/(n+1)^2.
a(n) = A000108(n)*A000265(n+1)^2 - A075101(n+1)^2/4.
Showing 1-5 of 5 results.