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 41-50 of 57 results. Next

A182427 Triangular numbers that can be represented as a sum of a nonzero square number and a nonzero triangular number.

Original entry on oeis.org

10, 15, 28, 45, 55, 91, 136, 190, 210, 231, 253, 325, 378, 406, 435, 496, 561, 595, 666, 703, 741, 820, 861, 903, 946, 990, 1081, 1128, 1176, 1225, 1378, 1431, 1540, 1596, 1711, 1770, 1830, 1891, 2080, 2145, 2211, 2278, 2346, 2415, 2485, 2556, 2701, 2926, 3160, 3321
Offset: 1

Views

Author

Ivan N. Ianakiev, Apr 28 2012

Keywords

Comments

Theorem (by Ivan N. Ianakiev): There are infinitely many such numbers. Proof: Any triangular number of the form A000217(n^2) for n>1 is such a number, as A000217(n^2) = A000217(n^2-1) + A000290(n), for n>=1. Observation: Other numbers not of the form A000217(n^2), for example 15 and 28, are also in A182427. - Ivan N. Ianakiev, May 30 2012
For any integer k>1, all triangular numbers with indices of the form 3*k-2 (A060544) are terms as (3*k-2)*(3*k-1)/2 = (2*k-1)^2 + (k-1)*k/2. - Ivan N. Ianakiev, Nov 25 2015

Examples

			10, 15, 28 are in the sequence because 10 = 2^2 + 3*4/2 = 3^2 + 1*2/2, 15 = 3^2 + 3*4/2, 28 = 5^2 + 2*3/2.
		

Crossrefs

Programs

  • PARI
    isok(t) = {for (k=1, sqrtint(t), my(tt = t - k^2); if ((tt) && ispolygonal(tt, 3), return (1)););}
    lista(nn) = {for (n=1, nn, my(t = n*(n+1)/2); if (isok(t), print1(t, ", ")););} \\ Michel Marcus, Nov 25 2015

A188621 Smallest number k>1 such that k*(n-th triangular number) is also a triangular number.

Original entry on oeis.org

3, 2, 6, 12, 3, 5, 42, 56, 14, 18, 8, 10, 33, 2, 27, 240, 60, 68, 15, 3, 13, 105, 61, 67, 138, 150, 47, 51, 24, 26, 930, 117, 21, 6, 40, 66, 315, 41, 7, 231, 35, 37, 118, 5, 83, 495, 220, 230, 564, 55, 28, 147, 663, 98, 10, 50, 92, 798, 221, 229, 885, 12, 741, 615
Offset: 1

Views

Author

Zak Seidov, Apr 06 2011

Keywords

Comments

There is a sequence of triangular numbers >3 which are not divisible by any smaller triangular number > 1, primitive triangular numbers in that sense: 3, 10, 28, 55, 91, 136, 253.... whose indices are in A137281.
(This is apparently a subsequence of A060544. - R. J. Mathar, Apr 06 2011)

Examples

			a(1)=3 because A000217(1)=1, 3*1 is triangular and k*1 for 1<k<3 is not triangular.
a(2)=2 because A000217(2)=3, 2*3 is triangular and k*3 for 1<k<2 (empty condition) is not triangular.
a(3)=6 because A000217(3)=6, 6*6 is triangular and k*6 for 1<k<6 is not triangular.
a(1000)=153 because A000217(1000)=500500, 153*500500=76576500 is triangular and k*500500 for 1<k<153 is not triangular.
		

Crossrefs

Programs

  • Mathematica
    TriangularQ[n_] := IntegerQ[Sqrt[1 + 8 n]]; Table[t = (n + 1)*n/2; k = 2; While[! TriangularQ[k*t], k++]; k, {n, 100}] (* T. D. Noe, Apr 06 2011 *)
    snk[n_]:=Module[{k=2},While[!OddQ[Sqrt[8k*n+1]],k++];k]; snk/@Accumulate[ Range[ 70]] (* Harvey P. Dale, Apr 29 2018 *)

Formula

a(n) = A068084(n)/A000217(n).

A249348 a(n) = (A001147(n+1)^2-1)/8, where A001147(n+1) = 3*5*...*(2n+1).

Original entry on oeis.org

