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

A386480 a(0) = 1; thereafter a(n) = n^2 - n + 2.

Original entry on oeis.org

1, 2, 4, 8, 14, 22, 32, 44, 58, 74, 92, 112, 134, 158, 184, 212, 242, 274, 308, 344, 382, 422, 464, 508, 554, 602, 652, 704, 758, 814, 872, 932, 994, 1058, 1124, 1192, 1262, 1334, 1408, 1484, 1562, 1642, 1724, 1808, 1894, 1982, 2072, 2164, 2258, 2354, 2452, 2552, 2654, 2758, 2864, 2972, 3082, 3194, 3308, 3424, 3542, 3662, 3784
Offset: 0

Views

Author

N. J. A. Sloane, Aug 01 2025

Keywords

Comments

Maximum number of regions that can be formed in the plane by drawing n circles (of any size), also maximum number of regions that can be formed on the sphere by drawing n great circles.
It is unfortunate that A014206 (which should have been this sequence) starts 2, 4, 8, 14, 22, 32, 44, 58, 74, 92, ... and has offset 0, but it is much too late to change it now. A014206 is, however, the main entry for this problem and the present sequence has been created to serve as a pointer to it.

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 73, Problem 3.

Crossrefs

See A014206 for further information (including additional references).

Programs

Formula

From Stefano Spezia, Aug 01 2025: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3.
G.f.: (1 - x + x^2 + x^3)/(1 - x)^3.
E.g.f.: exp(x)*(2 + x^2) - 1. (End)
a(n) = A003682(n) = A002061(n)+1, n>=2. - R. J. Mathar, Aug 03 2025

A181407 a(n) = (n-4)*(n-3)*2^(n-2).

Original entry on oeis.org

3, 3, 2, 0, 0, 16, 96, 384, 1280, 3840, 10752, 28672, 73728, 184320, 450560, 1081344, 2555904, 5963776, 13762560, 31457280, 71303168, 160432128, 358612992, 796917760, 1761607680, 3875536896, 8489271296, 18522046464, 40265318400, 87241523200, 188441690112
Offset: 0

Views

Author

Paul Curtz, Jan 28 2011

Keywords

Comments

Binomial transform of (3, 0, -1, followed by A005563).
The sequence and its successive differences are:
3, 3, 2, 0, 0, 16, 96, 384, a(n),
0, -1, -2, 0, 16, 80, 288, 896, A178987,
-1, -1, 2, 16, 64, 208, 608, 2688, -A127276,
0, 3, 14, 48, 144, 400, 1056, 2688, A176027,
3, 11, 34, 96, 256, 656, 1632, 3968, A084266(n+1)
8, 23, 62, 160, 400, 976, 2336, 5504,
15, 39, 98, 240, 576, 1360, 3168, 7296.
Division of the k-th column by abs(A174882(k)) gives
3, 3, 1, 0, 0, 1, 3, 3, 5, 15, 21, 14, A064038(n-3),
0, -1, -1, 0, 1, 5, 9, 7, 10, 27, 35, 22, A160050(n-3),
-1, -1, 1, 2, 4, 13, 19, 13, 17, 43, 53, 32, A176126,
0, 3, 7, 6, 9, 25, 33, 21, 26, 63, 75, 44, A178242,
3, 11, 17, 12, 16, 41, 51, 31, 37, 87, 101, 58,
8 23, 31, 20, 25, 61, 73, 43, 50, 115, 131, 74,
15, 39, 49, 30, 36, 85, 99, 57, 65, 147, 165, 92.

Crossrefs

Programs

  • GAP
    List([0..40], n-> (n-4)*(n-3)*2^(n-2)); # G. C. Greubel, Feb 21 2019
  • Magma
    [(n-4)*(n-3)*2^(n-2): n in [0..40] ]; // Vincenzo Librandi, Feb 01 2011
    
  • Mathematica
    Table[(n-4)*(n-3)*2^(n-2), {n,0,40}] (* G. C. Greubel, Feb 21 2019 *)
  • PARI
    vector(40, n, n--; (n-4)*(n-3)*2^(n-2)) \\ G. C. Greubel, Feb 21 2019
    
  • Sage
    [(n-4)*(n-3)*2^(n-2) for n in (0..40)] # G. C. Greubel, Feb 21 2019
    

Formula

