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 71-80 of 80 results.

A104569 Triangle read by rows: T(i,j) is the (i,j)-entry (1 <= j <= i) of the product Q*R of the infinite lower triangular matrices Q = [1; 1,3; 1,3,1; 1 3,1,3; ...] and R = [1; 1,1; 1,1,1; 1,1,1,1; ...].

Original entry on oeis.org

1, 4, 3, 5, 4, 1, 8, 7, 4, 3, 9, 8, 5, 4, 1, 12, 11, 8, 7, 4, 3, 13, 12, 9, 8, 5, 4, 1, 16, 15, 12, 11, 8, 7, 4, 3, 17, 16, 13, 12, 9, 8, 5, 4, 1, 20, 19, 16, 15, 12, 11, 8, 7, 4, 3, 21, 20, 17, 16, 13, 12, 9, 8, 5, 4, 1, 24, 23, 20, 19, 16, 15, 12, 11, 8, 7, 4, 3, 25, 24, 21, 20, 17, 16, 13, 12, 9, 8, 5, 4, 1
Offset: 1

Views

Author

Gary W. Adamson, Mar 16 2005

Keywords

Examples

			The first few rows of the triangle are:
  1;
  4, 3;
  5, 4, 1;
  8, 7, 4, 3;
  9, 8, 5, 4, 1;
  ...
		

Crossrefs

Row sums yield A074377. Columns 1, 3, 5, ... (starting at the diagonal entry) yield A042948. Columns 2, 4, 6, ... (starting at the diagonal entry) yield A014601. The product R*Q yields A104570.

Programs

  • Maple
    T:=proc(i,j) if j>i then 0 elif i+j mod 2 = 1 then 2*(i-j)+2 elif i mod 2 = 1 and j mod 2 = 1 then 2*(i-j)+1 elif i mod 2 = 0 and j mod 2 = 0 then 2*(i-j)+3 else fi end: for i from 1 to 13 do seq(T(i,j),j=1..i) od; # yields sequence in triangular form # Emeric Deutsch, Mar 23 2005
  • Mathematica
    Q[i_, j_] := If[j <= i, 2 + (-1)^j, 0];
    R[i_, j_] := If[j <= i, 1, 0];
    T[i_, j_] := Sum[Q[i, k]*R[k, j], {k, 1, 13}];
    Table[T[i, j], {i, 1, 13}, {j, 1, i}] // Flatten (* Jean-François Alcover, Jul 24 2024 *)

Formula

For 1<=j<=i: T(i, j)=2(i-j+1) if i and j are of opposite parity; T(i, j)=2(i-j)+1 if both i and j are odd; T(i, j)=2(i-j)+3 if both i and j are even. - Emeric Deutsch, Mar 23 2005

Extensions

More terms from Emeric Deutsch, Mar 23 2005

A104570 Triangle read by rows: T(i,j) is the (i,j)-entry (1 <= j <= i) of the product R*Q of the infinite lower triangular matrices R = [1; 1,1; 1,1,1; 1,1,1,1; ...] and Q = [1; 1,3; 1,3,1; 1,3,1,3; ...].

Original entry on oeis.org

1, 2, 3, 3, 6, 1, 4, 9, 2, 3, 5, 12, 3, 6, 1, 6, 15, 4, 9, 2, 3, 7, 18, 5, 12, 3, 6, 1, 8, 21, 6, 15, 4, 9, 2, 3, 9, 24, 7, 18, 5, 12, 3, 6, 1, 10, 27, 8, 21, 6, 15, 4, 9, 2, 3, 11, 30, 9, 24, 7, 18, 5, 12, 3, 6, 1, 12, 33, 10, 27, 8, 21, 6, 15, 4, 9, 2, 3, 13, 36, 11, 30, 9, 24, 7, 18, 5, 12, 3, 6, 1
Offset: 1

Views

Author

Gary W. Adamson, Mar 16 2005

Keywords

Examples

			First few rows of the triangle:
  1;
  2, 3;
  3, 6, 1;
  4, 9, 2, 3;
  ...
		

Crossrefs

Row sums yield A035608. The product Q*R yields A104569.

