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 11-20 of 23 results. Next

A166911 a(n) = (9 + 14*n + 12*n^2 + 4*n^3)/3.

Original entry on oeis.org

3, 13, 39, 89, 171, 293, 463, 689, 979, 1341, 1783, 2313, 2939, 3669, 4511, 5473, 6563, 7789, 9159, 10681, 12363, 14213, 16239, 18449, 20851, 23453, 26263, 29289, 32539, 36021, 39743, 43713, 47939, 52429, 57191, 62233, 67563, 73189, 79119, 85361, 91923
Offset: 0

Views

Author

Paul Curtz, Oct 23 2009

Keywords

Comments

The inverse binomial transform yields the quasi-finite sequence 3,10,16,8,0,.. (0 continued).
These are the bottom-left numbers in the blocks (each with 2 rows) shown in A172002, the
atomic number of the leftmost element in the 2nd, 4th, 6th etc. row of the Janet table.

References

  • Charles Janet, La structure du noyau de l'atome .., Nov 1927, page 15.

Programs

Formula

First differences: a(n)-a(n-1) = 2+4*n+4*n^2 = 1+(1+2n)^2 = 1 + A016754(n+1) = A069894(n+1).
Second differences: a(n) - 2*a(n-1) + a(n-2) = 8*n = A008590(n+2).
Third differences: a(n) - 3*a(n-1) + 3*a(n-2) - a(n-3) = 8.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: (3 + x + 5*x^2 - x^3)/(1-x)^4.
a(n) = A166464(n) + 2*(n+1)^2 = A166464(n) + A001105(n+1).
E.g.f.: (1/3)*(9 + 30*x + 24*x^2 + 4*x^3)*exp(x). - G. C. Greubel, May 28 2016

Extensions

Edited and extended by R. J. Mathar, Mar 02 2010

A248800 a(n) = (2*n^2 + 3 + (-1)^n)/2.

Original entry on oeis.org

2, 2, 6, 10, 18, 26, 38, 50, 66, 82, 102, 122, 146, 170, 198, 226, 258, 290, 326, 362, 402, 442, 486, 530, 578, 626, 678, 730, 786, 842, 902, 962, 1026, 1090, 1158, 1226, 1298, 1370, 1446, 1522, 1602, 1682, 1766, 1850, 1938, 2026, 2118
Offset: 0

Views

Author

Paul Curtz, Oct 14 2014

Keywords

Comments

Numbers belonging to A016825: a(n) = A016825( A002620(n) ). - Bruno Berselli, Oct 15 2014
For n>1, a(n) is the number of row vectors of length 2n with entries in [1,n], first entry 1, with maximum inner distance. That is, vectors where the modular distance between adjacent entries is at least (n-2)/2. Modular distance is the minimum of remainders of (x - y) and (y - x) when dividing by n. Geometrically, this metric counts how far the integers mod n are from each other if 1 and n are adjacent as on a circle. - Omar Aceval Garcia, Jan 30 2021

Crossrefs