a(n) = 16*A001788(n-4).
a(n+1) - a(n) = A178987(n).
G.f.: (3 - 15*x + 20*x^2) / (1-2*x)^3. - R. J. Mathar, Jan 30 2011
E.g.f.: (x^2 - 3*x + 3)*exp(2*x). - G. C. Greubel, Feb 21 2019

A200182 Number of -n..n arrays x(0..3) of 4 elements with zero sum and no two consecutive declines, no adjacent equal elements, and no element more than one greater than the previous (random base sawtooth pattern).

Original entry on oeis.org

3, 6, 11, 14, 19, 26, 31, 38, 47, 54, 63, 74, 83, 94, 107, 118, 131, 146, 159, 174, 191, 206, 223, 242, 259, 278, 299, 318, 339, 362, 383, 406, 431, 454, 479, 506, 531, 558, 587, 614, 643, 674, 703, 734, 767, 798, 831, 866, 899, 934, 971, 1006, 1043, 1082, 1119, 1158
Offset: 1

Views

Author

R. H. Hardin, Nov 13 2011

Keywords

Examples

			Some solutions for n=6:
..3....4....2....6....5....2....0....6....1....0....0....5....6....1....4....3
.-2....0....1...-2....6....3...-1...-1....2....1....1....0...-3....0...-1....1
.-1....1....2...-1...-6...-3....0....0....3....2...-1....1...-2....1....0....2
..0...-5...-5...-3...-5...-2....1...-5...-6...-3....0...-6...-1...-2...-3...-6
		

Crossrefs

Row 4 of A200181.
A014206 is a related sequence.

Formula

Empirical: a(n) = 2*a(n-1) -a(n-2) +a(n-3) -2*a(n-4) +a(n-5)
a(3*k-2) = ((3*k+1)^2)/3 - 7/3.
a(3*k-1) = ((3*k+2)^2)/3 - 7/3.
a(3*k) = ((3*k+3)^2)/3 - 1 = 3*(k+1)^2 - 1.
a(3*k+1) = ((3*k+4)^2)/3 - 7/3.
a(3*k+2) = ((3*k+5)^2)/3 - 7/3 ... and so on.
The terms a(3*k-1) and a(3*k+1) seem to be terms of A241199: numbers n such that 4 consecutive terms of binomial(n,k) satisfy a quadratic relation for 0 <= k <= n/2. - Avi Friedlich, Apr 28 2015
Empirical g.f.: -x*(2*x^4-5*x^3+2*x^2+3) / ((x-1)^3*(x^2+x+1)). - Colin Barker, Apr 28 2015

A213671 The odd part of n^2 - n + 2.

Original entry on oeis.org

1, 1, 1, 7, 11, 1, 11, 29, 37, 23, 7, 67, 79, 23, 53, 121, 137, 77, 43, 191, 211, 29, 127, 277, 301, 163, 11, 379, 407, 109, 233, 497, 529, 281, 149, 631, 667, 11, 371, 781, 821, 431, 113, 947, 991, 259, 541, 1129, 1177, 613, 319, 1327, 1379, 179
Offset: 1

Views

Author

Vladimir Shevelev, Mar 03 2013

Keywords

Comments

The first composite term s of this sequence which is not multiple of a prime term appeared before s is a(245) = 29891 = 71*421 - neither of 71, 421 are terms before a(245). - Peter J. C. Moses, Mar 03 2013
The probability that n points uniformly distributed in (or on) a sphere are in the same hemisphere is (n^2-n+2)/2^n, for which this is the numerator. - Charles R Greathouse IV, Sep 18 2013

Crossrefs

Programs

Formula

a(n) = A000265(n^2-n+2). - R. J. Mathar, Mar 10 2013

A213921 Natural numbers placed in table T(n,k) layer by layer. The order of placement: at the beginning filled odd places of layer clockwise, next - even places clockwise. Table T(n,k) read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 10, 8, 9, 13, 17, 14, 6, 16, 21, 26, 22, 11, 12, 25, 31, 37, 32, 18, 15, 20, 36, 43, 50, 44, 27, 23, 24, 30, 49, 57, 65, 58, 38, 33, 19, 35, 42, 64, 73, 82, 74, 51, 45, 28, 29, 48, 56, 81, 91, 101, 92, 66, 59, 39, 34, 41, 63, 72, 100, 111
Offset: 1