0, 1, 28, 1378, 111628, 13507003, 2282683528, 513603793828, 148431496416328, 53583770206294453, 23630442660975853828, 12500504167656226675078, 7812815104785141671923828, 5695542211388368278832470703, 4789950999777617722498107861328
Offset: 0

Views

Author

M. F. Hasler, Oct 26 2014

Keywords

Comments

These are the numerators of the partial sums S(n) = Sum_{k=1..n} A000217(k)/A001147(k+1)^2 before simplification, i.e., a(n) = S(n)*A001147(n+1)^2, where A000217(n) = n(n+1)/2. The series S(n) has sum 1/8, actually S(n) = 1/8 - 1/(8*A001147(n+1)^2). (Similarly, Sum_{n=1..oo} A249354(n)/A007559(n+1)^3 = 1/9, where A249354(n) = 3n^3+3n^2+n.)
This is a subsequence of the centered 9-gonal numbers A060544, which are a subsequence of the triangular numbers A000217.

Programs

  • Maple
    A249348 := proc(n)
        (doublefactorial(2*n+1)^2-1)/8 ;
    end proc:
    seq(A249348(n),n=0..20) ;
  • PARI
    a(n)=(prod(k=1,n,2*k+1)^2-1)/8

Formula

(-n+1)*a(n) +2*n*(2*n^2-1)*a(n-1) -(n+1)*(-1+2*n)^2*a(n-2)=0. - R. J. Mathar, Oct 28 2014

Extensions

a(11)/a(12) corrected by Georg Fischer, Mar 12 2020

A302537 a(n) = (n^2 + 13*n + 2)/2.

Original entry on oeis.org

1, 8, 16, 25, 35, 46, 58, 71, 85, 100, 116, 133, 151, 170, 190, 211, 233, 256, 280, 305, 331, 358, 386, 415, 445, 476, 508, 541, 575, 610, 646, 683, 721, 760, 800, 841, 883, 926, 970, 1015, 1061, 1108, 1156, 1205, 1255, 1306, 1358, 1411, 1465, 1520, 1576
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of [1, 7, 1, 0, 0, 0, ...].
Numbers m > 0 such that 8*m + 161 is a square.

Examples

			Illustration of initial terms (by the formula a(n) = A052905(n) + 3*n):
.                                                                    o
.                                                                  o o
.                                                    o           o o o
.                                                  o o         o o o o
.                                      o         o o o       o o o o o
.                                    o o       o o o o     o o o o o o
.                          o       o o o     o o o o o   o . . . . . o
.                        o o     o o o o   o . . . . o   o . . . . . o
.                o     o o o   o . . . o   o . . . . o   o . . . . . o
.              o o   o . . o   o . . . o   o . . . . o   o . . . . . o
.        o   o . o   o . . o   o . . . o   o . . . . o   o . . . . . o
.      o o   o . o   o . . o   o . . . o   o . . . . o   o . . . . . o
.  o   o o   o o o   o o o o   o o o o o   o o o o o o   o o o o o o o
.        o     o o     o o o     o o o o     o o o o o     o o o o o o
.        o     o o     o o o     o o o o     o o o o o     o o o o o o
.        o     o o     o o o     o o o o     o o o o o     o o o o o o
----------------------------------------------------------------------
.  1     8      16        25          35            46              58
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics: A Foundation for Computer Science, Addison-Wesley, 1994.

Crossrefs

Sequences whose n-th terms are of the form binomial(n, 2) + n*k + 1:
A152947 (k = 0); A000124 (k = 1); A000217 (k = 2); A034856 (k = 3);
A052905 (k = 4); A051936 (k = 5); A246172 (k = 6).

Programs

  • Magma
    A302537:= func< n | ((n+1)^2 +12*n +1)/2 >;
    [A302537(n): n in [0..50]]; // G. C. Greubel, Jan 21 2025
    
  • Maple
    a := n -> (n^2 + 13*n + 2)/2;
    seq(a(n), n = 0 .. 100);
  • Mathematica
    Table[(n^2 + 13 n + 2)/2, {n, 0, 100}]
    CoefficientList[ Series[(5x^2 - 5x - 1)/(x - 1)^3, {x, 0, 50}], x] (* or *)
    LinearRecurrence[{3, -3, 1}, {1, 8, 16}, 51] (* Robert G. Wilson v, May 19 2018 *)
  • Maxima
    makelist((n^2 + 13*n + 2)/2, n, 0, 100);
    
  • PARI
    a(n) = (n^2 + 13*n + 2)/2; \\ Altug Alkan, Apr 12 2018
    
  • Python
    def A302537(n): return (n**2 + 13*n + 2)//2
    print([A302537(n) for n in range(51)]) # G. C. Greubel, Jan 21 2025

