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

A230044 Nonnegative numbers k such that k plus a perfect square is a triangular number.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 9, 10, 11, 12, 14, 15, 17, 19, 20, 21, 24, 27, 28, 29, 30, 32, 35, 36, 39, 41, 42, 44, 45, 46, 50, 51, 53, 54, 55, 56, 57, 62, 65, 66, 69, 71, 72, 74, 75, 77, 78, 80, 82, 84, 87, 89, 90, 91, 95, 96, 100, 101, 104, 105, 107, 109, 110, 111, 116, 117, 119, 120, 122, 126, 127, 128
Offset: 1

Views

Author

Ralf Stephan, Oct 06 2013

Keywords

Comments

Negative k are in A175035.
Numbers such that the Diophantine equation y^2 + y - 2x^2 = 2n, y > 0 has a solution. Empirically, solutions (x,y) don't exceed (5n,5n) for n < 10^5. Record quotients y/n are at n = 2, 3, 12, 45, 1225, 6806, ...
Conjecture: these are the sorted distinct terms of A064784.
n is in this sequence iff 8n+1 is in A035251, that is, every prime p == 3 or 5 (mod 8) dividing 8n+1 appears to an even power. - Max Alekseyev, Oct 14 2013

Examples

			28 is triangular, and 25 is a square <= 28, and 28-25=3, so 3 is in sequence.
		

Crossrefs

Programs

  • PARI
    B=bnfinit(z^2-8); is(n)=#bnfisintnorm(B,8*n+1) \\ Max Alekseyev, Oct 13 2013

A175032 a(n) is the difference between the n-th triangular number and the next perfect square.

Original entry on oeis.org

0, 0, 1, 3, 6, 1, 4, 8, 0, 4, 9, 15, 3, 9, 16, 1, 8, 16, 25, 6, 15, 25, 3, 13, 24, 36, 10, 22, 35, 6, 19, 33, 1, 15, 30, 46, 10, 26, 43, 4, 21, 39, 58, 15, 34, 54, 8, 28, 49, 0, 21, 43, 66, 13, 36, 60, 4, 28, 53, 79, 19, 45, 72, 9, 36, 64, 93, 26, 55, 85, 15, 45, 76, 3, 34, 66, 99, 22
Offset: 0

Views

Author

Ctibor O. Zizka, Nov 09 2009

Keywords

Comments

All terms are from {0} U A175035. No terms are from A175034.
The sequence consists of ascending runs of length 3 or 4. The first run starts at n = 1 and thereafter the k-th run starts at n = A214858(k - 1). - John Tyler Rascoe, Nov 05 2022

Crossrefs

Cf. sequences where a(m)=k: A001108 (0), A006451 (1), A154138 (3), A154139 (4), A154140 (6), A154141 (8), A154142 (9), A154143 (10), A154144 (13), A154145 (15), A154146 (16), A154147 (19), A154148 (21), A154149 (22), A154150(24), A154151 (25), A154151 (26), A154153(28), A154154 (30).

