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.

A011772 Smallest number m such that m(m+1)/2 is divisible by n.

Original entry on oeis.org

1, 3, 2, 7, 4, 3, 6, 15, 8, 4, 10, 8, 12, 7, 5, 31, 16, 8, 18, 15, 6, 11, 22, 15, 24, 12, 26, 7, 28, 15, 30, 63, 11, 16, 14, 8, 36, 19, 12, 15, 40, 20, 42, 32, 9, 23, 46, 32, 48, 24, 17, 39, 52, 27, 10, 48, 18, 28, 58, 15, 60, 31, 27, 127, 25, 11, 66, 16, 23, 20, 70, 63, 72, 36, 24
Offset: 1

Views

Author

Kenichiro Kashihara (Univxiq(AT)aol.com)

Keywords

Comments

The graph of the function is split into rays of which the densest ones are y(n) = n-1 = a(n) iff n is an odd prime power, and y(n) = n/2 = a(n) or a(n)+1 if n = 8k-2 (except for k = 9, 10, 14, 16, 19, 24, ...) or 8k+2 (except for k = 8, 11, 16, 17, 19, 26, 33, ...). The next most-frequent rays are similar: y(n) = n/r for r = 3, 4, 5, ... and r = 4/3, etc. - M. F. Hasler, May 30 2021

Crossrefs

Cf. A343995, A343996, A343997, A343998, A345984 (partial sums).
Cf. also A080982, A344005.

Programs

  • Haskell
    import Data.List (findIndex)
    import Data.Maybe (fromJust)
    a011772 n = (+ 1) $ fromJust $
       findIndex ((== 0) . (`mod` n)) $ tail a000217_list
    -- Reinhard Zumkeller, Mar 23 2013
    
  • Mathematica
    Table[m := 1; While[Not[IntegerQ[(m*(m + 1))/(2n)]], m++ ]; m, {n, 1, 90}] (* Stefan Steinerberger, Apr 03 2006 *)
    (Sqrt[1+8#]-1)/2&/@Flatten[With[{r=Accumulate[Range[300]]},Table[ Select[r, Divisible[#,n]&,1],{n,80}]]] (* Harvey P. Dale, Feb 05 2012 *)
  • PARI
    a(n)=if(n==1,return(1)); my(f=factor(if(n%2,n,2*n)), step=vecmax(vector(#f~, i, f[i,1]^f[i,2]))); forstep(m=step,2*n,step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))) \\ Charles R Greathouse IV, Jun 25 2017
    
  • Python
    from math import isqrt
    def A011772(n):
        m = (isqrt(8*n+1)-1)//2
        while (m*(m+1)) % (2*n):
            m += 1
        return m # Chai Wah Wu, May 30 2021

Formula

A000217(a(n)) = A066561(n).
a(2^k) = 2^(k+1)-1; a(m) = m-1 for odd prime powers m. - Reinhard Zumkeller, Feb 26 2003
a(n) <= 2n-1 for all numbers n; a(n) <= n-1 for odd n. - Stefan Steinerberger, Apr 03 2006
a(n) >= (sqrt(8n+1)-1)/2 for all n. - Charles R Greathouse IV, Jun 25 2017
a(n) < n-1 for all n except the prime powers where a(n) = n-1 (n odd) or 2n-1 (n = 2^k). - M. F. Hasler, May 30 2021
a(n) = A344005(2*n). - N. J. A. Sloane, Jul 06 2021
a(n) = 2*n-1 iff n is a power of 2. - Shu Shang, Aug 01 2022

Extensions

More terms from Stefan Steinerberger, Apr 03 2006

A110353 Value of k pertaining to A110351(n). Least k such that the sum (n+1) + (n+2) + ...+(n+k) is a multiple of the n-th triangular number n(n+1)/2.

Original entry on oeis.org

1, 1, 5, 11, 4, 8, 41, 55, 26, 34, 21, 27, 64, 6, 65, 239, 118, 134, 56, 15, 56, 208, 160, 176, 274, 298, 161, 175, 115, 125, 929, 319, 120, 50, 189, 260, 628, 208, 65, 575, 204, 216, 429, 55, 369, 988, 657, 687, 1126, 324, 221, 584, 1324, 485, 120, 343, 494, 1594
Offset: 1

Views

Author

Amarnath Murthy, Jul 21 2005

Keywords

Comments

For many values of n, a(n) = A110352(n).

Crossrefs

Programs

  • Haskell
    import Data.List (findIndex)
    import Data.Maybe (fromJust)
    a110353 n = (+ 1) $ fromJust $
       findIndex ((== 0) . (`mod` t)) $ dropWhile (<= t) a000217_list
       where t = a000217 n
    -- Reinhard Zumkeller, Mar 23 2013

Extensions

More terms from Joshua Zucker, May 08 2006

A080983 Smallest triangular number having n^2 as divisor.

Original entry on oeis.org

1, 28, 36, 496, 300, 36, 1176, 8128, 3240, 300, 7260, 2016, 14196, 1176, 4950, 130816, 41616, 3240, 64980, 25200, 4851, 7260, 139656, 131328, 195000, 14196, 265356, 270480, 353220, 25200, 461280, 2096128, 29403, 41616, 1225, 738720, 936396
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 26 2003

Keywords

Comments

a(n)=A000217(A080982(n)).

Crossrefs

Cf. A066561.

Programs

  • Haskell
    a080983 = a000217 . a080982  -- Reinhard Zumkeller, Mar 23 2013
  • Mathematica
    With[{trnos=Accumulate[Range[2500]]},Flatten[Table[Select[trnos, Divisible[ #,n^2]&,1],{n,40}]]] (* Harvey P. Dale, Jun 01 2014 *)
Showing 1-3 of 3 results.