Programs

  • Maple
    T:=proc(i,j) if j>i then 0 elif j mod 2 = 1 then i-j+1 else 3*(i-j+1) fi end:for i from 1 to 14 do seq(T(i,j),j=1..i) od; # yields sequence in triangular form # Emeric Deutsch, Mar 23 2005
  • Mathematica
    Q[i_, j_] := If[j <= i, 2 + (-1)^j, 0];
    R[i_, j_] := If[j <= i, 1, 0];
    T[i_, j_] := Sum[R[i, k]*Q[k, j], {k, 1, 13}];
    Table[T[i, j], {i, 1, 13}, {j, 1, i}] // Flatten (* Jean-François Alcover, Jul 24 2024~ *)

Formula

Even columns (offset) = 1, 2, 3, ...; while odd columns = 3, 6, 9, ...
T(i,j) = i-j+1 if j <= i and j is odd; 3(i-j+1) if j <= i and j is even. - Emeric Deutsch, Mar 23 2005

Extensions

More terms from Emeric Deutsch, Mar 23 2005

A158056 a(n) = 16*n^2 + 2*n.

Original entry on oeis.org

18, 68, 150, 264, 410, 588, 798, 1040, 1314, 1620, 1958, 2328, 2730, 3164, 3630, 4128, 4658, 5220, 5814, 6440, 7098, 7788, 8510, 9264, 10050, 10868, 11718, 12600, 13514, 14460, 15438, 16448, 17490, 18564, 19670, 20808, 21978, 23180, 24414, 25680
Offset: 1

Views

Author

Vincenzo Librandi, Mar 12 2009

Keywords

Comments

The identity (16*n + 1)^2 - (16*n^2 + 2*n)*4^2 = 1 can be written as A158057(n)^2 - a(n)*4^2 = 1. - Vincenzo Librandi, Feb 09 2012
Sequence found by reading the line from 18, in the direction 18, 68, ... in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Nov 02 2012

Crossrefs

Cf. A158057.

Programs

  • Magma
    I:=[18, 68, 150]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..50]];
    
  • Mathematica
    LinearRecurrence[{3,-3,1},{18,68,150},50]
    Table[16n^2+2n,{n,40}]  (* Harvey P. Dale, Apr 13 2011 *)
  • PARI
    a(n) = 16*n^2 + 2*n.

Formula

a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: 2*x*(-9 - 7*x)/(x-1)^3.

A158058 a(n) = 16*n^2 - 2*n.

Original entry on oeis.org

14, 60, 138, 248, 390, 564, 770, 1008, 1278, 1580, 1914, 2280, 2678, 3108, 3570, 4064, 4590, 5148, 5738, 6360, 7014, 7700, 8418, 9168, 9950, 10764, 11610, 12488, 13398, 14340, 15314, 16320, 17358, 18428, 19530, 20664, 21830, 23028, 24258, 25520
Offset: 1

Views

Author

Vincenzo Librandi, Mar 12 2009

Keywords

Comments

The identity (16*(n-1) + 15)^2 - (16*n^2 - 2*n)*4^2 = 1 can be written as A125169(n-1)^2 - a(n)*4^2 = 1. - Vincenzo Librandi, Feb 01 2012
Sequence found by reading the line from 14, in the direction 14, 60, ... in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Nov 02 2012
The continued fraction expansion of sqrt(a(n)) is [4n-1; {1, 2, 1, 8n-2}]. - Magus K. Chu, Nov 08 2022

Crossrefs

Cf. A125169.

Programs

  • Magma
    [16*n^2-2*n: n in [1..40]]
    
  • Maple
    seq(16*n^2-2*n,n=1..40); # Nathaniel Johnston, Jun 26 2011
  • Mathematica
    LinearRecurrence[{3,-3,1},{14,60,138},40]
  • PARI
    a(n) = 16*n^2-2*n.

Formula

G.f.: x*(-14 - 18*x)/(x-1)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).

A158444 a(n) = 16*n^2 + 4.

Original entry on oeis.org

20, 68, 148, 260, 404, 580, 788, 1028, 1300, 1604, 1940, 2308, 2708, 3140, 3604, 4100, 4628, 5188, 5780, 6404, 7060, 7748, 8468, 9220, 10004, 10820, 11668, 12548, 13460, 14404, 15380, 16388, 17428, 18500, 19604, 20740, 21908, 23108, 24340, 25604, 26900, 28228
Offset: 1

Views

Author

Vincenzo Librandi, Mar 19 2009