Views

Author

Boris Putievskiy, Mar 05 2013

Keywords

Comments

A permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1). Enumeration table T(n,k) is layer by layer. The order of the list:
T(1,1)=1;
T(1,2), T(2,1), T(2,2);
. . .
T(1,n), T(3,n), ... T(n,3), T(n,1), T(2,n), T(4,n), ... T(n,4), T(n,2);
...

Examples

			The start of the sequence as table:
   1   2   5  10  17  26 ...
   3   4   8  14  22  32 ...
   7   9   6  11  18  27 ...
  13  16  12  15  23  33 ...
  21  25  20  24  19  28 ...
  31  36  30  35  29  34 ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   2,  3;
   5,  4,  7;
  10,  8,  9, 13;
  17, 14,  6, 16, 21;
  26, 22, 11, 12, 25, 31;
  ...
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    if i > j:
       result=i*i-(j%2)*i+2-int((j+2)/2)
    else:
       result=j*j-((i%2)+1)*j + int((i+3)/2)

Formula

As a table:
T(n,k) = n*n - (k mod 2)*n + 2 - floor((k+2)/2), if n>k;
T(n,k) = k*k - ((n mod 2)+1)*k + floor((n+3)/2), if n<=k.
As a linear sequence:
a(n) = i*i - (j mod 2)*i + 2 - floor((j+2)/2), if i>j;
a(n) = j*j - ((i mod 2)+1)*j + floor((i+3)/2), if i<=j; where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2).

A318274 Triangle read by rows: T(n,k) = n for 0 < k < n and T(n,0) = T(n,n) = 1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

T(n,k) is the number of binary bitonic words of length n having k letters 1.
Draw a circular rosette such that all the circles contain the rosette's center. Then T(n,k) is also the number of regions in the plane located inside k circles. In fact, a region can be encoded by a binary bitonic word as follows: label each circle from 1 to n in clockwise or counterclockwise order, then write a length n binary word such that the i-th letter indicates whether the concerned region does (write 1) or does not (write 0) lie inside the i-th circle.
Row n is a partition of A014206(n-1) for n > 0.

Examples

			Triangle begins:
n\k| 0  1  2  3  4  5  6  7  8
---+--------------------------
0  | 1
1  | 1  1
2  | 1  2  1
3  | 1  3  3  1
4  | 1  4  4  4  1
5  | 1  5  5  5  5  1
6  | 1  6  6  6  6  6  1
7  | 1  7  7  7  7  7  7  1
8  | 1  8  8  8  8  8  8  8  1
...
For n = 5, the binary bitonic words are
(k = 0) 00000;
(k = 1) 10000, 01000, 00100, 00010, 00001;
(k = 2) 11000, 01100, 00110, 00011, 10001;
(k = 3) 11100, 01110, 00111, 10011, 11001;
(k = 4) 11110, 01111, 10111, 11011, 11101;
(k = 5) 11111.
		

Crossrefs

Row sums: A014206 preceded by 1.

Programs

  • Mathematica
    Table[If[k == n || k == 0, 1, n], {n, 0, 20}, {k, 0, n}] // Flatten
  • Maxima
    T(n, k) := if k = 0 or k = n then 1 else if k < n then n else 0$
    for n:0 thru 10 do print(makelist(T(n, k), k, 0, n));
    
  • PARI
    T(n,k) = if ((k==0) || (k==n), 1, n);
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", ")); print); \\ Michel Marcus, Aug 25 2018
    
  • Python
    from math import isqrt
    def A318274(n): return 1 if 0<=(k:=n+1<<1)-(r:=(m:=isqrt(k))*(m+1))<=2 else m-(k<=r) # Chai Wah Wu, Nov 09 2024

Formula

The n-th row are the coefficients in the expansion of 1 + x^n + n*x*(1 - x^(n - 1))/(1 - x), n > 0.
G.f. for column k > 0: (((1 - k)*x^2 - (1 - k)*x + 1)*x^k)/(x - 1)^2.
T(n+1,n-k) - n + k = A128227(n,k).

A171746 Let f(n) = n + floor(sqrt(n)). Then a(n) is the smallest number of iterations of f on n such that a perfect square is obtained.

Original entry on oeis.org

