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.

Previous Showing 31-40 of 4812 results. Next

A014134 Numbers that are not the sum of a square (A000290) and a triangular number (A000217).

Original entry on oeis.org

8, 13, 18, 20, 23, 27, 33, 34, 38, 41, 43, 47, 48, 58, 60, 62, 63, 68, 69, 73, 76, 83, 86, 88, 89, 90, 93, 97, 98, 99, 108, 111, 112, 113, 118, 123, 125, 132, 133, 134, 135, 138, 139, 143, 146, 148, 151, 158, 160, 163, 164, 167, 168, 173, 174
Offset: 1

Views

Author

Keywords

Comments

n is in the sequence if for some prime p == 5 or 7 (mod 8), 8*n+1 is divisible by p but not by p^2. The first member of the sequence that does not have this property is 16078. - Robert Israel, Mar 17 2015

Crossrefs

Cf. A140867.

Programs

  • Maple
    N:= 1000: # to generate all terms <= N
    {$1 .. N} minus {seq(seq(x*(x+1)/2 + y^2, y = 0 .. floor(sqrt(N - x*(x+1)/2))),
    x = 0 .. floor((sqrt(8*N+1)-1)/2))};
    # if using Maple 11 or earlier, uncomment the next line
    # sort(convert(%,list)); # Robert Israel, Mar 17 2015
  • Mathematica
    fQ[n_] := Block[{k = 0, lmt = 1 + Floor@ Sqrt@ n}, While[k < lmt && !IntegerQ@ Sqrt[ 8(n - k^2) + 1], k++]; k == lmt]; Select[ Range@ 175, fQ@# &] (* Robert G. Wilson v, Nov 29 2015 *)
  • PARI
    is_A014134(n)=for(k=0,sqrtint(n*2),issquare(n-k*(k+1)/2)&return);1 /* M. F. Hasler, Jan 05 2009 */

A028401 The (2^n+1)-th triangular number (cf. A000217).

Original entry on oeis.org

3, 6, 15, 45, 153, 561, 2145, 8385, 33153, 131841, 525825, 2100225, 8394753, 33566721, 134242305, 536920065, 2147581953, 8590131201, 34360131585, 137439739905, 549757386753, 2199026401281, 8796099313665, 35184384671745
Offset: 2

Views

Author

Keywords

Comments

Number of types of Boolean functions of n variables under a certain group.
Also the number of ordered decompositions of 2^n into 3 nonnegative integers (e.g., 2 = 0+0+2 = 0+2+0 = 2+0+0 = 1+1+0 = 1+0+1 = 0+1+1). - Tamas Kalmar-Nagy (integers(AT)kalmarnagy.com), Aug 02 2007

Crossrefs

Equals 2*A036562(n-4) - 1, n > 3.
Cf. A000217.

Programs

  • Mathematica
    Drop[#, 2] &@ CoefficientList[Series[3 x^2*(1 - 5 x + 5 x^2)/((1 - x) (1 - 2 x) (1 - 4 x)), {x, 0, 25}], x] (* Michael De Vlieger, Jul 08 2019 *)
  • Python
    def A028401(n): return ((m:=1<2 else 3 # Chai Wah Wu, Jul 11 2024

Formula

From Ralf Stephan, Aug 23 2003: (Start)
a(n) = (3/8)*2^n + (1/32)*4^n + 1.
a(n) = 3*A007581(n-2) = (3/4)*A060919(n-1). (End)
a(n) = (2^n+4)*(2^n+8)/32. - Tamas Kalmar-Nagy (integers(AT)kalmarnagy.com), Aug 02 2007
G.f.: 3*x^2*(1-5*x+5*x^2)/((1-x)*(1-2*x)*(1-4*x)). - Colin Barker, Mar 09 2012
a(n) = a(n-1) + 3*A000217(2^(n-3)) for n > 2. - Daniel Poveda Parrilla, Dec 27 2016
E.g.f.: (32*exp(x) + 12*exp(2*x) + exp(4*x) - 45 - 60*x)/32. - Stefano Spezia, Jul 11 2024

Extensions

More terms from Vladeta Jovovic, Feb 24 2000
Simpler definition from Tamas Kalmar-Nagy (integers(AT)kalmarnagy.com), Aug 02 2007

A058498 Number of solutions to c(1)t(1) + ... + c(n)t(n) = 0, where c(i) = +-1 for i>1, c(1) = t(1) = 1, t(i) = triangular numbers (A000217).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 1, 2, 0, 6, 8, 13, 0, 33, 52, 105, 0, 310, 485, 874, 0, 2974, 5240, 9488, 0, 30418, 55715, 104730, 0, 352467, 642418, 1193879, 0, 4165910, 7762907, 14493951, 0, 50621491, 95133799, 179484713, 0, 637516130, 1202062094, 2273709847, 0, 8173584069
Offset: 1

Views

Author

Naohiro Nomoto, Dec 20 2000

Keywords

Examples

			a(8) = 2 because there are two solutions: 1 - 3 + 6 + 10 + 15 - 21 + 28 - 36 = 1 - 3 - 6 + 10 - 15 + 21 + 28 - 36 = 0.
		

Crossrefs

Cf. A000217.

Programs

  • Maple
    b:= proc(n, i) option remember; local m; m:= (2+(3+i)*i)*i/6;
          `if`(n>m, 0, `if`(n=m, 1,
          b(abs(n-i*(i+1)/2), i-1) +b(n+i*(i+1)/2, i-1)))
        end:
    a:= n-> `if`(irem(n, 4)=1, 0, b(n*(n+1)/2, n-1)):
    seq(a(n), n=1..40);  # Alois P. Heinz, Oct 31 2011
  • Mathematica
    b[n_, i_] := b[n, i] = With[{m = (2+(3+i)*i)*i/6}, If[n>m, 0, If[n == m, 1, b[Abs[n - i*(i+1)/2], i-1] + b[n + i*(i+1)/2, i-1]]]]; a[n_] := If[Mod[n, 4] == 1, 0, b[n*(n+1)/2, n-1]]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Jan 30 2017, after Alois P. Heinz *)

Formula

a(n) = [x^(n*(n+1)/2)] Product_{k=1..n-1} (x^(k*(k+1)/2) + 1/x^(k*(k+1)/2)). - Ilya Gutkovskiy, Feb 01 2024

Extensions

More terms from Sascha Kurz, Oct 13 2001
More terms from Alois P. Heinz, Oct 31 2011

A113231 Ascending descending base exponent transform of triangular numbers (A000217).

Original entry on oeis.org

1, 4, 34, 956, 106721, 75818480, 490656737694, 22960404169011552, 7141530219670856270919, 20319415706020976355219258316, 1104797870481014132439711155738991604
Offset: 1

Views

Author

Jonathan Vos Post, Jan 07 2006

Keywords

Comments

A003101 is the ascending descending base exponent transform of natural numbers A000027. The ascending descending base exponent transform applied to the Fibonacci numbers is A113122; applied to the tribonacci numbers is A113153; applied to the Lucas numbers is A113154. Since the parity of the triangular numbers cycles odd, odd, even, even; the parity of this sequence cycles odd, even, even, even. The smallest prime in this sequence is a(5) = 127601. What is the next prime? What is the first triangular value?

Examples

			a(1) = 1 because T(1)^T(1) = 1^1 = 1.
a(2) = 4 because T(1)^T(2) + T(2)^T(1) = 1^3 + 3^1 = 4.
a(3) = 34 = 1^6 + 3^3 + 6^1.
a(4) = 956 = 1^10 + 3^6 + 6^3 + 10^1.
a(5) = 106721 = 1^15 + 3^10 + 6^6 + 10^3 + 15^1.
a(6) = 75818480 = 1^21 + 3^15 + 6^10 + 10^6 + 15^3 + 21^1.
a(7) = 490656737694 = 1^28 + 3^21 + 6^15 + 10^10 + 15^6 + 21^3 + 28^1.
a(8) = 22960404169011552 = 1^36 + 3^28 + 6^21 + 10^15 + 15^10 + 21^6 + 28^3 + 36^1.
a(9) = 7141530219670856270919 = 1^45 + 3^36 + 6^28 + 10^21 + 15^15 + 21^10 + 28^6 + 36^3 + 45^1.
		

Crossrefs

Programs

  • Mathematica
    A000217[n_] := Binomial[n + 1, 2]; Table[Sum[A000217[k]^(A000217[n - k + 1]), {k, 1, n}], {n, 1, 10}] (* G. C. Greubel, May 18 2017 *)
  • PARI
    for(n=1,10, print1(sum(k=1,n, (binomial(k+1,2))^(binomial(n-k+2,2))), ", ")) \\ G. C. Greubel, May 18 2017

Formula

a(n) = Sum_{i=1..n} (T(i))^(T(n-i+1)), where T(n) are the triangle numbers.
a(n) = Sum_{i=1..n} ((i*(i+1)/2))^((n-i+1)*(n-i+2)/2).
a(n) = Sum_{i=1..n} (A000217(i))^(A000217(n-i+1)).
log(a(n)) ~ n^2 * (-1 + 2*LambertW(2^(-3/2)*exp(1/2)*n))^3 / (8*LambertW(2^(-3/2)*exp(1/2)*n)^2). - Vaclav Kotesovec, Jun 07 2025

A165517 Indices of the least triangular numbers (A000217) for which three consecutive triangular numbers sum to a perfect square (A000290).

Original entry on oeis.org

0, 5, 14, 63, 152, 637, 1518, 6319, 15040, 62565, 148894, 619343, 1473912, 6130877, 14590238, 60689439, 144428480, 600763525, 1429694574, 5946945823, 14152517272, 58868694717, 140095478158, 582740001359, 1386802264320
Offset: 1

Views

Author

Ant King, Sep 25 2009, Oct 01 2009

Keywords

Comments

Those perfect squares that can be expressed as the sum of three consecutive triangular numbers correspond to integer solutions of the equation T(k)+T(k+1)+T(k+2)=s^2, or equivalently to 3k^2 + 9k + 8 = 2s^2. Hence solutions occur whenever (3k^2 + 9k + 8)/2 is a perfect square, or equivalently when s>=2 and sqrt(24s^2 - 15) is congruent to 3 mod 6. This sequence returns the index of the smallest of the 3 triangular numbers, the values of s^2 are given in A165516 and, with the exception of the first term, the values of s are in A129445.

Examples

			The fourth perfect square that can be expressed as the sum of three consecutive triangular numbers is 6241 = T(63) + T(64) + T(65). Hence a(4)=63.
		

Crossrefs

Programs

  • Magma
    I:=[0, 5, 14, 63, 152]; [n le 5 select I[n] else Self(n-1) + 10*Self(n-2) - 10*Self(n-3) - Self(n-4) + Self(n-5): n in [1..50]]; // G. C. Greubel, Oct 21 2018
  • Mathematica
    TriangularNumber[ n_ ]:=1/2 n (n+1);Select[ Range[ 0,10^7 ], IntegerQ[ Sqrt[ TriangularNumber[ # ]+TriangularNumber[ #+1 ]+TriangularNumber[ #+2 ] ] ] & ]
    CoefficientList[Series[x*(x^3 + x^2 - 9*x - 5)/((x - 1)*(x^4 - 10*x^2 + 1)), {x,0,50}], x] (* or *) LinearRecurrence[{1,10,-10,-1,1}, {0, 5, 14, 63, 152}, 50] (* G. C. Greubel, Feb 17 2017 *)
  • PARI
    x='x+O('x^50); concat([0], Vec(x*(x^3 + x^2 - 9*x - 5)/((x - 1)*(x^4 - 10*x^2 + 1)))) \\ G. C. Greubel, Feb 17 2017
    

Formula

a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) - a(n-4) + a(n-5).
G.f.: x(x^3 + x^2 - 9x - 5)/((x-1)(x^4 - 10x^2 + 1)).
a(n) = 10*a(n-2) - a(n-4) + 12. - Zak Seidov, Sep 25 2009

Extensions

a(1) = 0 added by N. J. A. Sloane, Sep 28 2009, at the suggestion of Alexander R. Povolotsky
More terms from Zak Seidov, Sep 25 2009

A232096 a(n) = largest m such that m! divides 1+2+...+n; a(n) = A055881(A000217(n)).

Original entry on oeis.org

1, 1, 3, 2, 1, 1, 2, 3, 1, 1, 3, 3, 1, 1, 5, 2, 1, 1, 2, 3, 1, 1, 3, 3, 1, 1, 3, 2, 1, 1, 2, 4, 1, 1, 3, 3, 1, 1, 3, 2, 1, 1, 2, 3, 1, 1, 4, 4, 1, 1, 3, 2, 1, 1, 2, 3, 1, 1, 3, 3, 1, 1, 4, 2, 1, 1, 2, 3, 1, 1, 3, 3, 1, 1, 3, 2, 1, 1, 2, 5, 1, 1, 3, 3, 1, 1, 3
Offset: 1

Views

Author

Antti Karttunen, Nov 18 2013

Keywords

Crossrefs

A042963 gives the positions of ones and A014601 the positions of larger terms.

Programs

Formula

a(n) = A055881(A000217(n)).
a(n) = A231719(A226061(n+1)). [Not a practical way to compute this sequence, but follows from the definitions]

A333516 Irregular triangle read by rows in which row n lists the first A000217(n) terms of A002260, n >= 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6
Offset: 1

Views

Author

Andrew Slattery, Mar 25 2020

Keywords

Comments

a(n) equals the difference between n and the largest number less than n that can be expressed as the sum of the i-th triangular number and the j-th tetrahedral number for integers i < j.

Examples

			Triangle begins:
  1;
  1, 1, 2;
  1, 1, 2, 1, 2, 3;
  1, 1, 2, 1, 2, 3, 1, 2, 3, 4;
  1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5;
  1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6;
  1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7;
  ...
		

Crossrefs

Row sums give A000292.
Right border gives A000027.

Programs

  • Maple
    T:= n-> seq([$1..i][], i=1..n):
    seq(T(n), n=1..7);  # Alois P. Heinz, Apr 10 2020
  • Python
    from math import comb, isqrt
    from sympy import integer_nthroot
    def A333516(n): return (r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(n>comb(m+2,3))+1,3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)),2)+1 # Chai Wah Wu, Nov 10 2024

Formula

a(n) = A002260(A124171(n)).

A383834 Sum of the legs of the unique primitive Pythagorean triple whose inradius is A000217(n) and such that its long leg and its hypotenuse are consecutive natural numbers.

Original entry on oeis.org

1, 7, 31, 97, 241, 511, 967, 1681, 2737, 4231, 6271, 8977, 12481, 16927, 22471, 29281, 37537, 47431, 59167, 72961, 89041, 107647, 129031, 153457, 181201, 212551, 247807, 287281, 331297, 380191, 434311, 494017, 559681, 631687, 710431, 796321, 889777, 991231, 1101127, 1219921, 1348081
Offset: 0

Views

Author

Keywords

Examples

			For n=1, the short leg is A002061(1) = 3 and the long leg is A212135(2) = 4 so the sum of the legs is then a(1) = 3 + 4 = 7.
		

References

  • Miguel Ángel Pérez García-Ortega, José Manuel Sánchez Muñoz and José Miguel Blanco Casado, El Libro de las Ternas Pitagóricas, Preprint 2025.

Crossrefs

Programs

  • Mathematica
    a=Table[(n(n+1))/2,{n,0,40}];Apply[Join,Map[{2#^2+4#+1}&,a]]

Formula

a(n) = 2*(A000217(n))^2 + 4*A000217(n) + 1.
a(n) = 6*A006007(n) + 1

A190405 Decimal expansion of Sum_{k>=1} (1/2)^T(k), where T=A000217 (triangular numbers); based on column 1 of the natural number array, A000027.

Original entry on oeis.org

6, 4, 1, 6, 3, 2, 5, 6, 0, 6, 5, 5, 1, 5, 3, 8, 6, 6, 2, 9, 3, 8, 4, 2, 7, 7, 0, 2, 2, 5, 4, 2, 9, 4, 3, 4, 2, 2, 6, 0, 6, 1, 5, 3, 7, 9, 5, 6, 7, 3, 9, 7, 4, 7, 8, 0, 4, 6, 5, 1, 6, 2, 2, 3, 8, 0, 1, 4, 4, 6, 0, 3, 7, 3, 3, 3, 5, 1, 7, 7, 5, 6, 0, 0, 3, 6, 4, 1, 7, 1, 6, 2, 3, 3, 5, 9, 1, 3, 3, 0, 8, 6, 0, 8, 9, 7, 3, 5, 3, 1, 6, 3, 4, 3, 6, 1, 9, 4, 6, 1
Offset: 0

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

See A190404.
Binary expansion is .1010010001... (A023531). - Rick L. Shepherd, Jan 05 2014
From Amiram Eldar, Dec 07 2020: (Start)
This constant is not a quadratic irrational (Duverney, 1995).
The Engel expansion of this constant are the powers of 2 (A000079) above 1. (End)

Examples

			0.64163256065515386629...
		

Crossrefs

A190404: (1/2)(1 + Sum_{k>=1} (1/2)^T(k)), where T = A000217 (triangular numbers).
A190405: Sum_{k>=1} (1/2)^T(k), where T = A000217 (triangular numbers).
A190406: Sum_{k>=1} (1/2)^S(k-1), where S = A001844 (centered square numbers).
A190407: Sum_{k>=1} (1/2)^V(k), where V = A058331 (1 + 2*k^2).
Cf. A000079.

Programs

  • Mathematica
    RealDigits[EllipticTheta[2, 0, 1/Sqrt[2]]/2^(7/8) - 1, 10, 120] // First (* Jean-François Alcover, Feb 12 2013 *)
    RealDigits[Total[(1/2)^Accumulate[Range[50]]],10,120][[1]] (* Harvey P. Dale, Oct 18 2013 *)
    (* See also A190404 *)
  • PARI
    th2(x)=2*x^.25 + 2*suminf(n=1,x^(n+1/2)^2)
    th2(sqrt(.5))/2^(7/8)-1 \\ Charles R Greathouse IV, Jun 06 2016
  • Sage
    def A190405(b):  # Generate the constant with b bits of precision
        return N(sum([(1/2)^(j*(j+1)/2) for j in range(1,b)]),b)
    A190405(409) # Danny Rorabaugh, Mar 25 2015
    

A276600 Values of m such that m^2 + 6 is a triangular number (A000217).

Original entry on oeis.org

0, 2, 3, 7, 15, 20, 42, 88, 117, 245, 513, 682, 1428, 2990, 3975, 8323, 17427, 23168, 48510, 101572, 135033, 282737, 592005, 787030, 1647912, 3450458, 4587147, 9604735, 20110743, 26735852, 55980498, 117214000, 155827965, 326278253, 683173257, 908231938
Offset: 1

Views

Author

Colin Barker, Sep 07 2016

Keywords

Comments

2*a(n+2) gives the y members of all positive solutions (x(n), y(n)), proper and improper, of the Pell equation x^2 - 2*y^2 = 7^2, n >= 0. The corresponding x members are x(n) = A106525(n). - Wolfdieter Lang, Sep 29 2016

Examples

			7 is in the sequence because 7^2 + 6 = 55, which is a triangular number.
		

Crossrefs

Cf. A001109 (k=0), A106328 (k=1), A077241 (k=2), A276598 (k=3), A276599 (k=5), A276601 (k=9), A276602 (k=10), where k is the value added to n^2.

Programs

  • Magma
    I:=[0,2,3,7,15,20]; [n le 6 select I[n] else 6*Self(n-3) - Self(n-6): n in [1..41]]; // G. C. Greubel, Sep 15 2021
    
  • Mathematica
    LinearRecurrence[{0,0,6,0,0,-1}, {0,2,3,7,15,20}, 41] (* G. C. Greubel, Sep 15 2021 *)
  • PARI
    concat(0, Vec(x^2*(2+3*x+7*x^2+3*x^3+2*x^4)/(1-6*x^3+x^6) + O(x^40)))
    
  • Sage
    def A276600_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x^2*(2+3*x+7*x^2+3*x^3+2*x^4)/(1-6*x^3+x^6) ).list()
    a=A276600_list(41); a[1:] # G. C. Greubel, Sep 15 2021

Formula

a(n) = 6*a(n-3) - a(n-6) for n>6.
G.f.: x^2*(2 + 3*x + 7*x^2 + 3*x^3 + 2*x^4)/(1 - 6*x^3 + x^6).
From Wolfdieter Lang, Sep 29 2016: (Start)
Trisection:
a(2+3*n) = 15*S(n-1,6) - 2*S(n-2,6) = A275794(n),
a(3+3*n) = 20*S(n-1,6) - 3*S(n-2,6) = A275796(n),
a(4+3*n) = 7*(6*S(n-1,6) - S(n-2,6)) = 7*A001109(n+1) for n >= 0, with the Chebyshev polynomials S(n, 6) = A001109(n+1), n >= -1, with S(-2, 6) = -1.
(End)
Previous Showing 31-40 of 4812 results. Next