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.

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

A345056 a(n) is the next larger number k > n for which A011772(k) = A011772(n), or n itself if no such larger number exists.

Original entry on oeis.org

1, 6, 3, 14, 10, 6, 21, 20, 12, 10, 55, 18, 26, 28, 15, 62, 34, 36, 57, 24, 21, 33, 253, 30, 50, 39, 117, 28, 58, 40, 93, 72, 66, 68, 105, 36, 74, 95, 78, 60, 82, 70, 129, 48, 45, 69, 1081, 88, 56, 75, 153, 130, 106, 63, 55, 84, 171, 203, 1711, 120, 122, 124, 126, 254, 325, 66, 201, 136, 92, 210, 355, 96, 146, 111, 100, 114
Offset: 1

Views

Author

Antti Karttunen, Jun 07 2021

Keywords

Crossrefs

Programs

  • PARI
    A011772(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))); }; \\ From A011772
    A345056(n) = { my(x=A011772(n), y=binomial(x+1,2)); for(i=1+n,y,if(A011772(i)==x,return(i))); (n); };

Formula

a(n) = n + A345057(n).

A345057 Distance to the next larger number k > n for which A011772(k) = A011772(n), or 0 if no such number exists.

Original entry on oeis.org

0, 4, 0, 10, 5, 0, 14, 12, 3, 0, 44, 6, 13, 14, 0, 46, 17, 18, 38, 4, 0, 11, 230, 6, 25, 13, 90, 0, 29, 10, 62, 40, 33, 34, 70, 0, 37, 57, 39, 20, 41, 28, 86, 4, 0, 23, 1034, 40, 7, 25, 102, 78, 53, 9, 0, 28, 114, 145, 1652, 60, 61, 62, 63, 190, 260, 0, 134, 68, 23, 140, 284, 24, 73, 37, 25, 38, 154, 0
Offset: 1

Views

Author

Antti Karttunen, Jun 07 2021

Keywords

Crossrefs

Cf. A000217 (positions of zeros), A002024, A011772, A066561, A345056, A345058.

Programs

  • PARI
    A011772(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))); }; \\ From A011772
    A345057(n) = { my(x=A011772(n), y=binomial(x+1,2)); for(i=1+n,y,if(A011772(i)==x,return(i-n))); (0); };

Formula

a(n) = A345056(n) - n.

A345058 Number of distinct k > 0 for which A011772(k) = n.

Original entry on oeis.org

1, 2, 1, 3, 2, 2, 2, 7, 4, 2, 2, 4, 4, 3, 1, 5, 4, 4, 3, 7, 2, 3, 2, 7, 6, 4, 3, 3, 4, 7, 4, 13, 3, 4, 2, 4, 6, 3, 4, 7, 6, 3, 4, 7, 1, 5, 2, 7, 11, 6, 2, 7, 4, 5, 2, 11, 3, 4, 2, 7, 8, 5, 5, 7, 2, 3, 4, 4, 5, 3, 4, 13, 9, 6, 6, 9, 2, 4, 4, 8, 15, 6, 2, 11, 3, 3, 3, 7, 6, 3, 1, 5, 4, 7, 3, 13, 10, 11, 7, 6, 6, 5, 4, 8, 2
Offset: 1

Views

Author

Antti Karttunen, Jun 07 2021

Keywords

Comments

Question: Are there any numbers n other than 1, 3, 15, 45, 91 for which a(n) = 1?

Examples

			A011772 obtains the value 6 only as A011772(7)=6 and A011772(36)=6, therefore a(6) = 2.
		

Crossrefs

Programs

  • PARI
    A011772(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))); }; \\ From A011772
    A345058(n) = { my(x=A011772(n), y=binomial(x+1,2)); sum(i=1,y,(A011772(i)==x)); };

Formula

a(n) = Sum_{i=1..A000217(n)} [A011772(i) = A011772(n)], where [ ] is the Iverson bracket.

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