3, 2, 1, 5, 2, 4, 1, 3, 7, 2, 4, 6, 1, 3, 5, 9, 2, 4, 6, 8, 1, 3, 5, 7, 11, 2, 4, 6, 8, 10, 1, 3, 5, 7, 9, 13, 2, 4, 6, 8, 10, 12, 1, 3, 5, 7, 9, 11, 15, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 17, 2, 4, 6, 8, 10, 12, 14, 16, 1, 3, 5, 7, 9, 11, 13, 15, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 5
Offset: 1

Views

Author

Neven Juric (neven.juric(AT)apis-it.hr), Oct 07 2010

Keywords

Comments

Iterate A028392, starting with n: a(n) is the number of steps until a square will be reached. - Reinhard Zumkeller, Feb 23 2012

Examples

			f(9)=12, f(12)=15, f(15)=18, f(18)=22, f(22)=26, f(26)=31, f(31)=36. The first square number in this sequence 12,15,18,22,26,31,36 is on the seventh place and therefore a(9)=7.
		

References

  • Matematicko-fizicki list 1/144, problem 2-2, page 29, (1985-1986).

Crossrefs

Programs

  • Haskell
    a171746 = (+ 1) . length . takeWhile (== 0) .
                               map a010052 . tail . iterate a028392
    -- Reinhard Zumkeller, Feb 23 2012, Oct 14 2010
    
  • Mathematica
    f[n_] := Length@ NestWhileList[ # + Floor@Sqrt@# &, n, ! IntegerQ@Sqrt@# || # == n &] - 1; Array[f, 93] (* Robert G. Wilson v, Oct 08 2010 *)
  • PARI
    f(n) = n + sqrtint(n); \\ A028392
    a(n) = my(k=1); while (!issquare(n=f(n)), k++); k; \\ Michel Marcus, Nov 06 2022

Formula

From Robert G. Wilson v, Oct 08 2010: (Start)
a(k)=1 for A002061(n): n^2 - n + 1 for n>1;
a(k)=2 for A002522(n): n^2 + 1 for n>1;
a(k)=3 for A014206(n): n^2 + n + 2 for n>1;
a(k)=4 for A059100(n): n^2 + 2 for n>1;
a(k)=5 for A027688(n): n^2 + n + 3 for n>2;
a(k)=6 for A117950(n): n^2 + 3 for n>2;
a(k)=7 for A027689(n): n^2 + n + 4 for n>4;
a(k)=8 for A087475(n): n^2 + 4 for n>3;
a(k)=9 for A027690(n): n^2 + n + 5 for n>4; ... (End)
a(n^2) = 2*n + 1: a(A000290(n)) = A005408(n). - Reinhard Zumkeller, Oct 14 2010

A234305 Irregular triangle read by rows. Theoretical distribution of electrons based on the Janet's sequence A167268.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Jan 02 2014

Keywords

Comments

a(n) is not A173642, a compact Bohr-Stoner model (1924), modified by Charles Janet in 1930. The good distribution is A168208.
Only sequences N16(n) in A234398 are used:
N16(1)= 1 followed by 2's = A040000,
N16(2)= 1, 2, 3, 4, 5, followed by 6's = A101272,
N16(3)= 1 to 9, followed by 10's,
N16(4)= 1 to 13, followed by 14's, etc.
The distribution by rows are in the example.
The N16(n)'s are respectively on columns (hence triangle T)
1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, A002620(n+2)
3, 5, 8, 11, 15, 19, 24, 29, 35, A024206(n+2)
7, 10, 14, 18, 23, 28, 34, A014616(n+3)
13, 17, 22, 27, 33, A004116(n+4)
21, 26, 32,
31, etc.
See A163255.
Antidiagonals give the natural numbers A000027, like rows sums in the example.
A033638=1, 1, 2, 3, 5, 7,... is upon the triangle T.

Examples

			1,      H
2,       He
2, 1,    Li
2, 2,    Be
2, 2, 1,
2, 2, 2,
2, 2, 3,
2, 2, 4,
2, 2, 5,
2, 2, 6,
2, 2, 6, 1,
2, 2, 6, 2,
2, 2, 6, 2, 1,
2, 2, 6, 2, 2,
2, 2, 6, 2, 3,
2, 2, 6, 2, 4,
2, 2, 6, 2, 5,
2, 2, 6, 2, 6,
2, 2, 6, 2, 6, 1,
2, 2, 6, 2, 6, 2,
2, 2, 6, 2, 6, 2, 1,
2, 2, 6, 2, 6, 2, 2,
2, 2, 6, 2, 6, 2, 3, etc.
		

Crossrefs

Cf. A002061, A002522 (or A160457), A014206, A059100, diagonals of the triangle T. A004526.

A288487 Cuboids that fit in square rings from A288486 obtaining a fifth power.

Original entry on oeis.org

1, 8, 75, 400, 1445, 4056, 9583, 20000, 38025, 67240, 112211, 178608, 273325, 404600, 582135, 817216, 1122833, 1513800, 2006875, 2620880, 3376821, 4298008, 5410175, 6741600, 8323225, 10188776, 12374883, 14921200, 17870525, 21268920, 25165831, 29614208
Offset: 0

Views

Author

Daniel Poveda Parrilla, Jun 11 2017

Keywords

Comments

If we add a(n) and A288487(n) graphically we obtain a bigger cuboid which is a square of cubes (a cuboid with dimensions n^2 * n^2 * n).
a(10^n) is a palindrome in base 10.

Crossrefs

Programs

  • Mathematica
    Table[(1 + n)*(1 + n^2)^2, {n, 0, 28}] (* or *) CoefficientList[Series[(1 + 2 x + 42 x^2 + 50 x^3 + 25 x^4)/(1 - x)^6, {x, 0, 28}], x] (* or *) LinearRecurrence[{6, -15, 20, -15, 6, -1}, {1, 8, 75, 400, 1445, 4056}, 29]
  • PARI
    Vec((1 + 2*x + 42*x^2 + 50*x^3 + 25*x^4)/(1 - x)^6 + O(x^28))

Formula

G.f.: (1 + 2*x + 42*x^2 + 50*x^3 + 25*x^4)/(1 - x)^6.
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6).
a(n) = (n + 1)*(n^2 + 1)^2 = (n + 1)*(A002522(n))^2 = (n + 1)*A082044(n).
a(n) = n^5 + A002061(A002061(n+1)).
a(n) = A000584(n+1) - A288486(n)
a(n) = (n + 1)*A059100(n-1) + 4*(n^2 -1)*A014206(n-1) for n > 1.

