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.

A069834 a(n) = n-th reduced triangular number: n*(n+1)/{2^k} where 2^k is the largest power of 2 that divides product n*(n+1).

Original entry on oeis.org

1, 3, 3, 5, 15, 21, 7, 9, 45, 55, 33, 39, 91, 105, 15, 17, 153, 171, 95, 105, 231, 253, 69, 75, 325, 351, 189, 203, 435, 465, 31, 33, 561, 595, 315, 333, 703, 741, 195, 205, 861, 903, 473, 495, 1035, 1081, 141, 147, 1225, 1275, 663, 689, 1431, 1485, 385, 399
Offset: 1

Views

Author

Amarnath Murthy, Apr 14 2002

Keywords

Comments

The largest odd divisor of n-th triangular number.

Crossrefs

Programs

  • Mathematica
    Table[tri = n*(n + 1)/2; tri/2^IntegerExponent[tri, 2], {n, 100}] (* T. D. Noe, Oct 28 2013 *)
  • PARI
    for(n=1,100,t=n*n+n;while(t%2==0,t=t/2);print1(t","))
    
  • PARI
    a(n)=local(t);t=n*(n+1)\2;t/2^valuation(t,2) \\ Franklin T. Adams-Watters, Nov 20 2009
    
  • Python
    def A069834(n):
        a, b = divmod(n*n+n, 2)
        while b == 0:
            a, b = divmod(a,2)
        return 2*a+b # Chai Wah Wu, Dec 05 2021

Formula

GCD(a(n),a(n+1)) = A000265(n+1). - Ralf Stephan, Apr 05 2003
a(n) = A000265(n) * A000265(n+1). - Franklin T. Adams-Watters, Nov 20 2009
From Amiram Eldar, Sep 15 2022: (Start)
a(n) = A000265(A000217(n)).
Sum_{n>=1} 1/a(n) = Sum_{i,j>=1} 2^(i+1)/(4^i*(2*j-1)^2 - 1) = 2.84288562849221553965... . (End)

Extensions

More terms from Ralf Stephan, Apr 05 2003