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

A332552 a(n) = A082184(n) - A082183(n).

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 3, 6, 5, 4, 4, 7, 10, 5, 1, 9, 9, 5, 15, 14, 11, 8, 15, 13, 18, 21, 7, 15, 15, 1, 11, 22, 17, 28, 12, 19, 26, 24, 8, 21, 21, 11, 36, 30, 23, 16, 21, 35, 34, 39, 13, 27, 45, 40, 24, 38, 29, 20, 20, 31, 42, 21, 13, 55, 33, 17, 51, 46, 35
Offset: 2

Views

Author

N. J. A. Sloane, Feb 21 2020, at the suggestion of Allan C. Wechsler

Keywords

Crossrefs

A332553 a(n) = n + A082183(n) - A082184(n).

Original entry on oeis.org

1, 2, 3, 2, 3, 6, 5, 3, 5, 7, 8, 6, 4, 10, 15, 8, 9, 14, 5, 7, 11, 15, 9, 12, 8, 6, 21, 14, 15, 30, 21, 11, 17, 7, 24, 18, 12, 15, 32, 20, 21, 32, 8, 15, 23, 31, 27, 14, 16, 12, 39, 26, 9, 15, 32, 19, 29, 39, 40, 30, 20, 42, 51, 10, 33, 50, 17, 23, 35
Offset: 2

Views

Author

N. J. A. Sloane, Feb 21 2020, at the suggestion of Bradley Klee

Keywords

Comments

Since (by definition) a(n) = n + A082183(n) - A082184(n) = - (n^2 + A082183(n)^2 - A082184(n)^2), this can be described as the distance of (n, A082183(n), A082184(n)) from a Pythagorean triple. Also a(n) > 0 for all n. See the Myers et al. link. - Bradley Klee, Feb 19 2020
Comments from N. J. A. Sloane, Feb 23 2020: (Start)
To study the lowest values taken by a(n), consider the record high values of n/a(n). The data suggests two conjectures.
Conjecture 1: The record high values of n/a(n) are j/2 + 1 for j = 2,3,4,5,... and occur at n = j*(j+1)/2 - 1.
This would imply:
Conjecture 2: Let j = 2,3,4,5,... For 1 <= n < T_j - 1, a(n) > 2*n/(j+2). (End)

Crossrefs

A055527 Shortest other leg of a Pythagorean triangle with n as length of a leg.

Original entry on oeis.org

4, 3, 12, 8, 24, 6, 12, 24, 60, 5, 84, 48, 8, 12, 144, 24, 180, 15, 20, 120, 264, 7, 60, 168, 36, 21, 420, 16, 480, 24, 44, 288, 12, 15, 684, 360, 52, 9, 840, 40, 924, 33, 24, 528, 1104, 14, 168, 120, 68, 39, 1404, 72, 48, 33, 76, 840, 1740, 11, 1860, 960, 16, 48, 72
Offset: 3

Views

Author

Henry Bottomley, May 22 2000

Keywords

Comments

From Alex Ratushnyak, Mar 30 2014: (Start)
Least positive k such that n^2 + k^2 is a square.
For odd n, a(n) <= 4*triangular((n-1)/2), because n^2 + (4 * triangular((n-1)/2))^2 = ((n^2+1)/2) ^ 2, which is a perfect square since n is odd.
For n = 4*k+2, a(n) <= 8*triangular(k), because (4k+2)^2 + (4*k*(k+1))^2 = (4*k^2 + 4*k + 2)^2. (End)

Crossrefs

See A082183 for a similar sequence involving triangular numbers.

Programs

  • Mathematica
    Table[k = 1; While[! IntegerQ[Sqrt[n^2 + k^2]], k++]; k, {n, 3, 100}] (* T. D. Noe, Apr 02 2014 *)

Formula

a(n) = sqrt(A055526(n)^2-n^2) = 2*A054436/n.

A332542 a(n) is the smallest k such that n+(n+1)+(n+2)+...+(n+k) is divisible by n+k+1.

Original entry on oeis.org