Formula

a(n) = binomial(n + 1, 2) + 6*n + 1 = binomial(n, 2) + 7*n + 1.
a(n) = a(n-1) + n + 6.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 3, where a(0) = 1, a(1) = 8 and a(2) = 16.
a(n) = 2*a(n-1) - a(n-2) + 1.
a(n) = A004120(n+1) for n > 1.
a(n) = A056119(n) + 1.
a(n) = A152947(n+1) + A008589(n).
a(n) = A060544(n+1) - A002939(n).
a(n) = A000578(n+1) - A162261(n) for n > 0.
G.f.: (1 + 5*x - 5*x^2)/(1 - x)^3.
E.g.f.: (1/2)*(2 + 14*x + x^2)*exp(x).
Sum_{n>=0} 1/a(n) = 24097/45220 + 2*Pi*tan(sqrt(161)*Pi/2) / sqrt(161) = 1.4630922534498496... - Vaclav Kotesovec, Apr 11 2018

A061793 a(n) = 25*n*(n + 1)/2 + 3.

Original entry on oeis.org

3, 28, 78, 153, 253, 378, 528, 703, 903, 1128, 1378, 1653, 1953, 2278, 2628, 3003, 3403, 3828, 4278, 4753, 5253, 5778, 6328, 6903, 7503, 8128, 8778, 9453, 10153, 10878, 11628, 12403, 13203, 14028, 14878, 15753, 16653, 17578, 18528, 19503, 20503, 21528, 22578, 23653
Offset: 0

Views

Author

Jason Earls, Jun 22 2001

Keywords

Comments

"If m is a triangular number, then so are 9*m+1, 25*m+3 and 49*m+6. (Euler, 1775)", see Burton in References. Note that A060544 is the same as 9*m+1 when m is triangular and that 9*(m*(m+1)/2)+1 is another formula for it.
9*m+1, 25*m+3 and 49*m+6 are special cases of the identity A000290(2*r + 1)*A000217(s) + A000217(r) = A000217((2*r + 1)*s + r). - Bruno Berselli, Mar 01 2018
Complementing the previous comment, with T(n) = A000217(n), 4*T(s)+1+s = T(2*s+1), 16*T(s)+3+2s = T(4*s+2) and 36*T(s)+6+3s = T(6*s+3) are special cases of the identity A000290(2*r)*T(s) + T(r) + r*s = T(2*r*s + r). - Charlie Marion, Mar 28 2018

References

  • D. M. Burton, Elementary Number Theory, Allyn and Bacon, Inc. Boston, MA, 1976, p. 17.

Crossrefs

Programs

  • GAP
    List([0..40],n->25*(n*(n+1)/2)+3); # Muniru A Asiru, Mar 30 2018
  • Maple
    [seq(25*(n*(n+1)/2)+3,n=0..40)]; # Muniru A Asiru, Mar 30 2018
  • Mathematica
    25*Accumulate[Range[0,40]]+3 (* Harvey P. Dale, Aug 26 2013 *)
  • PARI
    a(n) = 25*n*(n + 1)/2 + 3
    

Formula