Keywords

Comments

The identity (8*n^2 + 1)^2 - (16*n^2 + 4)*(2*n)^2 = 1 can be written as A081585(n)^2 - a(n)*A005843(n)^2 = 1. [rewritten by Bruno Berselli, Sep 06 2011]
Sequence found by reading the line from 20, in the direction 20, 68, ... in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Nov 02 2012

Crossrefs

Programs

Formula

From Bruno Berselli, Sep 06 2011: (Start)
G.f.: 4*x*(5 + 2*x + x^2)/(1-x)^3.
a(n) = 4*A053755(n). (End)
From Amiram Eldar, Mar 05 2023: (Start)
Sum_{n>=1} 1/a(n) = (coth(Pi/2)*Pi/2 - 1)/8.
Sum_{n>=1} (-1)^(n+1)/a(n) = (1 - cosech(Pi/2)*Pi/2)/8. (End)
E.g.f.: 4*(exp(x)*(4*x^2 + 4*x + 1) - 1). - Elmo R. Oliveira, Jan 27 2025

A253187 Number of ordered ways to write n as the sum of a pentagonal number, a second pentagonal number and a generalized decagonal number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 07 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n. Also, for any ordered pair (k,m) among (5,7), (5,9), (5,13), (6,5), (6,7), (7,5), each nonnegative integer n can be written as the sum of a k-gonal number, a second k-gonal number and a generalized m-gonal number.
See also the author's similar conjectures in A254574, A254631, A255916 and the two linked papers.

Examples

			a(33) = 1 since 33 = 0*(3*0-1)/2 + 4*(3*4+1)/2 + 1*(4*1+3).
a(56) = 1 since 56 = 4*(3*4-1)/2 + 2*(3*2+1)/2 + 3*(4*3+3).
		

Crossrefs

Programs

  • Mathematica
    DQ[n_]:=IntegerQ[Sqrt[16n+9]]
    Do[r=0;Do[If[DQ[n-x(3x-1)/2-y(3y+1)/2],r=r+1],{x,0,(Sqrt[24n+1]+1)/6},{y,0,(Sqrt[24(n-x(3x-1)/2)+1]-1)/6}];
    Print[n," ",r];Continue,{n,0,100}]

A274832 Values of n such that 2*n+1 and 7*n+1 are both triangular numbers (A000217).

Original entry on oeis.org

0, 27, 297, 24570, 267030, 22064157, 239792967, 19813588740, 215333817660, 17792580624687, 193369528466037, 15977717587380510, 173645621228683890, 14347972600887073617, 155933574493829667507, 12884463417879004727880, 140028176249837812737720
Offset: 1

Views

Author

Colin Barker, Jul 08 2016

Keywords

Comments

Intersection of A074377 and A274830.

Examples

			27 is in the sequence because 2*27+1 = 55, 7*27+1 = 190, and 55 and 190 are both triangular numbers.
		

Crossrefs

Cf. A124174 (2*n+1 and 9*n+1), A274579 (2*n+1 and 5*n+1), A274603 (2*n+1 and 3*n+1), A274680 (2*n+1 and 4*n+1), A274756 (2*n+1 and 7*n+1).

Programs

  • Mathematica
    LinearRecurrence[{1, 898, -898, -1, 1}, {0, 27, 297, 24570, 267030}, 20] (* Paolo Xausa, Oct 21 2024 *)
  • PARI
    isok(n) = ispolygonal(2*n+1, 3) && ispolygonal(7*n+1, 3)
    
  • PARI
    concat(0, Vec(27*x^2*(1+10*x+x^2)/((1-x)*(1-30*x+x^2)*(1+30*x+x^2)) + O(x^20)))

Formula

G.f.: 27*x^2*(1+10*x+x^2) / ((1-x)*(1-30*x+x^2)*(1+30*x+x^2)).

A082041 a(n) = 16*n^2 + 4*n + 1.

Original entry on oeis.org

1, 21, 73, 157, 273, 421, 601, 813, 1057, 1333, 1641, 1981, 2353, 2757, 3193, 3661, 4161, 4693, 5257, 5853, 6481, 7141, 7833, 8557, 9313, 10101, 10921, 11773, 12657, 13573, 14521, 15501, 16513, 17557, 18633, 19741, 20881, 22053, 23257, 24493
Offset: 0

