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.

A062786 Centered 10-gonal numbers.

Original entry on oeis.org

1, 11, 31, 61, 101, 151, 211, 281, 361, 451, 551, 661, 781, 911, 1051, 1201, 1361, 1531, 1711, 1901, 2101, 2311, 2531, 2761, 3001, 3251, 3511, 3781, 4061, 4351, 4651, 4961, 5281, 5611, 5951, 6301, 6661, 7031, 7411, 7801, 8201, 8611, 9031, 9461, 9901, 10351, 10811
Offset: 1

Views

Author

Jason Earls, Jul 19 2001

Keywords

Comments

Deleting the least significant digit yields the (n-1)-st triangular number: a(n) = 10*A000217(n-1) + 1. - Amarnath Murthy, Dec 11 2003
All divisors of a(n) are congruent to 1 or -1, modulo 10; that is, they end in the decimal digit 1 or 9. Proof: If p is an odd prime different from 5 then 5n^2 - 5n + 1 == 0 (mod p) implies 25(2n - 1)^2 == 5 (mod p), whence p == 1 or -1 (mod 10). - Nick Hobson, Nov 13 2006
Centered decagonal numbers. - Omar E. Pol, Oct 03 2011
The partial sums of this sequence give A004466. - Leo Tavares, Oct 04 2021
The continued fraction expansion of sqrt(5*a(n)) is [5n-3; {2, 2n-2, 2, 10n-6}]. For n=1, this collapses to [2; {4}]. - Magus K. Chu, Sep 12 2022
Numbers m such that 20*m + 5 is a square. Also values of the Fibonacci polynomial y^2 - x*y - x^2 for x = n and y = 3*n - 1. This is a subsequence of A089270. - Klaus Purath, Oct 30 2022
All terms can be written as a difference of two consecutive squares a(n) = A005891(n-1)^2 - A028895(n-1)^2, and they can be represented by the forms (x^2 + 2mxy + (m^2-1)y^2) and (3x^2 + (6m-2)xy + (3m^2-2m)y^2), both of discriminant 4. - Klaus Purath, Oct 17 2023

Crossrefs