a(n) = 25*A000217(n) + 3 = A123296(n) + 3.
From Elmo R. Oliveira, Oct 23 2024: (Start)
G.f.: (3 + 19*x + 3*x^2)/(1 - x)^3.
E.g.f.: (3 + 25*x + 25*x^2/2)*exp(x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 3. (End)

Extensions

Corrected by T. D. Noe, Oct 25 2006

A081275 Shallow diagonal of triangular spiral in A051682.

Original entry on oeis.org

1, 31, 97, 199, 337, 511, 721, 967, 1249, 1567, 1921, 2311, 2737, 3199, 3697, 4231, 4801, 5407, 6049, 6727, 7441, 8191, 8977, 9799, 10657, 11551, 12481, 13447, 14449, 15487, 16561, 17671, 18817, 19999, 21217, 22471, 23761, 25087, 26449, 27847, 29281, 30751, 32257
Offset: 0

Views

Author

Paul Barry, Mar 15 2003

Keywords

Comments

Reflection of A060544 in the horizontal A051682.
Binomial transform of (1, 30, 36, 0, 0, 0, ...).

Crossrefs

Programs

  • Mathematica
    Table[30Binomial[n,1]+36Binomial[n,2]+1,{n,0,40}] (* or *) LinearRecurrence[{3,-3,1},{1,31,97},40] (* Harvey P. Dale, Jun 30 2011 *)
    CoefficientList[Series[(1 + 28 x + 7 x^2) / (1 - x)^3, {x, 0, 40}], x] (* Vincenzo Librandi, Aug 07 2013 *)
  • PARI
    a(n)=18*n^2+12*n+1 \\ Charles R Greathouse IV, Jun 17 2017

Formula

a(n) = C(n,0) + 30*C(n,1) + 36*C(n,2).
a(n) = 18*n^2 + 12*n + 1.
G.f.: (1 + 28*x + 7*x^2)/(1-x)^3.
a(0)=1, a(1)=31, a(2)=97, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Jun 30 2011
E.g.f.: exp(x)*(1 + 30*x + 18*x^2). - Elmo R. Oliveira, Nov 13 2024

A248579 a(n) = the smallest numbers k such that n*T(k)-1 and n*T(k)+1 are twin primes or 0 if no solution exists for n where T(k) = A000217(k) = k-th triangular number.

Original entry on oeis.org

3, 2, 3, 1, 3, 1, 3, 0, 0, 2, 12, 1, 11, 2, 4, 5, 3, 1, 12, 2, 24, 6, 3, 2, 3, 12, 4, 5, 20, 1, 27, 3, 3, 2, 11, 2, 56, 3, 7, 3, 32, 1, 44, 5, 3, 2, 3, 11, 12, 2, 7, 3, 15, 5, 20, 14, 4, 3, 32, 1, 27, 6, 8, 2, 8, 2, 11, 5, 7, 3, 167, 1, 20, 9, 12, 2, 3, 18
Offset: 1

Views

Author

Jaroslav Krizek, Oct 25 2014

Keywords

Comments

For n = 8 and 9 there are no triangular numbers T(k) such that n*T(k) +/- 1 are twin primes.
a(8) = 0 because 8*T(k) + 1 = A016754(k) = composite number for k >= 1.
a(9) = 0 because 9*T(k) + 1 = A060544(k+1) = composite number for k >= 1.
Are there numbers n > 9 such that a(n) = 0? If a(n) = 0 for n > 9, n must be bigger than 4000.
a(n) > 0 for 10 <= n <= 100000. - Robert Israel, Aug 10 2023

Examples

			a(5) = 3 because 3 is the smallest number k with this property: 5*T(3) -/+ 1 = 5*6 -+ 1 = 29 and 31 (twin primes).
		

Crossrefs

Programs

  • Magma
    A248579:=func; [A248579(n): n in[1..100]]
    
  • Maple
    f:= proc(n) local k;
       for k from 1 do if isprime(n*k*(k+1)/2+1) and isprime(n*k*(k+1)/2-1) then return k fi od:
    end proc;
    f(8):= 8: f(9):= 0:
    map(f, [$1..100]); # Robert Israel, Aug 10 2023
  • PARI
    a(n) = {if ((n==8) || (n==9), return (0)); k = 1; while (!isprime(n*k*(k+1)/2-1) || !isprime(n*k*(k+1)/2+1), k++); k;} \\ Michel Marcus, Nov 05 2014

A248580 a(n) = the smallest triangular number T(k) such that n*T(k)-1 and n*T(k)+1 are twin primes or 0 if no solution exists for n; T(k) = A000217(k) = k-th triangular number.

Original entry on oeis.org

6, 3, 6, 1, 6, 1, 6, 0, 0, 3, 78, 1, 66, 3, 10, 15, 6, 1, 78, 3, 300, 21, 6, 3, 6, 78, 10, 15, 210, 1, 378, 6, 6, 3, 66, 3, 1596, 6, 28, 6, 528, 1, 990, 15, 6, 3, 6, 66, 78, 3, 28, 6, 120, 15, 210, 105, 10, 6, 528, 1, 378, 21, 36, 3, 36, 3, 66, 15, 28, 6
Offset: 1

Views

Author

Jaroslav Krizek, Oct 25 2014

Keywords

Comments

For n = 8 and 9 there are no triangular numbers T(k) such that n*T(k)-+1 are twin primes.
a(8) = 0 because 8*T(k)+1 = A016754(k) = composite number for k >= 1.
a(9) = 0 because 9*T(k)+1 = A060544(k+1) = composite number for k >= 1.
Are there numbers n > 9 such that a(n) = 0? If a(n) = 0 for n > 9, n must be bigger than 4000.

Examples

			a(5) = 6 because 6 is the smallest smallest triangular number with this property: 5*6 -+ 1 = 29 and 31 (twin primes).
		

Crossrefs

Programs

  • Magma
    A248580:=func; [A248580(n): n in[1..100]]
    
  • Mathematica
    a248580[n_Integer] := Catch@Module[{T, k}, T[i_] := i (i + 1)/2; Do[If[And[PrimeQ[n*T[k] + 1], PrimeQ[n*T[k] - 1]], Throw[T[k]], 0], {k, 1, 10^4}] /. Null -> 0]; a248580 /@ Range[70] (* Michael De Vlieger, Nov 12 2014 *)
  • PARI
    a(n) = {if ((n==8) || (n==9), return (0)); k = 1; while (!isprime(n*k*(k+1)/2-1) || !isprime(n*k*(k+1)/2+1), k++); k*(k+1)/2; } \\ Michel Marcus, Nov 12 2014

Formula

a(n) = A000217(A248579(n)).

A249349 (A001147(n+1)-1)/2, equals the index of A249348(n) within the triangular numbers A000217.

Original entry on oeis.org

0, 1, 7, 52, 472, 5197, 67567, 1013512, 17229712, 327364537, 6874655287, 158117071612, 3952926790312, 106729023338437, 3095141676814687, 95949391981255312, 3166329935381425312, 110821547738349885937, 4100397266318945779687, 159915493386438885407812
Offset: 0

Views

Author

M. F. Hasler, Oct 26 2014

Keywords

Comments

Also a(n) = floor(sqrt(A249348(n)*2)).
The positive terms are of the form 3k-2; this k (= 1, 3, 18, 157, ...) is the index of A249348(n) within the centered 9-gonal numbers A060544.

Programs

  • PARI
    a(n)=A001147(n+1)\2
    
  • PARI
    vector(10,n,A001147(n)\2) \\ To get the initial term a(0) for n=1.

Formula

a(n) +(-2*n-3)*a(n-1) +(4*n-1)*a(n-2) +(-2*n+3)*a(n-3)=0. - R. J. Mathar, Oct 28 2014

A318255 Associated Omega numbers of order 3, triangle T(n,k) read by rows for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 10, -9, 1, 28, -504, 477, 1, 55, -4158, 78705, -74601, 1, 91, -18018, 1432431, -27154764, 25740261, 1, 136, -55692, 11595870, -923261976, 17503377480, -16591655817, 1, 190, -139536, 60087690, -12529983960, 997692516360, -18914487631380, 17929265150637
Offset: 0

Views

Author

Peter Luschny, Aug 26 2018

Keywords

Comments

See the comments in A318254.

Examples

			Triangle starts:
[0] 1
[1] 1,   1
[2] 1,  10,     -9
[3] 1,  28,   -504,      477
[4] 1,  55,  -4158,    78705,     -74601
[5] 1,  91, -18018,  1432431,  -27154764,    25740261
[6] 1, 136, -55692, 11595870, -923261976, 17503377480, -16591655817
		

Crossrefs

T(n, 0) = A060544, T(n, n) = A293951(n+1) (up to signs), row sums are A040000.
Cf. A318146, A318253, A318254 (m=2).

Programs

  • Maple
    # The function TNum is defined in A318253.
    T := (m, n, k) -> `if`(k=0, 1, binomial(m*n-1, m*(n-k))*TNum(m, k)):
    for n from 0 to 6 do seq(T(3, n, k), k=0..n) od;
  • Sage
    # uses[AssociatedOmegaNumberTriangle from A318254]
    A318255Triangle = lambda dim: AssociatedOmegaNumberTriangle(3, dim)
    print(A318255Triangle(8))

Formula

T(m, n, k) = binomial(m*n-1, m*(n-k))*A318253(m, k) for k>0 and 1 for k=0. We consider here the case m=3.
Previous Showing 41-50 of 57 results. Next