2, 7, 14, 3, 6, 47, 14, 4, 10, 20, 25, 11, 5, 31, 254, 15, 18, 55, 6, 10, 22, 44, 14, 23, 11, 7, 86, 27, 30, 959, 62, 16, 34, 8, 73, 35, 17, 24, 163, 39, 42, 127, 9, 22, 46, 92, 62, 19, 23, 15, 158, 51, 10, 20, 75, 28, 58, 116, 121, 59, 29, 127, 254, 11
Offset: 3

Views

Author

Scott R. Shannon, Feb 18 2020

Keywords

Comments

Note that (n+(n+1)+(n+2)+...+(n+k))/(n+k+1) = A332544(n)/(n+k+1) = A082183(n-1). See the Myers et al. link for proof. - N. J. A. Sloane, Apr 30 2020
We can always take k = n^2-2*n-1, for then the sum in the definition becomes (n+1)*n*(n-1)*(n-2)/2, which is an integral multiple of n+k+1 = n*(n-1). So a(n) always exists. - N. J. A. Sloane, Feb 20 2020

Examples

			n=4: we get 4 -> 4+5=9 -> 9+6=15 -> 15+7=22 -> 22+8=30 -> 30+9=39 -> 39+10=49 -> 49+11=60, which is divisible by 12, and took k=7 steps, so a(4) = 7. Also A332543(4) = 12, A332544(4) = 60, and A082183(3) = 60/12 = 5.
		

Crossrefs

See A332558-A332561 for a multiplicative analog.