Programs

  • GAP
    List([1..50], n-> 1+5*n*(n-1)); # G. C. Greubel, Mar 30 2019
    
  • Magma
    [1+5*n*(n-1): n in [1..50]]; // G. C. Greubel, Mar 30 2019
    
  • Mathematica
    FoldList[#1+#2 &, 1, 10Range@ 45] (* Robert G. Wilson v, Feb 02 2011 *)
    1+5*Pochhammer[Range[50]-1, 2] (* G. C. Greubel, Mar 30 2019 *)
  • PARI
    j=[]; for(n=1,75,j=concat(j,(5*n*(n-1)+1))); j
    
  • PARI
    for (n=1, 1000, write("b062786.txt", n, " ", 5*n*(n - 1) + 1) ) \\ Harry J. Smith, Aug 11 2009
    
  • Python
    def a(n): return(5*n**2-5*n+1) # Torlach Rush, May 10 2024
  • Sage
    [1+5*rising_factorial(n-1, 2) for n in (1..50)] # G. C. Greubel, Mar 30 2019
    

Formula

a(n) = 5*n*(n-1) + 1.
From Gary W. Adamson, Dec 29 2007: (Start)
Binomial transform of [1, 10, 10, 0, 0, 0, ...];
Narayana transform (A001263) of [1, 10, 0, 0, 0, ...]. (End)
G.f.: x*(1+8*x+x^2) / (1-x)^3. - R. J. Mathar, Feb 04 2011
a(n) = A124080(n-1) + 1. - Omar E. Pol, Oct 03 2011
a(n) = A101321(10,n-1). - R. J. Mathar, Jul 28 2016
a(n) = A028387(A016861(n-1))/5 for n > 0. - Art Baker, Mar 28 2019
E.g.f.: (1+5*x^2)*exp(x) - 1. - G. C. Greubel, Mar 30 2019
Sum_{n>=1} 1/a(n) = Pi * tan(Pi/(2*sqrt(5))) / sqrt(5). - Vaclav Kotesovec, Jul 23 2019
From Amiram Eldar, Jun 20 2020: (Start)
Sum_{n>=1} a(n)/n! = 6*e - 1.
Sum_{n>=1} (-1)^n * a(n)/n! = 6/e - 1. (End)
a(n) = A005891(n-1) + 5*A000217(n-1). - Leo Tavares, Jul 14 2021
a(n) = A003154(n) - 2*A000217(n-1). See Mid-section Stars illustration. - Leo Tavares, Sep 06 2021
From Leo Tavares, Oct 06 2021: (Start)
a(n) = A144390(n-1) + 2*A028387(n-1). See Mid-section Star Pillars illustration.
a(n) = A000326(n) + A000217(n) + 3*A000217(n-1). See Trapezoidal Rays illustration.
a(n) = A060544(n) + A000217(n-1). (End)
From Leo Tavares, Oct 31 2021: (Start)
a(n) = A016754(n-1) + 2*A000217(n-1).
a(n) = A016754(n-1) + A002378(n-1).
a(n) = A069099(n) + 3*A000217(n-1).
a(n) = A069099(n) + A045943(n-1).
a(n) = A003215(n-1) + 4*A000217(n-1).
a(n) = A003215(n-1) + A046092(n-1).
a(n) = A001844(n-1) + 6*A000217(n-1).
a(n) = A001844(n-1) + A028896(n-1).
a(n) = A005448(n) + 7*A000217(n).
a(n) = A005448(n) + A024966(n). (End)
From Klaus Purath, Oct 30 2022: (Start)
a(n) = a(n-2) + 10*(2*n-3).
a(n) = 2*a(n-1) - a(n-2) + 10.
a(n) = A135705(n-1) + n.
a(n) = A190816(n) - n.
a(n) = 2*A005891(n-1) - 1. (End)

Extensions

Better description from Terrel Trotter, Jr., Apr 06 2002

A055096 Triangle read by rows, sums of 2 distinct nonzero squares: T(n,k) = k^2+n^2, (n>=2, 1 <= k <= n-1).

Original entry on oeis.org

5, 10, 13, 17, 20, 25, 26, 29, 34, 41, 37, 40, 45, 52, 61, 50, 53, 58, 65, 74, 85, 65, 68, 73, 80, 89, 100, 113, 82, 85, 90, 97, 106, 117, 130, 145, 101, 104, 109, 116, 125, 136, 149, 164, 181, 122, 125, 130, 137, 146, 157, 170, 185, 202, 221, 145, 148, 153, 160
Offset: 2

Views

Author

Antti Karttunen, Apr 04 2000

Keywords

Comments

Discovered by Bernard Frénicle de Bessy (1605?-1675). - Paul Curtz, Aug 18 2008
Terms that are not hypotenuses in primitive Pythagorean triangles, are replaced by 0 in A222946. - Reinhard Zumkeller, Mar 23 2013
This triangle T(n,k) gives the circumdiameters for the Pythagorean triangles with a = (n+1)^2 - k^2, b = 2*(n+1)*k and c = (n+1)^2 + k^2 (see the Floor van Lamoen entries or comments A063929, A063930, A002283, A003991). See also the formula section. Note that not all Pythagorean triangles are covered, e.g., (9,12,15) does not appear. - Wolfdieter Lang, Dec 03 2014

Examples

			The triangle T(n, k) begins:
n\k   1   2   3   4   5   6   7   8   9  10  11 ...
2:    5
3:   10  13
4:   17  20  25
5:   26  29  34  41
6:   37  40  45  52  61
7:   50  53  58  65  74  85
8:   65  68  73  80  89 100 113
9:   82  85  90  97 106 117 130 145
10: 101 104 109 116 125 136 149 164 181
11: 122 125 130 137 146 157 170 185 202 221
12: 145 148 153 160 169 180 193 208 225 244 265
...
13: 170 173 178 185 194 205 218 233 250 269 290 313,
14: 197 200 205 212 221 232 245 260 277 296 317 340 365,
15: 226 229 234 241 250 261 274 289 306 325 346 369 394 421,
16: 257 260 265 272 281 292 305 320 337 356 377 400 425 452 481,
...
Formatted and extended by _Wolfdieter Lang_, Dec 02 2014 (reformatted Jun 11 2015)
The successive terms are (1^2+2^2), (1^2+3^2), (2^2+3^2), (1^2+4^2), (2^2+4^2), (3^2+4^2), ...
		

Crossrefs

Sorting gives A024507. Count of divisors: A055097, Möbius: A055132. For trinv, follow A055088.
Cf. A001844 (right edge), A002522 (left edge), A033429 (central column).

Programs

  • Haskell
    a055096 n k = a055096_tabl !! (n-1) !! (k-1)
    a055096_row n = a055096_tabl !! (n-1)
    a055096_tabl = zipWith (zipWith (+)) a133819_tabl a140978_tabl
    -- Reinhard Zumkeller, Mar 23 2013
    
  • Magma
    [n^2+k^2: k in [1..n-1], n in [2..15]]; // G. C. Greubel, Apr 19 2023
    
  • Maple
    sum2distinct_squares_array := (n) -> (((n-((trinv(n-1)*(trinv(n-1)-1))/2))^2)+((trinv(n-1)+1)^2));
  • Mathematica
    T[n_, k_]:= (n+1)^2 + k^2; Table[T[n, k], {n,15}, {k,n}]//Flatten (* Jean-François Alcover, Mar 16 2015, after Reinhard Zumkeller *)
  • SageMath
    def A055096(n,k): return n^2 + k^2
    flatten([[A055096(n,k) for k in range(1,n)] for n in range(2,16)]) # G. C. Greubel, Apr 19 2023

Formula

a(n) = sum2distinct_squares_array(n).
T(n, 1) = A002522(n).
T(n, n-1) = A001844(n-1).
T(2*n-2, n-1) = A033429(n-1).
T(n,k) = A133819(n,k) + A140978(n,k) = (n+1)^2 + k^2, 1 <= k <= n. - Reinhard Zumkeller, Mar 23 2013
T(n, k) = a*b*c/(2*sqrt(s*(s-1)*(s-b)*(s-c))) with s =(a + b + c)/2 and the substitution a = (n+1)^2 - k^2, b = 2*(n+1)*k and c = (n+1)^2 + k^2 (the circumdiameter for the considered Pythagorean triangles). - Wolfdieter Lang, Dec 03 2014
From Bob Selcoe, Mar 21 2015: (Start)
T(n,k) = 1 + (n-k+1)^2 + Sum_{j=0..k-2} (4*j + 2*(n-k+3)).
T(n,k) = 1 + (n+k-1)^2 - Sum_{j=0..k-2} (2*(n+k-3) - 4*j).
Therefore: 4*(n-k+1) + Sum_{j=0..k-2} (2*(n-k+3) + 4*j) = 4*n(k-1) - Sum_{j=0..k-2} (2*(n+k-3) - 4*j). (End)
From G. C. Greubel, Apr 19 2023: (Start)
T(2*n-3, n-1) = A033429(n-1).
T(2*n-4, n-2) = A079273(n-1).
T(2*n-2, n) = A190816(n).
T(3*n-4, n-1) = 10*A000290(n-1) = A033583(n-1).
Sum_{k=1..n-1} T(n, k) = A331987(n-1).
Sum_{k=1..floor(n/2)} T(n-k, k) = A226141(n-1). (End)

Extensions

Edited: in T(n, k) formula by Reinhard Zumkeller k < n replaced by k <= n. - Wolfdieter Lang, Dec 02 2014
Made definition more precise, changed offset to 2. - N. J. A. Sloane, Mar 30 2015

A172117 a(n) = n*(n+1)*(20*n-17)/6.

Original entry on oeis.org

0, 1, 23, 86, 210, 415, 721, 1148, 1716, 2445, 3355, 4466, 5798, 7371, 9205, 11320, 13736, 16473, 19551, 22990, 26810, 31031, 35673, 40756, 46300, 52325, 58851, 65898, 73486, 81635, 90365, 99696, 109648, 120241, 131495, 143430, 156066
Offset: 0

Views

Author

Vincenzo Librandi, Jan 26 2010

Keywords

Comments

Generated by the formula n*(n+1)*(2*d*n-2*d+3)/6 for d=10.
This sequence is related to A051624 by a(n) = n*A051624(n) - Sum_{i=0..n-1} A051624(i) = n*(n+1)*(20*n-17)/2; in fact, this is the case d=10 in the identity n*(n*(d*n-d+2)/2) - Sum_{i=0..n-1} i*(d*i-d+2)/2 = n*(n+1)*(2*d*n-2*d+3)/6. - Bruno Berselli, Aug 26 2010
Also, a(n) = n*A190816(n) - Sum_{i=0..n-1} A190816(i) for n>0. - Bruno Berselli, Dec 18 2013
Starting with offset 1, the sequence is the binomial transform of (1, 22, 41, 20, 0, 0, 0, ...). - Gary W. Adamson, Jul 31 2015

References

  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 93. [Bruno Berselli, Feb 13 2014]

Crossrefs

Cf. A051624.
Cf. similar sequences listed in A237616.

Programs

  • Magma
    [n*(n+1)*(20*n-17)/6: n in [0..50]]; // Vincenzo Librandi, Aug 01 2015
    
  • Mathematica
    Table[(20n^3+3n^2-17n)/6,{n,0,50}] (* or *) LinearRecurrence[{4,-6,4,-1},{0,1,23,86},40] (* Harvey P. Dale, May 15 2011 *)
  • PARI
    a(n)=n*(20*n^2+3*n-17)/6 \\ Charles R Greathouse IV, Jan 11 2012
    
  • SageMath
    [sum( (-1)^j*(20-j)*binomial(n+2-j, 3-j) for j in (0..1)) for n in (0..50)] # G. C. Greubel, Apr 15 2022

Formula

G.f.: x*(1+19*x)/(1-x)^4. - Bruno Berselli, Aug 26 2010
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 3. - Harvey P. Dale, May 15 2011
a(n) = Sum_{i=0..n-1} (n-i)*(20*i+1), with a(0)=0. - Bruno Berselli, Feb 11 2014
E.g.f.: (1/6)*x*(6 + 63*x + 20*x^2)*exp(x). - G. C. Greubel, Apr 15 2022

A202141 a(n) = 13*n^2 - 16*n + 5.

Original entry on oeis.org

5, 2, 25, 74, 149, 250, 377, 530, 709, 914, 1145, 1402, 1685, 1994, 2329, 2690, 3077, 3490, 3929, 4394, 4885, 5402, 5945, 6514, 7109, 7730, 8377, 9050, 9749, 10474, 11225, 12002, 12805, 13634, 14489, 15370, 16277, 17210, 18169, 19154, 20165, 21202, 22265
Offset: 0

Views

Author

Bruno Berselli, Dec 12 2011

Keywords

Comments

Numbers of the form (r*n - r + 1)^2 + ((r+1)*n - r)^2; in this case, r=2.
Inverse binomial transform of this sequence: 5,-3, 26, 0, 0 (0 continued).

Crossrefs

Cf. A190816 (r=1), A154355 (r=3), A161587.

Programs

  • Magma
    [13*n^2-16*n+5: n in [0..42]];
  • Maple
    A202141:=n->13*n^2-16*n+5: seq(A202141(n), n=0..100); # Wesley Ivan Hurt, Oct 09 2017
  • Mathematica
    Table[13 n^2 - 16 n + 5, {n, 0, 42}]
    LinearRecurrence[{3,-3,1},{5,2,25},50] (* Harvey P. Dale, Aug 23 2025 *)
  • PARI
    for(n=0, 42, print1(13*n^2-16*n+5", "));
    

Formula

G.f.: (5 - 13*x + 34*x^2)/(1-x)^3.
a(n) = A161587(n-1) + 1 with A161587(-1) = 4.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. - Wesley Ivan Hurt, Oct 09 2017
E.g.f.: (5 - 3*x + 13*x^2)*exp(x). - Elmo R. Oliveira, Oct 20 2024

A226292 (10*n^2+4*n+(1-(-1)^n))/8.

Original entry on oeis.org

2, 6, 13, 22, 34, 48, 65, 84, 106, 130, 157, 186, 218, 252, 289, 328, 370, 414, 461, 510, 562, 616, 673, 732, 794, 858, 925, 994, 1066, 1140, 1217, 1296, 1378, 1462, 1549, 1638, 1730, 1824, 1921, 2020, 2122, 2226, 2333, 2442, 2554, 2668, 2785, 2904, 3026, 3150
Offset: 1

Views

Author

Yosu Yurramendi, Jun 02 2013

Keywords

Comments

The number of binary pattern classes in the (3,n)-rectangular grid with 2 '1's and (n-2) '0's: two patterns are in same class if one of them can be obtained by a reflection or 180-degree rotation of the other, n<10.
Column k=2 of A226290.
For n even, a(n) is A202803; for n odd, a(n) is A190816.
Number of lattice points (x,y) in the region bounded by y < 3x, y > x/2 and x <= n. - Wesley Ivan Hurt, Oct 31 2014

Crossrefs

Programs

  • Magma
    [(10*n^2+4*n+(1-(-1)^n))/8: n in [1..50]]; // Vincenzo Librandi, Sep 04 2013
  • Maple
    A226292:=n->(10*n^2+4*n+(1-(-1)^n))/8: seq(A226292(n), n=1..50); # Wesley Ivan Hurt, Oct 31 2014
  • Mathematica
    CoefficientList[Series[(2 + 2 x + x^2) / ((1 + x) (1 - x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 04 2013 *)
    LinearRecurrence[{2,0,-2,1},{2,6,13,22},60] (* Harvey P. Dale, Feb 01 2019 *)

Formula

a(n) = 2*a(n-1)-2*a(n-3)+a(n-4) for n>4, a(1)=2, a(2)=6, a(3)=13, a(4)=22.
a(n) = 2*a(n-2)-a(n-4)+10 for n>4, a(1)=2, a(2)=6, a(3)=13, a(4)=22.
a(n) = a(n-1)+a(n-2)-a(n-3)+5 for n>3, a(1)=2, a(2)=6, a(3)=13.
a(n) = 3*a(n-1)-3*a(n-2)+a(n-3)+(-1)^n for n>3, a(1)=2, a(2)=6, a(3)=13.
a(n) = 2*a(n-1)-a(n-2)+2+(1-(-1)^n)/2 for n>2, a(1)=2, a(2)=6.
G.f.: x*(2+2*x+x^2)/((1+x)*(1-x)^3). - Bruno Berselli, Jun 03 2013

Extensions

More terms from Vincenzo Librandi, Sep 04 2013

A088307 Triangle, read by rows, T(n,k) = n^2 + k^2 if gcd(n,k)=1, otherwise 0.

Original entry on oeis.org

2, 5, 0, 10, 13, 0, 17, 0, 25, 0, 26, 29, 34, 41, 0, 37, 0, 0, 0, 61, 0, 50, 53, 58, 65, 74, 85, 0, 65, 0, 73, 0, 89, 0, 113, 0, 82, 85, 0, 97, 106, 0, 130, 145, 0, 101, 0, 109, 0, 0, 0, 149, 0, 181, 0, 122, 125, 130, 137, 146, 157, 170, 185, 202, 221, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 05 2003

Keywords

Comments

(n^2-k^2, 2*k*n, T(n,k)) is a primitive Pythagorean triple iff T(n,k) > 0.

Examples

			Triangle begins:
   2;
   5,  0;
  10, 13,  0;
  17,  0, 25,  0;
  26, 29, 34, 41,  0;
  37,  0,  0,  0, 61, 0;
  ...
		

Crossrefs

Programs

  • Magma
    function A088307(n,k)
      if GCD(k,n) eq 1 then return n^2+k^2;
      else return 0;
      end if; return A088307;
    end function;
    [A088307(n,k): k in [1..n], n in [1..13]]; // G. C. Greubel, Dec 16 2022
    
  • Mathematica
    Table[If[CoprimeQ[n,k],n^2+k^2,0],{n,20},{k,n}]//Flatten (* Harvey P. Dale, Jul 13 2018 *)
  • SageMath
    def A088307(n,k):
        if (gcd(n,k)==1): return n^2 + k^2
        else: return 0
    flatten([[A088307(n,k) for k in range(1,n+1)] for n in range(1,14)]) # G. C. Greubel, Dec 16 2022

Formula

T(n, n) = 2*A000007(n-1).
T(n, 1) = A002522(n).
T(2*n+1, 2) = A078370(n).
Sum_{k=1..n} A057427(T(n,m)) = A000010(n).
From G. C. Greubel, Dec 15 2022: (Start)
T(n, n-1) = A001844(n).
T(n, n-2) = ((1-(-1)^n)/2) * A008527((n+1)/2).
T(2*n, n) = 5*A000007(n-1).
T(2*n+1, n) = A079273(n+1).
T(2*n-1, n) = A190816(n).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = A053818(n+1) + [n=1]. (End)
Showing 1-6 of 6 results.