Programs

  • Magma
    [n^2+3/2+(-1)^n/2: n in [0..50]]; // Vincenzo Librandi, Oct 15 2014
    
  • Mathematica
    Table[n^2 + 3/2 + (-1)^n/2, {n, 0, 50}] (* Bruno Berselli, Oct 15 2014 *)
    CoefficientList[Series[2(x^3+x^2-x+1)/((1-x)^3 (x+1)), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 15 2014 *)
    LinearRecurrence[{2,0,-2,1},{2,2,6,10},60] (* Harvey P. Dale, Apr 08 2019 *)
  • PARI
    Vec(-2*(x^3+x^2-x+1)/((x-1)^3*(x+1)) + O(x^100)) \\ Colin Barker, Oct 15 2014
    
  • Sage
    [(2*n^2 +3 +(-1)^n)/2 for n in (0..50)] # G. C. Greubel, Dec 14 2021

Formula

a(n) = A000290(n) + A000034(n+1) = 4*A002620(n) + 2.
a(n+1) = 2*A080827(n+1) = (n+2)^2 - A042964(n+1) = a(n) + 2*n + 1 -(-1)^n.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Colin Barker, Oct 15 2014
G.f.: 2*(1-x+x^2+x^3) / ((1-x)^3*(x+1)). - Colin Barker, Oct 15 2014
E.g.f.: cosh(x) + (1 + x + x^2)*exp(x). - G. C. Greubel, Dec 14 2021
a(2n) = A005899(n) for n > 0, a(2n+1) = A069894(n). - Omar Aceval Garcia, Dec 30 2021

Extensions

Typo in data fixed by Colin Barker, Oct 15 2014

A069477 a(n) = 60*n^2 + 180*n + 150.

Original entry on oeis.org

390, 750, 1230, 1830, 2550, 3390, 4350, 5430, 6630, 7950, 9390, 10950, 12630, 14430, 16350, 18390, 20550, 22830, 25230, 27750, 30390, 33150, 36030, 39030, 42150, 45390, 48750, 52230, 55830, 59550, 63390, 67350, 71430, 75630, 79950, 84390, 88950, 93630, 98430, 103350
Offset: 1

Views

Author

Eli McGowan (ejmcgowa(AT)mail.lakeheadu.ca), Apr 11 2002

Keywords

Comments

First differences of A068236, successive differences of (n+1)^5 - n^5 (A022521).

Crossrefs

Programs

Formula

a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(1)=390, a(2)=750, a(3)=1230. - Harvey P. Dale, Apr 06 2012
Sum_{n>=1} 1/a(n) = (Pi/60)*tanh(Pi/2) - 1/25. - Amiram Eldar, Jan 27 2022
From Elmo R. Oliveira, Feb 08 2025: (Start)
G.f.: 30*x*(5*x^2 - 14*x + 13)/(1-x)^3.
E.g.f.: 30*(exp(x)*(2*x^2 + 8*x + 5) - 5).
a(n) = 30*A001844(n+1) = 15*A069894(n+1). (End)

A293958 Smallest odd prime divisor of (2n+1)^2 + 1.

Original entry on oeis.org

5, 13, 5, 41, 61, 5, 113, 5, 181, 13, 5, 313, 5, 421, 13, 5, 613, 5, 761, 29, 5, 1013, 5, 1201, 1301, 5, 17, 5, 1741, 1861, 5, 2113, 5, 2381, 2521, 5, 29, 5, 3121, 17, 5, 3613, 5, 17, 41, 5, 4513, 5, 13, 5101, 5, 37, 5, 13, 61, 5, 17, 5, 73, 7321, 5, 13, 5, 53, 8581, 5, 13, 5, 9661, 9941, 5
Offset: 1

Views

Author

N. J. A. Sloane, Nov 04 2017, following a suggestion from Zoran Sunic

Keywords

Comments

If the map "x -> smallest odd prime divisor of n^2+1" is iterated, does it always terminate in the 2-cycle (5 <-> 13)? - Zoran Sunic, Oct 25 2017
A027862 is a subsequence. - David A. Corneth, Nov 04 2017

Crossrefs

A bisection of A125256. Cf. A027862, A069894, A078701, A256970.

Programs

  • Mathematica
    sod[n_]:=With[{fi=FactorInteger[n]},If[fi[[1,1]]==2,fi[[2,1]],fi[1,1]]]; sod/@(Range[3,151,2]^2+1) (* Harvey P. Dale, Dec 23 2023 *)
  • PARI
    a(n) = factor((2*n+1)^2 + 1)[2,1]; \\ Michel Marcus, Nov 04 2017

Formula

a(n) = A078701(A069894(n)). - Michel Marcus, Nov 04 2017

A364361 Table read by rows. T(n, k) = Sum_{j=0..n-k} k*binomial(k, j)*binomial(n - j, k).

Original entry on oeis.org

0, 0, 1, 0, 3, 2, 0, 5, 10, 3, 0, 7, 26, 21, 4, 0, 9, 50, 75, 36, 5, 0, 11, 82, 189, 164, 55, 6, 0, 13, 122, 387, 516, 305, 78, 7, 0, 15, 170, 693, 1284, 1155, 510, 105, 8, 0, 17, 226, 1131, 2724, 3405, 2262, 791, 136, 9, 0, 19, 290, 1725, 5156, 8415, 7734, 4025, 1160, 171, 10
Offset: 0

Views

Author

Peter Luschny, Jul 30 2023

Keywords

Examples

			The triangle begins:
  [0] 0;
  [1] 0,  1;
  [2] 0,  3,   2;
  [3] 0,  5,  10,   3;
  [4] 0,  7,  26,   21,    4;
  [5] 0,  9,  50,   75,   36,    5;
  [6] 0, 11,  82,  189,  164,   55,    6;
  [7] 0, 13, 122,  387,  516,  305,   78,   7;
  [8] 0, 15, 170,  693, 1284, 1155,  510, 105,   8;
  [9] 0, 17, 226, 1131, 2724, 3405, 2262, 791, 136, 9;
Seen as an array:
  [0] 0,  1,   2,   3,     4,     5,      6,      7, ...  A001477
  [1] 0,  3,  10,   21,   36,    55,     78,    105, ...  A014105
  [2] 0,  5,  26,   75,  164,   305,    510,    791, ...  A048395
  [3] 0,  7,  50,  189,  516,  1155,   2262,   4025, ...
  [4] 0,  9,  82,  387, 1284,  3405,   7734,  15687, ...
  [5] 0, 11, 122,  693, 2724,  8415,  21918,  50281, ...
  [6] 0, 13, 170, 1131, 5156, 18265,  53934, 138775, ...
  [7] 0, 15, 226, 1725, 8964, 35915, 118950, 340473, ...
    A005408|A069894
		

Crossrefs

Cf. A364553 (row sums), A364634 (main diagonal).
Columns: A005408, A069894.

Programs

  • Maple
    T := (n, k) -> local j; add(k*binomial(k, j)*binomial(n-j, k), j = 0..n-k):
    seq(seq(T(n, k), k = 0..n), n = 0..10);

Formula

T(2*n, n) = n * LegendreP(n, 3).

A383466 a(0) = 1; thereafter a(n) = 10*n^2 - 5*n + 2.

Original entry on oeis.org

1, 7, 32, 77, 142, 227, 332, 457, 602, 767, 952, 1157, 1382, 1627, 1892, 2177, 2482, 2807, 3152, 3517, 3902, 4307, 4732, 5177, 5642, 6127, 6632, 7157, 7702, 8267, 8852, 9457, 10082, 10727, 11392, 12077, 12782, 13507, 14252, 15017, 15802, 16607, 17432, 18277, 19142, 20027, 20932, 21857, 22802, 23767, 24752, 25757, 26782, 27827
Offset: 0

Views

Author

Keywords

Comments

Definition: A regular pentagram of radius R is formed by placing five equally-spaced points P_0 .. P_4 around the boundary of a circle of radius R, and drawing line segments P_0 - P_2 - P_4 - P_1 - P_3 - P_0.
Theorem 1: a(n) is the maximum number of regions that can be formed in the plane by drawing n regular pentagrams with the same radius and the same center.
Conjecture 2: a(n) is the maximum number of regions that can be formed in the plane by drawing n regular pentagrams with any radii and any centers.
The following construction works for any n >= 1. Take 5*n equally-spaced points P_i around a circle, and draw a pentagram through P_i, P_{i+n}, P_{i+2*n}, P_{i+3*n}, P_{i+4*n} for i = 0, ..., n-1.
The resulting planar graph decomposes into 5*n triangular regions each with 2*n-1 cells (see the red triangle in "Illustration for a(n)..."), plus the interior and exterior regions, for a total of 10*n^2 - 5*n + 2 regions. There are 10*n^2 vertices (10 for n=1, 40 for n=2, and so on).

Crossrefs

See A077588, A069894, and A386477 for analogous sequences based on triangles, squares, and hexagrams.
Without the "+2" in the definition, the sequence is A152745.

Programs

  • Mathematica
    A383466[n_] := If[n == 0, 1, 5*n*(2*n - 1) + 2]; Array[A383466, 50, 0] (* or *)
    Join[{1}, 5*PolygonalNumber[6, Range[49]] + 2] (* or *)
    LinearRecurrence[{3, -3, 1}, {1, 7, 32, 77}, 50] (* Paolo Xausa, Jul 22 2025 *)

Formula

From Elmo R. Oliveira, Sep 03 2025: (Start)
G.f.: (1 + 4*x + 14*x^2 + x^3)/(1 - x)^3.
E.g.f.: exp(x)*(2 + 5*x + 10*x^2) - 1.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3. (End)

A386477 a(0) = 1; thereafter a(n) = 2*(6*n^2 - 3*n + 1).

Original entry on oeis.org

1, 8, 38, 92, 170, 272, 398, 548, 722, 920, 1142, 1388, 1658, 1952, 2270, 2612, 2978, 3368, 3782, 4220, 4682, 5168, 5678, 6212, 6770, 7352, 7958, 8588, 9242, 9920, 10622, 11348, 12098, 12872, 13670, 14492, 15338, 16208, 17102, 18020, 18962, 19928, 20918, 21932, 22970, 24032, 25118, 26228, 27362, 28520, 29702, 30908, 32138, 33392, 34670
Offset: 0

Views

Author

Keywords

Comments

Definition: A regular hexagram of radius R is formed by placing six equally-spaced points P_0 .. P_5 around the boundary of a circle of radius R, and drawing line segments P_0 - P_2 - P_4 - P_0 and P_1 - P_3 - P_5 - P_1.
Theorem 1: a(n) is the maximum number of regions that can be formed in the plane by drawing n regular hexagrams with the same radius and the same center.
Conjecture 2: a(n) is the maximum number of regions that can be formed in the plane by drawing n regular hexagrams with any radii and any centers.
The following construction works for any n >= 1. Take 6*n equally-spaced points P_i around a circle, and draw hexagrams starting at P_i for i = 0, ..., n-1.
The resulting planar graph decomposes into 6*n triangular cells each with 2*n-1 cells (see the red triangle in the "Three pentagons" illustration), plus the interior and exterior regions, for a total of 12*n^2 - 6*n + 2 regions. There are 12*n^2 vertices, for n>0.

Crossrefs

See A077588, A069894, and A383466 for analogous sequences based on triangles, squares, and pentagrams.

Programs

  • Mathematica
    A386477[n_] := If[n == 0, 1, 6*n*(2*n - 1) + 2]; Array[A386477, 50, 0] (* or *)
    Join[{1}, 6*PolygonalNumber[6, Range[49]] + 2] (* or *)
    LinearRecurrence[{3, -3, 1}, {1, 8, 38, 92}, 50] (* Paolo Xausa, Jul 24 2025 *)

Formula

From Stefano Spezia, Jul 23 2025: (Start)
G.f.: (1 + 5*x + 17*x^2 + x^3)/(1 - x)^3.
E.g.f.: 2*exp(x)*(1 + 3*x + 6*x^2) - 1. (End)
a(n) = A152746(n) + 2, for n >= 1. - Paolo Xausa, Jul 24 2025

A185669 a(n) = 4*n^2 + 3*n + 2.

Original entry on oeis.org

2, 9, 24, 47, 78, 117, 164, 219, 282, 353, 432, 519, 614, 717, 828, 947, 1074, 1209, 1352, 1503, 1662, 1829, 2004, 2187, 2378, 2577, 2784, 2999, 3222, 3453, 3692, 3939, 4194, 4457, 4728, 5007, 5294, 5589, 5892, 6203, 6522, 6849, 7184, 7527, 7878, 8237, 8604, 8979, 9362, 9753, 10152, 10559, 10974, 11397, 11828
Offset: 0

Views

Author

Paul Curtz, Feb 09 2011

Keywords

Comments

Natural numbers A000027 written clockwise as a square spiral:
.
43--44--45--46--47--48--49
|
42 21--22--23--24--25--26
| | |
41 20 7---8---9--10 27
| | | | |
40 19 6 1---2 11 28
| | | | | |
39 18 5---4---3 12 29
| | | |
38 17--16--15--14--13 30
| |
37--36--35--34--33--32--31
.
Walking in straight lines away from the center:
1, 2, 11, ... = A054552(n) = 1 -3*n+4*n^2,
1, 8, 23, ... = A033951(n) = 1 +3*n+4*n^2,
1, 3, 13, ... = A054554(n+1) = 1 -2*n-4*n^2,
1, 7, 21, ... = A054559(n+1) = 1 +2*n+4*n^2,
1, 4, 15, ... = A054556(n+1) = 1 -n+4*n^2,
1, 6, 19, ... = A054567(n+1) = 1 +n+4*n^2,
1, 5, 17, ... = A053755(n) = 1 +4*n^2,
1, 9, 25, ... = A016754(n) = 1 +4*n+4*n^2 = (1+2*n)^2,
2, 8, 22, ... = 2*A084849(n) = 2 +2*n+4*n^2,
2, 12, 30, ... = A002939(n+1) = 2 +6*n+4*n^2,
2, 9, 24, ... = a(n) = 2 +3*n+4*n^2,
2, 10, 26, ... = A069894(n) = 2 +4*n+4*n^2,
3, 11, 27, ... = A164897(n) = 3 +4*n+4*n^2,
3, 12, 29, ... = A054552(n+1)+1 = 3 +5*n+4*n^2,
3, 14, 33, ... = A033991(n+1) = 3 +7*n+4*n^2,
3, 15, 35, ... = A000466(n+1) = 3 +8*n+4*n^2,
4, 14, 32, ... = 2*A130883(n+1) = 4 +6*n+4*n^2,
4, 16, 36, ... = A016742(n+1) = 4 +8*n+4*n^2 = (2+2*n)^2,
5, 18, 39, ... = A007742(n+1) = 5 +9*n+4*n^2,
5, 19, 41, ... = A125202(n+2) = 5+10*n+4*n^2.

Programs

Formula

a(n) = a(n-1) + 8*n - 1.
a(n) = 2*a(n-1) - a(n-2) + 8.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: (2 +3*x +3*x^2)/(1-x)^3 . - R. J. Mathar, Feb 11 2011
a(n) = A033954(n) + 2. - Bruno Berselli, Apr 10 2011
E.g.f.: (4*x^2 + 7*x + 2)*exp(x). - G. C. Greubel, Jul 09 2017

A265129 Triangle read by rows, formed as the sum of the two versions of the natural numbers filling an equilateral triangle.

Original entry on oeis.org

2, 5, 5, 10, 10, 10, 17, 17, 17, 17, 26, 26, 26, 26, 26, 37, 37, 37, 37, 37, 37, 50, 50, 50, 50, 50, 50, 50, 65, 65, 65, 65, 65, 65, 65, 65, 82, 82, 82, 82, 82, 82, 82, 82, 82, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101
Offset: 1

Views

Author

Craig Knecht, Dec 02 2015

Keywords

Comments

The natural numbers can sequentially fill a right- or left-handed equilateral triangle. Componentwise addition of the values of these two triangles produces the present triangle.
The row sums for this triangle give A034262.
The difference between the right- and left-handed triangles produces A049581.

Examples

			Displayed as a triangle:
   2;
   5  5;
  10 10 10;
  17 17 17 17;
  26 26 26 26 26;
  37 37 37 37 37 37;
  ...
		

Crossrefs

Column k=1 gives A002522.
Cf. A049581 (difference of triangles), A034262 (row sum of triangle), A069894 (center column).
Cf. A071237.

Programs

  • Maple
    seq(seq(n^2+1,k=1..n),n=1..10); # Georg Fischer, Oct 01 2021

Formula

T(n,k) = n^2 + 1 for k = 1..n and n >= 1. - Georg Fischer, Oct 01 2021
Sum_{k=1..n} k * T(n,k) = A071237(n). - Alois P. Heinz, Oct 01 2021

Extensions

Row 6 with T(6,k)=37 inserted by Georg Fischer, Oct 01 2021

A267654 Irregular triangle of palindromic subsequences. Every row has 2*n+1 terms. From the second row, there are only two alternated numbers: 2*n+4 and 2*n+2.

Original entry on oeis.org

2, 4, 2, 4, 6, 4, 6, 4, 6, 8, 6, 8, 6, 8, 6, 8, 10, 8, 10, 8, 10, 8, 10, 8, 10, 12, 10, 12, 10, 12, 10, 12, 10, 12, 10, 12, 14, 12, 14, 12, 14, 12, 14, 12, 14, 12, 14, 12, 14, 16, 14, 16, 14, 16, 14, 16, 14, 16, 14, 16, 14, 16, 14, 16
Offset: 0

Views

Author

Paul Curtz, Jan 19 2016

Keywords

Comments

Row sums = 2, 10, 26, 50, ... = A069894(n).
Starting from A053186(n) =
0, for b(n)
0, 1, 2, for c(n)
0, 1, 2, 3, 4, for d(n)
0, 1, 2, 3, 4, 5, 6,
etc,
a(n) is used for
1) b(n+1) = b(n) + (a(0)=2) i.e. 0, 2, 4, 6, ... = A005843(n).
2) c(n+3) = c(n) + (period 3:repeat 4, 2, 4) i.e. 0, 1, 2, 4, 3, 6, 8, ... = A265667(n).
3) d(n+5) = d(n) + (period 5:repeat 6, 4, 6, 4, 6) i.e. 0, 1, 2, 3, 4, 6, 5, 8, 7, 10, ... = A265734(n).
Etc.
a(n) has a companion with the same terms,differently distributed,yielding permutations of the nonnegative numbers. See A265672.
a(n) other writing (by pairs):
2, 4, 2, 4,
6, 4, 6, 4,
6, 8, 6, 8, 6, 8, 6, 8,
10 8, 10, 8, 10, 8, 10, 8,
10, 12, 10, 12, 10, 12, 10, 12, 10, 12, 10, 12,
14, 12, 14, 12, 14, 12, 14, 12, 14, 12, 14, 12,
etc.
First column: A168276(n+2). Second column: A168273(n+2).
Row sums: 12, 20, 56, 72, ... = 4*A074378(n+1).
The last term of the successive rows is the number of their terms.
Main diagonal: A005843(n+1).

Examples

			The triangle is
2,
4, 2, 4,
6, 4, 6, 4, 6,
8, 6, 8, 6, 8, 6, 8,
etc.
		

Crossrefs

Programs

  • Mathematica
    Table[2 (n - 1) + 2 (Boole@ OddQ@ k + 1), {n, 0, 7}, {k, 2 n + 1}] // Flatten (* Michael De Vlieger, Jan 19 2016 *)

Formula

a(n) = 2 * A086520(n+2).
a(2n) = 4*n + 2 times 4*n + 2 = 2, 2, 6, 6, 6, 6, 6, 6, 10,....
a(2n+1) = 4*(n+1) times 4*(n+1) = 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 12, ....
Previous Showing 11-20 of 23 results. Next