Programs

  • Mathematica
    Ceiling[Sqrt[#]]^2-#&/@Accumulate[Range[0,80]] (* Harvey P. Dale, Aug 25 2013 *)
  • PARI
    a(n) = my(t=n*(n+1)/2); if (issquare(t), 0, (sqrtint(t)+1)^2 - t); \\ Michel Marcus, Nov 06 2022

Formula

a(n) = (ceiling(sqrt(n*(n+1)/2)))^2 - n*(n+1)/2. - Ctibor O. Zizka, Nov 09 2009
a(n) = A080819(n) - A000217(n). - R. J. Mathar, Aug 24 2010

Extensions

Erroneous formula variant deleted and offset set to zero by R. J. Mathar, Aug 24 2010

A175034 Offsets i such that i + n*(n+1)/2 is never a perfect square for any n>0.

Original entry on oeis.org

2, 5, 7, 11, 12, 14, 17, 18, 20, 23, 27, 29, 31, 32, 37, 38, 40, 41, 42, 44, 47, 50, 51, 52, 56, 57, 59, 62, 65, 67, 68, 69, 70, 73, 74, 77, 82, 83, 84, 86, 87, 88, 92, 95, 96, 98, 101, 102, 104, 107, 109, 110, 112, 113, 117, 119, 122, 125, 126, 127, 128, 131, 132, 135, 137, 139
Offset: 1

Views

Author

Ctibor O. Zizka, Nov 10 2009

Keywords

Comments

Complement of A175035.

Crossrefs

Extensions

Extended by R. J. Mathar, Nov 26 2009

A335842 Nonnegative differences of positive cubes and positive tetrahedral numbers.

Original entry on oeis.org

0, 1, 4, 5, 7, 8, 17, 23, 26, 29, 31, 36, 41, 44, 49, 51, 54, 57, 60, 63, 68, 69, 77, 83, 90, 93, 96, 99, 105, 115, 121, 122, 123, 124, 132, 144, 148, 149, 151, 160, 169, 173, 178, 180, 181, 184, 188, 191, 196, 206, 211, 212, 215, 223, 226, 230, 258, 259, 274
Offset: 1

Views

Author

Ya-Ping Lu, Jun 26 2020

Keywords

Comments

The sequence is the difference between the cubic number (A000578) and the tetrahedral number (A000292) such that terms are of the form A000578(i) - A000292(j), where A000578(i) >= A000292(j) >= 0.
It appears that, for a(n) > 456, the number of terms up to a(n) in this sequence is smaller than the number of prime numbers less than or equal to a(n), or n < pi(a(n)), where pi is the prime counting function. See the figure attached in the Links section.

Examples

			a(1)=0 because c(1)-t(1) = 1-1 = 0;
a(2)=1 because c(11)-t(19) = 1331-1330 = 1;
a(5)=7 because c(2)-t(1) = 8-1 = 7, and c(3)-t(4) = 27-20 = 7;
a(18)=57 because c(7)-t(11) = 343-286 = 57, and c(8)-t(13) = 512-455 = 57;
a(26)=93 because c(2313)-t(4202) = 12374478297-12374478204 = 93.
		

Crossrefs

Programs

  • Python
    import math
    n_max = 10000000
    d_max = 10000
    list1 = []
    n = 1
    while n <= n_max:
      a_tetr = n*(n + 1)*(n + 2)//6
      m_min = math.floor(math.pow(a_tetr, 1/3))
      m = m_min
      a_cube_max = n*(n + 1)*(n + 2)//6 + d_max
      m_max = math.ceil(math.pow(a_cube_max, 1/3))
      while m <= m_max:
          a_cube = m**3
          d = a_cube - a_tetr
          if d >= 0 and d <= d_max and d not in list1:
              list1.append(d)
          m += 1
      n += 1
    list1.sort()
    print(list1)

Formula

The difference between the i-th cubic number, c(i), and j-th tetrahedral number, t(j), is d = i^3 - j*(j+1)*(j+2)/6, where i, j >=1 and c(i) >= t(j).

A365905 "2-peloton numbers": Numbers that appear at least twice in A365904.

Original entry on oeis.org

15, 36, 43, 49, 64, 66, 78, 85, 99, 100, 118, 120, 134, 141, 151, 159, 168, 169, 190, 204, 210, 211, 219, 225, 241, 246, 253, 256, 270, 274, 279, 283, 288, 295, 309, 321, 323, 325, 345, 351, 355, 358, 364, 372, 376, 379, 386, 393, 394, 400, 405, 406, 423, 429, 435, 438, 440, 456, 463, 474, 484, 498
Offset: 1

Views

Author

Joan Llobera Querol, Sep 22 2023

Keywords

Comments

Called "peloton" numbers after the original sequence idea in first link: the difference of a rhombus (a square number) and a triangular number, placed as points on a triangular grid, form the shape of a peloton in bicycle racing.
Contains all elements of A001110 other than 0 and 1.

Examples

			15 can be obtained as T(4,1) or T(5,4) following notation in A365904.
36 can be obtained as T(6,0) or T(8,7).
		

Crossrefs

Cf. A175035 (numbers appear at least once), A365904.

Programs

  • PARI
    isok(n) = sum(m=sqrtint(n), (sqrtint(8*n+1)-1)\2, ispolygonal(m^2-n,3)) > 1 \\ Andrew Howroyd, Sep 24 2023
    (Python/SageMath)
    nmax, m, Out = 300, 2, []
    Z = [ n^2 - (k^2 + k)/2 for n in [2..nmax] for k in [0..n-1] ]
    for i in Z:
        if Z.count(i) >= m: Out.append(i)
    Out=sorted(list(set(Out)))
    for j in [1..10000]: print(j+1, Out[j])
    \\ Eric Snyder, Sep 29 2023

A326917 Nonnegative numbers of the form 8*T(x) - T(y) with 0 <= x, 0 <= y, where T() denotes a triangular number.

Original entry on oeis.org

0, 2, 3, 5, 7, 8, 9, 12, 14, 15, 18, 20, 21, 23, 24, 25, 27, 29, 32, 33, 34, 35, 38, 42, 44, 45, 47, 48, 52, 53, 54, 57, 59, 60, 62, 63, 65, 70, 71, 74, 75, 77, 78, 79, 80, 84, 88, 89, 90, 92, 93, 96, 98, 99, 102, 104, 105, 107, 110, 113, 114, 115, 117, 119
Offset: 1

Views

Author

Ralf Steiner, Oct 21 2019

Keywords

Comments

When incremented by 1 this is also the difference between an odd square (1 + 8*T) and a triangular number T.

Examples

			8*A000217(1) - A000217(2) = 8*1 - 3 = 5 = a(4).
		

Crossrefs

Cf. A000217 (T), A175035, A016754 (odd squares).

Programs

  • Mathematica
    T[n_] := n (n + 1)/2;Select[Union[Flatten[Table[8 T[x] - T[y], {x, 0, 15}, {y, 0, 100}]]],115 >= # >= 0 &]

Formula

a(n) = A175035(n) - 1.
Showing 1-6 of 6 results.