Views

Author

Paul Barry, Apr 02 2003

Keywords

Comments

Also sequence found by reading the segment (1,21) together with the line from 21, in the direction 21, 73, ..., in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Nov 02 2012

Crossrefs

Column k=4 of A082039.

Programs

  • Mathematica
    Table[16n^2+4n+1,{n,0,50}] (* or *) LinearRecurrence[{3,-3,1},{1,21,73},50] (* Harvey P. Dale, Sep 28 2024 *)
  • PARI
    a(n)=16*n^2+4*n+1 \\ Charles R Greathouse IV, Jun 17 2017

Formula

G.f.: (-1-18*x-13*x^2)/(x-1)^3 . - R. J. Mathar, Dec 03 2014
From Elmo R. Oliveira, Oct 28 2024: (Start)
E.g.f.: exp(x)*(1 + 20*x + 16*x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A379697 For n >= 3, a(n) is the least k >= 0 such that (k + 1)*(2*n + k) / 2 is a triangular number (A000217).

Original entry on oeis.org

0, 2, 5, 0, 1, 20, 4, 0, 2, 6, 8, 2, 0, 10, 119, 3, 4, 20, 0, 1, 5, 14, 2, 5, 1, 0, 32, 6, 7, 464, 20, 2, 8, 0, 24, 8, 2, 4, 65, 9, 10, 47, 0, 3, 11, 30, 17, 2, 3, 1, 59, 12, 0, 2, 21, 4, 14, 38, 40, 14, 4, 42, 101, 0, 16, 74, 2, 5, 17, 46, 48, 17, 5, 1, 11, 0, 19, 125, 10, 6, 20, 54, 1, 20, 6, 44, 272, 21, 0
Offset: 3

Views

Author

Ctibor O. Zizka, Dec 30 2024

Keywords

Comments

Also for n >= 3, a(n) is the least k >= 0 such that the Sum_{i = 0..k} (n + i) is a triangular number (A000217). For n = 0, 1 the Sum is a triangular number for all n. For n = 2, there is no solution.

Examples

			n = 4: the least k >= 0 such that (k + 1)*(8 + k)/2 is a triangular number is k = 2, thus a(4) = 2.
n = 6: the least k >= 0 such that (k + 1)*(12 + k)/2 is a triangular number is k = 0, thus a(6) = 0.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t, alpha, beta;
          t:= n^2-n;
          alpha:= convert(select(type, numtheory:-divisors(t),odd),list);
          beta:= map(s -> (s+t/s - 1)/2 - n, alpha);
          min(select(`>=`,beta,0))
    end proc:
    map(f, [$3..100]); # Robert Israel, Jan 30 2025
  • Mathematica
    a[n_] := Module[{k = 0}, While[! IntegerQ[Sqrt[4*(k + 1)*(2*n + k) + 1]], k++]; k]; Array[a, 100, 3] (* Amiram Eldar, Dec 30 2024 *)
  • PARI
    a(n) = my(k=0); while (!ispolygonal((k + 1)*(2*n + k)/2, 3), k++); k; \\ Michel Marcus, Dec 30 2024

Formula

a(n) = 0 for n from A000217.
a(n) = 1 for n from A074377 AND n is not a triangular number.

A104571 Triangle T(n,k) = A042948(n-k+1) read by rows, 0<=k<=n.

Original entry on oeis.org

1, 4, 1, 5, 4, 1, 8, 5, 4, 1, 9, 8, 5, 4, 1, 12, 9, 8, 5, 4, 1, 13, 12, 9, 8, 5, 4, 1, 16, 13, 12, 9, 8, 5, 4, 1
Offset: 0

Views

Author

Gary W. Adamson, Mar 16 2005

Keywords

Examples

			The first few rows are:
1;
4, 1;
5, 4, 1;
8, 5, 4, 1;
9, 8, 5, 4, 1;
...
		

Crossrefs

Cf. A042948, A035608 (row sums), A104570, A104569, A074377.

Formula

The triangle is extracted from the product of lower triangular matrices (with the rest of the terms all zeros): G * R (or R * G); G = [1; 3, 1; 1, 3, 1; 3, 1, 3, 1;...]; R = [1; 1, 1; 1, 1, 1;...].
Previous Showing 71-80 of 80 results.