A342940 Triangle read by rows: T(n, k) is the Skolem number of the parallelogram graph P_{n, k}, with 1 < k <= n.

Original entry on oeis.org

2, 3, 4, 4, 6, 8, 5, 8, 11, 14, 6, 10, 14, 18, 22, 7, 12, 17, 22, 27, 32, 8, 14, 20, 26, 32, 38, 44, 9, 16, 23, 30, 37, 44, 51, 58, 10, 18, 26, 34, 42, 50, 58, 66, 74, 11, 20, 29, 38, 47, 56, 65, 74, 83, 92, 12, 22, 32, 42, 52, 62, 72, 82, 92, 102, 112, 13, 24, 35, 46, 57, 68, 79, 90, 101, 112, 123, 134
Offset: 2

Views

Author

Stefano Spezia, Mar 30 2021

Keywords

Comments

For the meaning of Skolem number of a graph, see Definitions 1.4 and 1.5 in Carrigan and Green.

Examples

			The triangle T(n, k) begins:
n\k|   2   3   4   5   6   7
---+------------------------
2  |   2
3  |   3   4
4  |   4   6   8
5  |   5   8  11  14
6  |   6  10  14  18  22
7  |   7  12  17  22  27  32
...
		

Crossrefs

For n > 1, 3*A002061(n) gives the Skolem number of the hexagonal grid graph H_n.

Programs

  • Mathematica
    T[n_,k_]:=k*n-2k-n+4; Table[T[n,k],{n,2,13},{k,2,n}]//Flatten

Formula

O.g.f.: (4 - 6*y - x*(5 - 8*y))/((1 - x)^2*(1 - y)^2).
E.g.f.: exp(x+y)*(4 - x*(1 - y) - 2*y).
T(n, k) = k*n - 2*k - n + 4 (see Theorem 3.3 in Carrigan and Green).
Sum_{k=2..n} T(n, k) = A229183(n-1).
T(n, n) = A014206(n-2).
Previous Showing 31-40 of 50 results. Next