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

A068194 Numbers k for which the only representation of k*(k+1)/2 as a sum of 2 or more consecutive positive integers is 1+2+...+k.

Original entry on oeis.org

1, 2, 3, 4, 7, 16, 31, 127, 256, 8191, 65536, 131071, 524287, 2147483647, 2305843009213693951, 618970019642690137449562111, 162259276829213363391578010288127, 170141183460469231731687303715884105727
Offset: 1

Views

Author

Jon Perry, Feb 19 2002

Keywords

Comments

Consists of 1, Mersenne primes (A000668) and Fermat primes (A019434) minus 1. Proof: The sum of r consecutive integers starting with j is r*(r + 2*j - 1)/2, so k*(k+1)/2 has an extra representation of the desired form iff k*(k+1) = r*s where 1 < r, r+1 < s, and r and s have opposite parity. If k is even, let k = 2^e*m with m odd and let p be a prime divisor of k+1. Then we may take r = 2^e and s = m*(k+1) unless m=1 and we may take r = (k+1)/p and s = k*p unless k+1 is prime. Thus an even number k is in the sequence iff k+1 is a Fermat prime. Similarly an odd number k is in the sequence iff k=1 or k is a Mersenne prime.
Indices of partial maxima of A082184. - Ralf Stephan, Sep 01 2004
Consists of 1 and numbers m such that A001227(m) + A001227(m+1) = 3. - Juri-Stepan Gerasimov, Oct 06 2023

Examples

			k=6 gives 21, which has the 2 representations 1+2+...+6 and 10+11, so 6 is not in the sequence.
k=4 gives 10, whose only representation is 1+2+3+4, so 4 is in the sequence.
		

Crossrefs

A134459 is an essentially identical sequence.

Programs

  • Magma
    [1] cat [m: m in [2..10000] | #Divisors(m)/Valuation(2*m, 2)+
    #Divisors(m+1)/Valuation(2*(m+1),2) eq 3]; // Juri-Stepan Gerasimov, Oct 06 2023

Extensions

Edited by Dean Hickerson, Feb 22 2002

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)))
Showing 1-2 of 2 results.