Programs

  • Maple
    grow2 := proc(n,M) local p,q,k; # searches out to a limit of M
    # returns n, k (A332542(n)), n+k+1 (A332543(n)), p (A332544(n)), and q (which appears to match A082183(n-1))
    for k from 1 to M do
       if ((k+1)*n + k*(k+1)/2) mod (n+k+1) = 0 then
       p := (k+1)*n+k*(k+1)/2;
       q := p/(n+k+1); return([n,k,n+k+1,p,q]);
       fi;
    od:
    # if no success, return -1's
    [n,-1,-1,-1,-1]; end; # N. J. A. Sloane, Feb 18 2020
  • Mathematica
    a[n_] := NestWhile[#1+1&,0,!IntegerQ[Divide[(#+1)*n+#*(#+1)/2,n+#+1]]&]
    a/@Range[3,100] (* Bradley Klee, Apr 30 2020 *)
  • PARI
    a(n) = my(k=1); while (sum(i=0, k, n+i) % (n+k+1), k++); k; \\ Michel Marcus, Aug 26 2021
    
  • Python
    def a(n):
        k, s = 1, 2*n+1
        while s%(n+k+1) != 0: k += 1; s += n+k
        return k
    print([a(n) for n in range(3, 67)]) # Michael S. Branicky, Aug 26 2021
  • Ruby
    def A(n)
      s = n
      t = n + 1
      while s % t > 0
        s += t
        t += 1
      end
      t - n - 1
    end
    def A332542(n)
      (3..n).map{|i| A(i)}
    end
    p A332542(100) # Seiichi Manyama, Feb 19 2020
    

A082184 The a(n)-th triangular number is the sum of the n-th triangular number and the smallest triangular number possible.

Original entry on oeis.org

3, 6, 10, 6, 8, 28, 13, 10, 13, 18, 21, 16, 15, 26, 136, 21, 23, 40, 21, 23, 28, 38, 27, 31, 28, 28, 61, 36, 38, 496, 53, 36, 43, 36, 61, 46, 41, 44, 106, 51, 53, 91, 45, 49, 58, 78, 66, 52, 54, 53, 112, 66, 55, 58, 78, 62, 73, 98, 101, 76, 67, 106, 166, 66, 83, 142, 71
Offset: 2

Views

Author

Ralf Stephan, Apr 06 2003

Keywords

Comments

a(n) is triangular if n+1 is triangular. Conjectures: partial maxima of sequence are at index i with value from A068195 and also a(i) - A082183(i) = 1, where i is in A068194.

Crossrefs

Cf. A000217, A080824, index of second term is in A082183.
Partial maxima have index in A068194.

Programs

  • Maple
    a:= proc(n) local h, j; h:= n*(n+1); for j from n+1 do
          if issqr(1+4*(j*(j+1)-h)) then return j fi od
        end:
    seq(a(n), n=2..70);  # Alois P. Heinz, Jul 31 2019
  • Mathematica
    a[n_] := Module[{h = n(n+1), j}, For[j = n+1, True, j++, If[IntegerQ[ Sqrt[1 + 4 (j(j+1) - h)]], Return[j]]]];
    a /@ Range[2, 70] (* Jean-François Alcover, Jun 05 2020, after Maple *)
  • PARI
    for(n=2, 100, t=n*(n+1)/2; for(k=1, 10^9, u=t+k*(k+1)/2; v=floor(sqrt(2*u)); if(v*(v+1)/2==u, print1(v", "); break)))

A332547 a(n) = largest odd divisor d < n of n*(n+1)/2.

Original entry on oeis.org

1, 1, 1, 1, 3, 3, 1, 3, 5, 5, 3, 3, 7, 7, 5, 1, 9, 9, 5, 15, 11, 11, 3, 15, 13, 13, 21, 7, 15, 15, 1, 11, 17, 17, 21, 9, 19, 19, 15, 5, 21, 21, 11, 33, 23, 23, 3, 21, 35, 25, 39, 13, 27, 45, 35, 21, 29, 29, 15, 15, 31, 31, 21, 13, 55, 33, 17, 51, 35, 35
Offset: 1

Views

Author

N. J. A. Sloane, Feb 21 2020

Keywords

Comments

Used by Michael J. Collins in the analysis of A082183 and A082184.

Crossrefs

Cf. A000217, A068194 (where a(n)=1), A082183, A082184, A332548, A332549 (where a(n)=3).

Programs

  • Mathematica
    Join[{1},Table[Select[Divisors[(n(n+1))/2],OddQ[#]&&#Harvey P. Dale, Jul 16 2024 *)

A072522 Smallest number a(n)>a(n-1) such that T(a(n-1))+T(a(n))=T(m) for some m, a(1)=3; T(i) are the triangular numbers.

Original entry on oeis.org

3, 5, 6, 9, 13, 44, 58, 854, 896, 1194, 1253, 1469, 1628, 2170, 2403, 3205, 3366, 3395, 4370, 4454, 4676, 6234, 6545, 6873, 9165, 9624, 12833, 17110, 17450, 18524, 24012, 25025, 25652, 28242, 37657, 356750, 400894, 420938, 561250, 1347002
Offset: 1

Views

Author

Amarnath Murthy, Jul 31 2002

Keywords

Crossrefs

Cf. A072521, A082183. Values of m are in A080824.

Programs

  • PARI
    p=3; print1("3, "); for(n=2, 50, t=p*(p+1)/2; for(k=p, 10^9, u=t+k*(k+1)/2; v=floor(sqrt(2*u)); if(v*(v+1)/2==u, print1(k", "); p=k; break)))

Extensions

Edited by Ralf Stephan, Mar 27 2003

A232178 Least k>=0 such that triangular(n) + k^2 is a square, or -1 if no such k exists.

Original entry on oeis.org

0, 0, 1, -1, -1, 1, 2, 6, 0, 2, 3, -1, -1, 3, 4, 1, 15, 4, 5, -1, -1, 5, 6, 20, 10, 6, 7, -1, -1, 7, 8, 27, 1, 8, 9, -1, -1, 9, 10, 2, 36, 10, 11, -1, -1, 11, 12, 41, 7, 0, 13, -1, -1, 13, 6, 24, 2, 14, 15, -1, -1, 15, 16, 3, 6, 8, 17, -1, -1, 17, 18, 62, 64, 18, 19
Offset: 0

Views

Author

Alex Ratushnyak, Nov 20 2013

Keywords

Comments

Triangular(n) = n*(n+1)/2.

Examples

			a(7) = 6 because the least k such that triangular(n) + k^2 is a square is k=6: 7*(7+1)/2 + 6^2 = 28+36 = 64 = 8^2.
		

Crossrefs

Cf. A082183 (least k>0 such that triangular(n) + triangular(k) is a triangular number).
Cf. A232177 (least k>0 such that triangular(n) + triangular(k) is a square).
Cf. A232176 (least k>0 such that n^2 + triangular(k) is a square).
Cf. A232179 (least k>=0 such that n^2 + triangular(k) is a triangular number).
Cf. A101157 (least k>0 such that triangular(n) + k^2 is a triangular number).

Programs

  • Mathematica
    Join[{0}, Table[k = 0; While[k < n && ! IntegerQ[Sqrt[n*(n + 1)/2 + k^2]], k++]; If[k == n, k = -1]; k, {n, 100}]] (* T. D. Noe, Nov 21 2013 *)
  • Python
    from _future_ import division
    from sympy import divisors
    def A232178(n):
        if n == 0:
            return 0
        t = n*(n+1)//2
        ds = divisors(t)
        l, m = divmod(len(ds),2)
        if m:
            return 0
        for i in range(l-1,-1,-1):
            x = ds[i]
            y = t//x
            a, b = divmod(y-x,2)
            if not b:
                return a
        return -1 # Chai Wah Wu, Sep 12 2017

A232179 Least k >= 0 such that n^2 + triangular(k) is a triangular number.

Original entry on oeis.org

0, 0, 3, 1, 15, 2, 0, 3, 63, 4, 8, 5, 11, 6, 20, 3, 255, 8, 1, 9, 3, 10, 38, 11, 59, 12, 45, 13, 8, 14, 2, 15, 1023, 16, 59, 0, 24, 18, 66, 19, 51, 20, 3, 21, 44, 10, 80, 23, 251, 24, 42, 25, 68, 26, 4, 27, 39, 28, 101, 29, 10, 30, 108, 8, 4095, 32, 5, 33, 128
Offset: 0

Views

Author

Alex Ratushnyak, Nov 20 2013

Keywords

Comments

Triangular(k) = k*(k+1)/2.

Crossrefs

Cf. A082183 (least k>0 such that triangular(n) + triangular(k) is a triangular number).
Cf. A232177 (least k>0 such that triangular(n) + triangular(k) is a square).
Cf. A232176 (least k>0 such that n^2 + triangular(k) is a square).
Cf. A101157 (least k>0 such that triangular(n) + k^2 is a triangular number).
Cf. A232178 (least k>=0 such that triangular(n) + k^2 is a square).

Programs

  • Mathematica
    TriangularQ[n_] := IntegerQ[Sqrt[1 + 8*n]]; Table[k = 0; While[! TriangularQ[n^2 + k*(k + 1)/2], k++]; k, {n, 0, 68}] (* T. D. Noe, Nov 21 2013 *)
  • PARI
    a(n) = {my(k = 0); while (! ispolygonal(n^2 + k*(k+1)/2, 3), k++); k;} \\ Michel Marcus, Sep 15 2017
  • Python
    from _future_ import division
    from sympy import divisors
    def A232179(n):
        if n == 0:
            return 0
        t = 2*n**2
        ds = divisors(t)
        for i in range(len(ds)//2-1,-1,-1):
            x = ds[i]
            y = t//x
            a, b = divmod(y-x,2)
            if b:
                return a
        return -1 # Chai Wah Wu, Sep 12 2017
    

Formula

a(A001109(n)) = 0.

A332543 a(n) = n + A332542(n) + 1.

Original entry on oeis.org

6, 12, 20, 10, 14, 56, 24, 15, 22, 33, 39, 26, 21, 48, 272, 34, 38, 76, 28, 33, 46, 69, 40, 50, 39, 36, 116, 58, 62, 992, 96, 51, 70, 45, 111, 74, 57, 65, 205, 82, 86, 172, 55, 69, 94, 141, 112, 70, 75, 68, 212, 106, 66, 77, 133, 87, 118, 177, 183, 122
Offset: 3

Views

Author

Scott R. Shannon, Feb 18 2020

Keywords

Comments

Note that A332542 is well-defined for all n. - N. J. A. Sloane, Feb 20 2020

Examples

			See A332542.
		

Crossrefs

Programs

Showing 1-10 of 16 results. Next