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

A005563 a(n) = n*(n+2) = (n+1)^2 - 1.

Original entry on oeis.org

0, 3, 8, 15, 24, 35, 48, 63, 80, 99, 120, 143, 168, 195, 224, 255, 288, 323, 360, 399, 440, 483, 528, 575, 624, 675, 728, 783, 840, 899, 960, 1023, 1088, 1155, 1224, 1295, 1368, 1443, 1520, 1599, 1680, 1763, 1848, 1935, 2024, 2115, 2208, 2303, 2400, 2499, 2600
Offset: 0

Views

Author

Keywords

Comments

Erdős conjectured that n^2 - 1 = k! has a solution if and only if n is 5, 11 or 71 (when k is 4, 5 or 7).
Second-order linear recurrences y(m) = 2y(m-1) + a(n)*y(m-2), y(0) = y(1) = 1, have closed form solutions involving only powers of integers. - Len Smiley, Dec 08 2001
Number of edges in the join of two cycle graphs, both of order n, C_n * C_n. - Roberto E. Martinez II, Jan 07 2002
Let k be a positive integer, M_n be the n X n matrix m_(i,j) = k^abs(i-j) then det(M_n) = (-1)^(n-1)*a(k-1)^(n-1). - Benoit Cloitre, May 28 2002
Also numbers k such that 4*k + 4 is a square. - Cino Hilliard, Dec 18 2003
For each term k, the function sqrt(x^2 + 1), starting with 1, produces an integer after k iterations. - Gerald McGarvey, Aug 19 2004
a(n) mod 3 = 0 if and only if n mod 3 > 0: a(A008585(n)) = 2; a(A001651(n)) = 0; a(n) mod 3 = 2*(1-A079978(n)). - Reinhard Zumkeller, Oct 16 2006
a(n) is the number of divisors of a(n+1) that are not greater than n. - Reinhard Zumkeller, Apr 09 2007
Nonnegative X values of solutions to the equation X^3 + X^2 = Y^2. To find Y values: b(n) = n(n+1)(n+2). - Mohamed Bouhamida, Nov 06 2007
Sequence allows us to find X values of the equation: X + (X + 1)^2 + (X + 2)^3 = Y^2. To prove that X = n^2 + 2n: Y^2 = X + (X + 1)^2 + (X + 2)^3 = X^3 + 7*X^2 + 15X + 9 = (X + 1)(X^2 + 6X + 9) = (X + 1)*(X + 3)^2 it means: (X + 1) must be a perfect square, so X = k^2 - 1 with k>=1. we can put: k = n + 1, which gives: X = n^2 + 2n and Y = (n + 1)(n^2 + 2n + 3). - Mohamed Bouhamida, Nov 12 2007
From R. K. Guy, Feb 01 2008: (Start)
Toads and Frogs puzzle:
This is also the number of moves that it takes n frogs to swap places with n toads on a strip of 2n + 1 squares (or positions, or lily pads) where a move is a single slide or jump, illustrated for n = 2, a(n) = 8 by
T T - F F
T - T F F
T F T - F
T F T F -
T F - F T
- F T F T
F - T F T
F F T - T
F F - T T
I was alerted to this by the Holton article, but on consulting Singmaster's sources, I find that the puzzle goes back at least to 1867.
Probably the first to publish the number of moves for n of each animal was Edouard Lucas in 1883. (End)
a(n+1) = terms of rank 0, 1, 3, 6, 10 = A000217 of A120072 (3, 8, 5, 15). - Paul Curtz, Oct 28 2008
Row 3 of array A163280, n >= 1. - Omar E. Pol, Aug 08 2009
Final digit belongs to a periodic sequence: 0, 3, 8, 5, 4, 5, 8, 3, 0, 9. - Mohamed Bouhamida, Sep 04 2009 [Comment edited by N. J. A. Sloane, Sep 24 2009]
Let f(x) be a polynomial in x. Then f(x + n*f(x)) is congruent to 0 (mod f(x)); here n belongs to N. There is nothing interesting in the quotients f(x + n*f(x))/f(x) when x belongs to Z. However, when x is irrational these quotients consist of two parts, a) rational integers and b) integer multiples of x. The present sequence represents the non-integer part when the polynomial is x^2 + x + 1 and x = sqrt(2), f(x+n*f(x))/f(x) = A056108(n) + a(n)*sqrt(2). - A.K. Devaraj, Sep 18 2009
For n >= 1, a(n) is the number for which 1/a(n) = 0.0101... (A000035) in base (n+1). - Rick L. Shepherd, Sep 27 2009
For n > 0, continued fraction [n, 1, n] = (n+1)/a(n); e.g., [6, 1, 6] = 7/48. - Gary W. Adamson, Jul 15 2010
Starting (3, 8, 15, ...) = binomial transform of [3, 5, 2, 0, 0, 0, ...]; e.g., a(3) = 15 = (1*3 + 2*5 +1*2) = (3 + 10 + 2). - Gary W. Adamson, Jul 30 2010
a(n) is essentially the case 0 of the polygonal numbers. The polygonal numbers are defined as P_k(n) = Sum_{i=1..n} ((k-2)*i-(k-3)). Thus P_0(n) = 2*n-n^2 and a(n) = -P_0(n+2). See also A067998 and for the case k=1 A080956. - Peter Luschny, Jul 08 2011
a(n) is the maximal determinant of a 2 X 2 matrix with integer elements from {1, ..., n+1}, so the maximum determinant of a 2x2 matrix with integer elements from {1, ..., 5} = 5^2 - 1 = a(4) = 24. - Aldo González Lorenzo, Oct 12 2011
Using four consecutive triangular numbers t1, t2, t3 and t4, plot the points (0, 0), (t1, t2), and (t3, t4) to create a triangle. Twice the area of this triangle are the numbers in this sequence beginning with n = 1 to give 8. - J. M. Bergot, May 03 2012
Given a particle with spin S = n/2 (always a half-integer value), the quantum-mechanical expectation value of the square of the magnitude of its spin vector evaluates to = S(S+1) = n(n+2)/4, i.e., one quarter of a(n) with n = 2S. This plays an important role in the theory of magnetism and magnetic resonance. - Stanislav Sykora, May 26 2012
Twice the harmonic mean [H(x, y) = (2*x*y)/(x + y)] of consecutive triangular numbers A000217(n) and A000217(n+1). - Raphie Frank, Sep 28 2012
Number m such that floor(sqrt(m)) = floor(m/floor(sqrt(m))) - 2 for m > 0. - Takumi Sato, Oct 10 2012
The solutions of equation 1/(i - sqrt(j)) = i + sqrt(j), when i = (n+1), j = a(n). For n = 1, 2 + sqrt(3) = 3.732050.. = A019973. For n = 2, 3 + sqrt(8) = 5.828427... = A156035. - Kival Ngaokrajang, Sep 07 2013
The integers in the closed form solution of a(n) = 2*a(n-1) + a(m-2)*a(n-2), n >= 2, a(0) = 0, a(1) = 1 mentioned by Len Smiley, Dec 08 2001, are m and -m + 2 where m >= 3 is a positive integer. - Felix P. Muga II, Mar 18 2014
Let m >= 3 be a positive integer. If a(n) = 2*a(n-1) + a(m-2) * a(n-2), n >= 2, a(0) = 0, a(1) = 1, then lim_{n->oo} a(n+1)/a(n) = m. - Felix P. Muga II, Mar 18 2014
For n >= 4 the Szeged index of the wheel graph W_n (with n + 1 vertices). In the Sarma et al. reference, Theorem 2.7 is incorrect. - Emeric Deutsch, Aug 07 2014
If P_{k}(n) is the n-th k-gonal number, then a(n) = t*P_{s}(n+2) - s*P_{t}(n+2) for s=t+1. - Bruno Berselli, Sep 04 2014
For n >= 1, a(n) is the dimension of the simple Lie algebra A_n. - Wolfdieter Lang, Oct 21 2015
Finding all positive integers (n, k) such that n^2 - 1 = k! is known as Brocard's problem, (see A085692). - David Covert, Jan 15 2016
For n > 0, a(n) mod (n+1) = a(n) / (n+1) = n. - Torlach Rush, Apr 04 2016
Conjecture: When using the Sieve of Eratosthenes and sieving (n+1..a(n)), with divisors (1..n) and n>0, there will be no more than a(n-1) composite numbers. - Fred Daniel Kline, Apr 08 2016
a(n) mod 8 is periodic with period 4 repeating (0,3,0,7), that is a(n) mod 8 = 5/2 - (5/2) cos(n*Pi) - sin(n*Pi/2) + sin(3*n*Pi/2). - Andres Cicuttin, Jun 02 2016
Also for n > 0, a(n) is the number of times that n-1 occurs among the first (n+1)! terms of A055881. - R. J. Cano, Dec 21 2016
The second diagonal of composites (the only prime is number 3) from the right on the Klauber triangle (see Kival Ngaokrajang link), which is formed by taking the positive integers and taking the first 1, the next 3, the following 5, and so on, each centered below the last. - Charles Kusniec, Jul 03 2017
Also the number of independent vertex sets in the n-barbell graph. - Eric W. Weisstein, Aug 16 2017
Interleaving of A000466 and A033996. - Bruce J. Nicholson, Nov 08 2019
a(n) is the number of degrees of freedom in a triangular cell for a Raviart-Thomas or Nédélec first kind finite element space of order n. - Matthew Scroggs, Apr 22 2020
From Muge Olucoglu, Jan 19 2021: (Start)
For n > 1, a(n-2) is the maximum number of elements in the second stage of the Quine-McCluskey algorithm whose minterms are not covered by the functions of n bits. At n=3, we have a(3-2) = a(1) = 1*(1+2) = 3 and f(A,B,C) = sigma(0,1,2,5,6,7).
.
0 1 2 5 6 7
+---------------
*(0,1)| X X
(0,2)| X X
(1,5)| X X
*(2,6)| X X
*(5,7)| X X
(6,7)| X X
.
*: represents the elements that are covered. (End)
1/a(n) is the ratio of the sum of the first k odd numbers and the sum of the next n*k odd numbers. - Melvin Peralta, Jul 15 2021
For n >= 1, the continued fraction expansion of sqrt(a(n)) is [n; {1, 2n}]. - Magus K. Chu, Sep 09 2022
Number of diagonals parallel to an edge in a regular (2*n+4)-gon (cf. A367204). - Paolo Xausa, Nov 21 2023
For n >= 1, also the number of minimum cyclic edge cuts in the (n+2)-trapezohedron graph. - Eric W. Weisstein, Nov 21 2024
For n >= 1, a(n) is the sum of the interior angles of a polygon with n+2 sides, in radians, multiplied by (n+2)/Pi. - Stuart E Anderson, Aug 06 2025

Examples

			G.f. = 3*x + 8*x^2 + 15*x^3 + 24*x^4 + 35*x^5 + 48*x^6 + 63*x^7 + 80*x^8 + ...
		

References

  • E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see index under Toads and Frogs Puzzle.
  • Martin Gardner, Perplexing Puzzles and Tantalizing Teasers, p. 21 (for "The Dime and Penny Switcheroo").
  • R. K. Guy, Unsolved Problems in Theory of Numbers, Section D25.
  • Derek Holton, Math in School, 37 #1 (Jan 2008) 20-22.
  • Edouard Lucas, Récréations Mathématiques, Gauthier-Villars, Vol. 2 (1883) 141-143.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

Formula

G.f.: x*(3-x)/(1-x)^3. - Simon Plouffe in his 1992 dissertation
a(n) = A000290(n+1) - 1.
A002378(a(n)) = A002378(n)*A002378(n+1); e.g., A002378(15)=240=12*20. - Charlie Marion, Dec 29 2003
a(n) = A067725(n)/3. - Zerinvary Lajos, Mar 06 2007
a(n) = Sum_{k=1..n} A144396(k). - Zerinvary Lajos, May 11 2007
a(n) = A134582(n+1)/4. - Zerinvary Lajos, Feb 01 2008
A143053(a(n)) = A000290(n+1), for n > 0. - Reinhard Zumkeller, Jul 20 2008
a(n) = Real((n+1+i)^2). - Gerald Hillier, Oct 12 2008
A053186(a(n)) = 2*n. - Reinhard Zumkeller, May 20 2009
a(n) = (n! + (n+1)!)/(n-1)!, n > 0. - Gary Detlefs, Aug 10 2009
a(n) = floor(n^5/(n^3+1)) with offset 1 (a(1)=0). - Gary Detlefs, Feb 11 2010
a(n) = a(n-1) + 2*n + 1 (with a(0)=0). - Vincenzo Librandi, Nov 18 2010
Sum_{n>=1} 1/a(n) = 3/4. - Mohammad K. Azarian, Dec 29 2010
a(n) = 2/(Integral_{x=0..Pi/2} (sin(x))^(n-1)*(cos(x))^3), for n > 0. - Francesco Daddi, Aug 02 2011
a(n) = A002378(n) + floor(sqrt(A002378(n))); pronic number + its root. - Fred Daniel Kline, Sep 16 2011
a(n-1) = A008833(n) * A068310(n) for n > 1. - Reinhard Zumkeller, Nov 26 2011
G.f.: U(0) where U(k) = -1 + (k+1)^2/(1 - x/(x + (k+1)^2/U(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Oct 19 2012
a(n) = 15*C(n+4,3)*C(n+4,5)/(C(n+4,2)*C(n+4,4)). - Gary Detlefs, Aug 05 2013
a(n) = (n+2)!/((n-1)! + n!), n > 0. - Ivan N. Ianakiev, Nov 11 2013
a(n) = 3*C(n+1,2) - C(n,2) for n >= 0. - Felix P. Muga II, Mar 11 2014
a(n) = (A016742(n+1) - 4)/4 for n >= 0. - Felix P. Muga II, Mar 11 2014
a(-2 - n) = a(n) for all n in Z. - Michael Somos, Aug 07 2014
A253607(a(n)) = 1. - Reinhard Zumkeller, Jan 05 2015
E.g.f.: x*(x + 3)*exp(x). - Ilya Gutkovskiy, Jun 03 2016
For n >= 1, a(n^2 + n - 2) = a(n-1) * a(n). - Miko Labalan, Oct 15 2017
Sum_{n>=1} (-1)^(n+1)/a(n) = 1/4. - Amiram Eldar, Nov 04 2020
From Amiram Eldar, Feb 17 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = 2.
Product_{n>=1} (1 - 1/a(n)) = -sqrt(2)*sin(sqrt(2)*Pi)/Pi. (End)
a(n) = A000290(n+2) - n*2. See Bounded Squares illustration. - Leo Tavares, Oct 05 2021
From Leo Tavares, Oct 10 2021: (Start)
a(n) = A008585(n) + 2*A000217(n-1). See Trapezoids illustration.
2*A005563 = A054000(n+1). See Trapagons illustration.
a(n) = 2*A000217(n) + n. (End)
a(n) = (n+2)!!/(n-2)!! for n > 1. - Jacob Szlachetka, Jan 02 2022

Extensions

Partially edited by Joerg Arndt, Mar 11 2010
More terms from N. J. A. Sloane, Aug 01 2010

A262626 Visible parts of the perspective view of the stepped pyramid whose structure essentially arises after the 90-degree-zig-zag folding of the isosceles triangle A237593.

Original entry on oeis.org

1, 1, 1, 3, 2, 2, 2, 2, 2, 1, 1, 2, 7, 3, 1, 1, 3, 3, 3, 3, 2, 2, 3, 12, 4, 1, 1, 1, 1, 4, 4, 4, 4, 2, 1, 1, 2, 4, 15, 5, 2, 1, 1, 2, 5, 5, 3, 5, 5, 2, 2, 2, 2, 5, 9, 9, 6, 2, 1, 1, 1, 1, 2, 6, 6, 6, 6, 3, 1, 1, 1, 1, 3, 6, 28, 7, 2, 2, 1, 1, 2, 2, 7, 7, 7, 7, 3, 2, 1, 1, 2, 3, 7, 12, 12, 8, 3, 1, 2, 2, 1, 3, 8, 8, 8, 8, 8, 3, 2, 1, 1
Offset: 1

Views

Author

Omar E. Pol, Sep 26 2015

Keywords

Comments

Also the rows of both triangles A237270 and A237593 interleaved.
Also, irregular triangle read by rows in which T(n,k) is the area of the k-th region (from left to right in ascending diagonal) of the n-th symmetric set of regions (from the top to the bottom in descending diagonal) in the two-dimensional diagram of the perspective view of the infinite stepped pyramid described in A245092 (see the diagram in the Links section).
The diagram of the symmetric representation of sigma is also the top view of the pyramid, see Links section. For more information about the diagram see also A237593 and A237270.
The number of cubes at the n-th level is also A024916(n), the sum of all divisors of all positive integers <= n.
Note that this pyramid is also a quarter of the pyramid described in A244050. Both pyramids have infinitely many levels.
Odd-indexed rows are also the rows of the irregular triangle A237270.
Even-indexed rows are also the rows of the triangle A237593.
Lengths of the odd-indexed rows are in A237271.
Lengths of the even-indexed rows give 2*A003056.
Row sums of the odd-indexed rows gives A000203, the sum of divisors function.
Row sums of the even-indexed rows give the positive even numbers (see A005843).
Row sums give A245092.
From the front view of the stepped pyramid emerges a geometric pattern which is related to A001227, the number of odd divisors of the positive integers.
The connection with the odd divisors of the positive integers is as follows: A261697 --> A261699 --> A237048 --> A235791 --> A237591 --> A237593 --> A237270 --> this sequence.

Examples

			Irregular triangle begins:
  1;
  1, 1;
  3;
  2, 2;
  2, 2;
  2, 1, 1, 2;
  7;
  3, 1, 1, 3;
  3, 3;
  3, 2, 2, 3;
  12;
  4, 1, 1, 1, 1, 4;
  4, 4;
  4, 2, 1, 1, 2, 4;
  15;
  5, 2, 1, 1, 2, 5;
  5, 3, 5;
  5, 2, 2, 2, 2, 5;
  9, 9;
  6, 2, 1, 1, 1, 1, 2, 6;
  6, 6;
  6, 3, 1, 1, 1, 1, 3, 6;
  28;
  7, 2, 2, 1, 1, 2, 2, 7;
  7, 7;
  7, 3, 2, 1, 1, 2, 3, 7;
  12, 12;
  8, 3, 1, 2, 2, 1, 3, 8;
  8, 8, 8;
  8, 3, 2, 1, 1, 1, 1, 2, 3, 8;
  31;
  9, 3, 2, 1, 1, 1, 1, 2, 3, 9;
  ...
Illustration of the odd-indexed rows of triangle as the diagram of the symmetric representation of sigma which is also the top view of the stepped pyramid:
.
   n  A000203    A237270    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   1     1   =      1      |_| | | | | | | | | | | | | | | |
   2     3   =      3      |_ _|_| | | | | | | | | | | | | |
   3     4   =    2 + 2    |_ _|  _|_| | | | | | | | | | | |
   4     7   =      7      |_ _ _|    _|_| | | | | | | | | |
   5     6   =    3 + 3    |_ _ _|  _|  _ _|_| | | | | | | |
   6    12   =     12      |_ _ _ _|  _| |  _ _|_| | | | | |
   7     8   =    4 + 4    |_ _ _ _| |_ _|_|    _ _|_| | | |
   8    15   =     15      |_ _ _ _ _|  _|     |  _ _ _|_| |
   9    13   =  5 + 3 + 5  |_ _ _ _ _| |      _|_| |  _ _ _|
  10    18   =    9 + 9    |_ _ _ _ _ _|  _ _|    _| |
  11    12   =    6 + 6    |_ _ _ _ _ _| |  _|  _|  _|
  12    28   =     28      |_ _ _ _ _ _ _| |_ _|  _|
  13    14   =    7 + 7    |_ _ _ _ _ _ _| |  _ _|
  14    24   =   12 + 12   |_ _ _ _ _ _ _ _| |
  15    24   =  8 + 8 + 8  |_ _ _ _ _ _ _ _| |
  16    31   =     31      |_ _ _ _ _ _ _ _ _|
  ...
The above diagram arises from a simpler diagram as shown below.
Illustration of the even-indexed rows of triangle as the diagram of the deployed front view of the corner of the stepped pyramid:
.
.                                 A237593
Level                               _ _
1                                 _|1|1|_
2                               _|2 _|_ 2|_
3                             _|2  |1|1|  2|_
4                           _|3   _|1|1|_   3|_
5                         _|3    |2 _|_ 2|    3|_
6                       _|4     _|1|1|1|1|_     4|_
7                     _|4      |2  |1|1|  2|      4|_
8                   _|5       _|2 _|1|1|_ 2|_       5|_
9                 _|5        |2  |2 _|_ 2|  2|        5|_
10              _|6         _|2  |1|1|1|1|  2|_         6|_
11            _|6          |3   _|1|1|1|1|_   3|          6|_
12          _|7           _|2  |2  |1|1|  2|  2|_           7|_
13        _|7            |3    |2 _|1|1|_ 2|    3|            7|_
14      _|8             _|3   _|1|2 _|_ 2|1|_   3|_             8|_
15    _|8              |3    |2  |1|1|1|1|  2|    3|              8|_
16   |9                |3    |2  |1|1|1|1|  2|    3|                9|
...
The number of horizontal line segments in the n-th level in each side of the diagram equals A001227(n), the number of odd divisors of n.
The number of horizontal line segments in the left side of the diagram plus the number of the horizontal line segment in the right side equals A054844(n).
The total number of vertical line segments in the n-th level of the diagram equals A131507(n).
The diagram represents the first 16 levels of the pyramid.
The diagram of the isosceles triangle and the diagram of the top view of the pyramid shows the connection between the partitions into consecutive parts and the sum of divisors function (see also A286000 and A286001). - _Omar E. Pol_, Aug 28 2018
The connection between the isosceles triangle and the stepped pyramid is due to the fact that this object can also be interpreted as a pop-up card. - _Omar E. Pol_, Nov 09 2022
		

Crossrefs

Famous sequences that are visible in the stepped pyramid:
Cf. A000040 (prime numbers)......., for the characteristic shape see A346871.
Cf. A000079 (powers of 2)........., for the characteristic shape see A346872.
Cf. A000203 (sum of divisors)....., total area of the terraces in the n-th level.
Cf. A000217 (triangular numbers).., for the characteristic shape see A346873.
Cf. A000225 (Mersenne numbers)...., for a visualization see A346874.
Cf. A000384 (hexagonal numbers)..., for the characteristic shape see A346875.
Cf. A000396 (perfect numbers)....., for the characteristic shape see A346876.
Cf. A000668 (Mersenne primes)....., for a visualization see A346876.
Cf. A001097 (twin primes)........., for a visualization see A346871.
Cf. A001227 (# of odd divisors)..., number of subparts in the n-th level.
Cf. A002378 (oblong numbers)......, for a visualization see A346873.
Cf. A008586 (multiples of 4)......, perimeters of the successive levels.
Cf. A008588 (multiples of 6)......, for the characteristic shape see A224613.
Cf. A013661 (zeta(2))............., (area of the horizontal faces)/(n^2), n -> oo.
Cf. A014105 (second hexagonals)..., for the characteristic shape see A346864.
Cf. A067742 (# of middle divisors), # cells in the main diagonal in n-th level.
Apart from zeta(2) other constants that are related to the stepped pyramid are A072691, A353908, A354238.

A254858 Iterated partial sums of prime numbers, square array read by diagonals.

Original entry on oeis.org

2, 2, 3, 2, 5, 5, 2, 7, 10, 7, 2, 9, 17, 17, 11, 2, 11, 26, 34, 28, 13, 2, 13, 37, 60, 62, 41, 17, 2, 15, 50, 97, 122, 103, 58, 19, 2, 17, 65, 147, 219, 225, 161, 77, 23, 2, 19, 82, 212, 366, 444, 386, 238, 100, 29, 2, 21, 101, 294, 578, 810, 830, 624, 338, 129, 31
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 08 2015

Keywords

Comments

Row n+1 = partial sums of row n.
T(n,1) = A002522(n+1); T(n,2) = A144396(n+1); T(n,3) = A002522(n+2).

Examples

			. n\k | 1  2  3   4   5    6    7     8     9    10    11     12     13
. ----+------------------------------------------------------------------
.  0  | 2  3  5   7  11   13   17    19    23    29    31     37     41 ..
.  1  | 2  5 10  17  28   41   58    77   100   129   160    197    238 ..
.  2  | 2  7 17  34  62  103  161   238   338   467   627    824   1062 ..
.  3  | 2  9 26  60 122  225  386   624   962  1429  2056   2880   3942 ..
.  4  | 2 11 37  97 219  444  830  1454  2416  3845  5901   8781  12723 ..
.  5  | 2 13 50 147 366  810 1640  3094  5510  9355 15256  24037  36760 ..
.  6  | 2 15 65 212 578 1388 3028  6122 11632 20987 36243  60280  97040 ..
.  7  | 2 17 82 294 872 2260 5288 11410 23042 44029 80272 140552 237592 ...
		

Crossrefs

Cf. A000040 (row 0), A007504 (row 1), A014148 (row 2), A014150 (row 3), A178138 (row 4), A254784 (row 5).
Cf. A007395 (column 1), A144396 (column 2), A002522 (column 3).
Cf. A125180 (antidiagonal sums), A125179 (diagonals downward).

Programs

  • Haskell
    a254858_tabl = diags [] $ iterate (scanl1 (+)) a000040_list where
       diags uss (vs:vss) = (map head wss) : diags (map tail wss) vss
                            where wss = vs : uss
    a254858_list = concat a254858_tabl
  • Mathematica
    nmax = 11;
    row[0] = Prime[Range[nmax+1]];
    row[n_] := row[n] = row[n-1] // Accumulate;
    T[n_, k_] := row[n][[k]];
    Table[T[n-k, k], {n, 0, nmax}, {k, 1, n}] // Flatten (* Jean-François Alcover, Oct 11 2021 *)

A260717 Square array: row n gives the numbers remaining before the stage n of Ludic sieve.

Original entry on oeis.org

2, 3, 3, 4, 5, 5, 5, 7, 7, 7, 6, 9, 11, 11, 11, 7, 11, 13, 13, 13, 13, 8, 13, 17, 17, 17, 17, 17, 9, 15, 19, 23, 23, 23, 23, 23, 10, 17, 23, 25, 25, 25, 25, 25, 25, 11, 19, 25, 29, 29, 29, 29, 29, 29, 29, 12, 21, 29, 31, 37, 37, 37, 37, 37, 37, 37, 13, 23, 31, 37, 41, 41, 41, 41, 41, 41, 41, 41, 14, 25, 35, 41, 43, 43, 43, 43, 43, 43, 43, 43, 43
Offset: 1

Views

Author

Antti Karttunen, Jul 30 2015

Keywords

Comments

This square array A(row,col) is read by downwards antidiagonals as: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
Ludic sieve starts with natural numbers larger than one: 2, 3, 4, 5, 6, 7, ... and in each subsequent stage one sets k = (which will be one of Ludic numbers) and removes both k and every k-th term after it, from column positions 1, 1+k, 1+2k, 1+3k, etc. of the preceding row to produce the next row of this array.

Examples

			The top left corner of the array:
   2,  3,  4,  5,  6,  7,  8,  9,  10,  11,  12,  13,  14,  15,  16,  17
   3,  5,  7,  9, 11, 13, 15, 17,  19,  21,  23,  25,  27,  29,  31,  33
   5,  7, 11, 13, 17, 19, 23, 25,  29,  31,  35,  37,  41,  43,  47,  49
   7, 11, 13, 17, 23, 25, 29, 31,  37,  41,  43,  47,  53,  55,  59,  61
  11, 13, 17, 23, 25, 29, 37, 41,  43,  47,  53,  55,  61,  67,  71,  73
  13, 17, 23, 25, 29, 37, 41, 43,  47,  53,  61,  67,  71,  73,  77,  83
  17, 23, 25, 29, 37, 41, 43, 47,  53,  61,  67,  71,  77,  83,  89,  91
  23, 25, 29, 37, 41, 43, 47, 53,  61,  67,  71,  77,  83,  89,  91,  97
  25, 29, 37, 41, 43, 47, 53, 61,  67,  71,  77,  83,  89,  91,  97, 107
  29, 37, 41, 43, 47, 53, 61, 67,  71,  77,  83,  89,  91,  97, 107, 115
  37, 41, 43, 47, 53, 61, 67, 71,  77,  83,  89,  91,  97, 107, 115, 119
  41, 43, 47, 53, 61, 67, 71, 77,  83,  89,  91,  97, 107, 115, 119, 121
  43, 47, 53, 61, 67, 71, 77, 83,  89,  91,  97, 107, 115, 119, 121, 127
  47, 53, 61, 67, 71, 77, 83, 89,  91,  97, 107, 115, 119, 121, 127, 131
  53, 61, 67, 71, 77, 83, 89, 91,  97, 107, 115, 119, 121, 127, 131, 143
  61, 67, 71, 77, 83, 89, 91, 97, 107, 115, 119, 121, 127, 131, 143, 149
  etc.
		

Crossrefs

Transpose: A260718.
Column 1: A003309 (without the initial 1).
Row 1: A020725, Row 2: A144396, Row 3: A007310 (from its second term onward), Row 4: A260714, Row 5: A260715.
Cf. A255127 (gives the numbers removed at each stage).
Cf. also array A258207.

Programs

  • Scheme
    (define (A260717 n) (A260717bi (A002260 n) (A004736 n)))
    (define (A260717bi row col) ((rowfun_n_for_A003309sieve row) col))
    (define (add1 n) (1+ n))
    ;; Uses definec-macro which can memoize also function-closures:
    (definec (rowfun_n_for_A003309sieve n) (if (= 1 n) add1 (let* ((prevrowfun (rowfun_n_for_A003309sieve (- n 1))) (everynth (prevrowfun 1))) (compose-funs prevrowfun (nonzero-pos 1 1 (lambda (i) (modulo (- i 1) everynth)))))))

A341729 Maximum number of sides in any cell in a regular n-gon with all diagonals drawn (cf. A007678).

Original entry on oeis.org

3, 3, 5, 4, 7, 4, 9, 5, 11, 4, 13, 5, 15, 6, 17, 7, 19, 8, 21, 8, 23, 6, 25, 8, 27, 8, 29, 6, 31, 7, 33, 8, 35, 8, 37, 8, 39, 12, 41, 8, 43, 10, 45, 8, 47, 10, 49, 10, 51, 8, 53, 10, 55, 10, 57, 10, 59, 9, 61, 10, 63, 10, 65, 9, 67, 10, 69, 10, 71, 10, 73, 10, 75, 12, 77, 10, 79, 10
Offset: 3

Views

Author

Keywords

Comments

For a(2*n) see A341730.
Theorem: a(2*n+1) = 2*n+1. For the proof see A342222.
It would be nice to have a bigger b-file.

Crossrefs

Extensions

a(141) and beyond from Scott R. Shannon, Nov 30 2021

A260590 The modified Syracuse algorithm, msa, applied to 2n+1.

Original entry on oeis.org

4, 2, 7, 2, 5, 2, 7, 2, 4, 2, 5, 2, 59, 2, 56, 2, 4, 2, 8, 2, 5, 2, 54, 2, 4, 2, 5, 2, 7, 2, 54, 2, 4, 2, 51, 2, 5, 2, 8, 2, 4, 2, 5, 2, 45, 2, 8, 2, 4, 2, 42, 2, 5, 2, 31, 2, 4, 2, 5, 2, 8, 2, 15, 2, 4, 2, 7, 2, 5, 2, 7, 2, 4, 2, 5, 2, 40, 2, 21, 2, 4, 2, 29, 2, 5, 2, 8, 2, 4, 2, 5, 2, 7, 2, 13
Offset: 1

Views

Author

Joseph K. Horn and Robert G. Wilson v, Jul 29 2015

Keywords

Comments

Normally the '3x+1 problem' or 'Collatz problem' asks for the number of steps to go from n to 1 (A006577). Here we ask for the number of iterations of the mapping, msa, to go from n to less than n; the mapping of x is either -> (3x+1)/2 if x is odd or -> x/2 if x is even.
Since the number of iterations of msa for an even number is always 1, we will only investigate the odd numbers greater than one.
a(n) = 1 for no values of n;
a(n) = 2 for n = 2 + 2k (k=0,1,2,3,...);
a(n) = 3 for no values of n;
a(n) = 4 for n = 1 + 8k (k=0,1,2,3,...);
a(n) = 5 for n = 5 + 16k and 11 + 16k (k=0,1,2,3,...);
a(n) = 6 for no values of n;
a(n) = 7 for n = 3 + 64k, 7 + 64k, 29 + 64k, etc. (k=0,1,2,3,...).
Possible values for a(n) are: 2, 4, 5, 7, 8, 10, 12, 13, 15, 16, 18, 20, 21, 23, 24, 26, 27, 29, ... (A260593, sorted). Density is ~ 5/8.
Record values: 4, 7, 59, 81, 105, 135, 164, 165, 173, 176, 183, 224, 246, 287, 292, 298, 308, 376, 395, 398, 433, 447, 547, ....
And the records occur for n: 1, 3, 13, 351, 5043, 17827, 135135, 181171, 190863, 313165, 513715, 563007, 4044031, 6710835, 10319167, 13358335, 28462477, 31864063, 108870007, 600495895, 913698783, 1394004493, ....
Remember these n-values are the indices of odd numbers (A005408).

Examples

			a(1) is 4 because 2n+1 is 3 and 3 -> 5 -> 8 -> 4 -> 2. The number of iterations of the msa is 4;
a(2) is 2 because 2n+1 is 5 and 5 -> 8 -> 4. The number of iterations of the msa is 2;
a(3) is 7 because 2n+2 is 7 and 7 -> 11 -> 17 -> 26 -> 13 -> 20 -> 10 -> 5. The number of iterations of the msa is 7; etc.
Also see The Modified Syracuse Algorithm link.
		

Crossrefs

Programs

  • Mathematica
    msa[n_] := If[ OddQ@ n, (3n + 1)/2, n/2]; f[n_] := Block[{k = 2n + 1}, Length@ NestWhileList[ msa@# &, k, # >= k &] - 1]; Array[f, 95]

Formula

a(n) = the number of iterations for the msa; i.e., the number of mappings of x -> (3x+1)/2 if x is odd or -> x/2 if x is even to arrive at a number less than n.
a(n) = the binary length of A260592(n).

A309091 Decimal expansion of 4/(Pi-2).

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Jul 11 2019

Keywords

Comments

This can be computed using a recursion formula discovered by an algorithm called "The Ramanujan Machine":
1*3
4/(Pi-2) = 3 + --------------------
2*4
5 + ----------------
3*5
7 + ------------
4*6
9 + --------
11 + ... .
For a proof by humans see the arXiv:1907.00205 preprint linked below.

Examples

			3.50387678776821732240781940302290775850079601361148312728094190...
		

Crossrefs

Programs

  • Maple
    nn:= 126: # number of digits
    b:= i-> `if`(i<2*nn, 2*i+1 +i*(i+2)/b(i+1), 1):
    evalf(b(1), nn);
  • Mathematica
    RealDigits[4/(Pi-2), 10, 120][[1]] (* Amiram Eldar, Jun 29 2023 *)

A165568 a(n) = -1 - 2*n + n^2 + 2*n^3 + n^4.

Original entry on oeis.org

-1, 1, 31, 137, 391, 889, 1751, 3121, 5167, 8081, 12079, 17401, 24311, 33097, 44071, 57569, 73951, 93601, 116927, 144361, 176359, 213401, 255991, 304657, 359951, 422449, 492751, 571481, 659287, 756841, 864839, 984001, 1115071, 1258817, 1416031, 1587529, 1774151
Offset: 0

Views

Author

Paul Curtz, Sep 22 2009

Keywords

Comments

Consider the Lyman spectrum of Hydrogen A005563(n)/A000290(n+1) = n*(n+2)/(n+1)^2 = 0/1, 3/4, 8/9, 15/16, ...
The first differences of these fractions are 3/4, 5/36, 7/144, 9/400, 11/900, 13/1764, 15/3136, ... = (2n+1)/(n*(n+1))^2.
Adding numerator and denominator of these first differences yields 1 + 2n + n^2 + 2n^3 + n^4 = A165563(n) = 3+4, 5+36, 7+144, ... = 1 + 2n + n^2*(n+1)^2 = A144396(n) + A035287(n+1) = A005408(n) + A035287(n+1).
Subtracting numerator from denominator, on the other hand, yields this sequence here: a(n) = A035287(n+1) - A005408(n).

Programs

Formula

a(-1-n) = A165563(n). A165563(-1-n) = a(n).
a(n) = A165563(n) - 2 - 4*n = A165563(n) - A016825(n).
a(n) + A165563 + a(n) = 2*n^2*(1+n)^2 = 2*A035287(n+1).
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) + 24.
G.f.: (-1 + 6*x + 16*x^2 + 2*x^3 + x^4)/(1-x)^5.

Extensions

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

A258165 Odd non-Brazilian numbers > 1.

Original entry on oeis.org

3, 5, 9, 11, 17, 19, 23, 25, 29, 37, 41, 47, 49, 53, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 151, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 223, 227, 229, 233, 239, 251, 257, 263, 269, 271, 277, 281, 283, 289, 293, 311, 313, 317, 331, 337
Offset: 1

Views

Author

Keywords

Comments

Complement of A257521 in A144396 (odd numbers > 1).
The terms are only odd primes or squares of odd primes.
Most odd primes are present except those in A085104.
All terms which are not primes are squares of odd primes except 121 = 11^2.

Examples

			11 is present because there is no base b < 11 - 1 = 10 such that the representation of 11 in base b is a repdigit (all digits are equal). In fact, we have: 11 = 1011_2 = 102_3 = 23_4 = 21_5 = 15_6 = 14_7 = 13_8 = 12_9, and none of these representations are repdigits. - _Bernard Schott_, Jun 21 2017
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{b = 2}, While[b < n - 1 && Length@ Union@ IntegerDigits[n, b] > 1, b++]; b+1 == n]; Select[1 + 2 Range@ 170, fQ]
  • PARI
    forstep(n=3, 300, 2, c=1; for(b=2, n-2, d=digits(n, b); if(vecmin(d)==vecmax(d), c=0;  break));if(c,print1(n,", "))) \\ Derek Orr, May 27 2015
    
  • Python
    from sympy.ntheory.factor_ import digits
    l=[]
    for n in range(3, 301, 2):
        c=1
        for b in range(2, n - 1):
            d=digits(n, b)[1:]
            if max(d)==min(d):
                c=0
                break
        if c: l.append(n)
    print(l) # Indranil Ghosh, Jun 22 2017, after PARI program

A147651 First trisection of A028560.

Original entry on oeis.org

0, 27, 72, 135, 216, 315, 432, 567, 720, 891, 1080, 1287, 1512, 1755, 2016, 2295, 2592, 2907, 3240, 3591, 3960, 4347, 4752, 5175, 5616, 6075, 6552, 7047, 7560, 8091, 8640, 9207, 9792, 10395, 11016
Offset: 0

Views

Author

Paul Curtz, Nov 09 2008

Keywords

Comments

Nonnegative k such that k/9 + 1 is a square. - Bruno Berselli, Apr 10 2018

Crossrefs

Programs

Formula

a(n) = 9*n*(n+2).
a(n) = a(n-1) + 9*A144396(n) for n > 0.
From Elmo R. Oliveira, Nov 29 2024: (Start)
G.f.: 9*x*(3 - x)/(1-x)^3.
E.g.f.: 9*x*(3 + x)*exp(x).
a(n) = 9*A005563(n) = 3*A067725(n) = A028560(3*n).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 3. (End)

Extensions

More terms from Vincenzo Librandi, Nov 26 2010
Showing 1-10 of 20 results. Next