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-3 of 3 results.

A055999 a(n) = n*(n + 7)/2.

Original entry on oeis.org

0, 4, 9, 15, 22, 30, 39, 49, 60, 72, 85, 99, 114, 130, 147, 165, 184, 204, 225, 247, 270, 294, 319, 345, 372, 400, 429, 459, 490, 522, 555, 589, 624, 660, 697, 735, 774, 814, 855, 897, 940, 984, 1029, 1075, 1122, 1170, 1219, 1269, 1320, 1372, 1425, 1479
Offset: 0

Views

Author

Barry E. Williams, Jun 16 2000

Keywords

Comments

If X is an n-set and Y a fixed (n-4)-subset of X then a(n-3) is equal to the number of 2-subsets of X intersecting Y. - Milan Janjic, Aug 15 2007
Numbers m >= 0 such that 8m+49 is a square. - Bruce J. Nicholson, Jul 28 2017

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, p. 193.

Crossrefs

Equals A000217(n+3) - 6.
Third column (m=2) of (1, 4)-Pascal triangle A095666.
Cf. A000290.

Programs

Formula

G.f.: x*(4-3*x)/(1-x)^3.
a(n) = A126890(n,3) for n>2. - Reinhard Zumkeller, Dec 30 2006
a(n) = A028563(n)/2. - Zerinvary Lajos, Feb 12 2007
If we define f(n,i,a) = Sum_{k=0..n-i} binomial(n,k)*Stirling1(n-k,i)*Product_{j=0..k-1} (-a-j), then a(n) = -f(n,n-1,4), for n>=1. - Milan Janjic, Dec 20 2008
a(n) = n + a(n-1) + 3 (with a(0)=0). - Vincenzo Librandi, Aug 07 2010
a(n) = Sum_{k=1..n} (k+3). - Gary Detlefs, Aug 10 2010
Sum_{n>=1} 1/a(n) = 363/490. - R. J. Mathar, Jul 14 2012
a(n) = 4n - floor(n/2) + floor(n^2/2). - Wesley Ivan Hurt, Jun 15 2013
a(n) = Sum_{i=4..n+3} i. - Wesley Ivan Hurt, Jun 28 2013
E.g.f.: (1/2)*x*(x+8)*exp(x). - G. C. Greubel, Jul 13 2017
Sum_{n>=1} (-1)^(n+1)/a(n) = 4*log(2)/7 - 319/1470. - Amiram Eldar, Jan 10 2021
a(n) = A000290(n+1) - A000217(n-2). - Leo Tavares, Jan 28 2023
From Amiram Eldar, Feb 12 2024: (Start)
Product_{n>=1} (1 - 1/a(n)) = 15*cos(sqrt(57)*Pi/2)/(8*Pi).
Product_{n>=1} (1 + 1/a(n)) = -63*cos(sqrt(41)*Pi/2)/(8*Pi). (End)

Extensions

More terms from James Sellers, Jul 04 2000

A074170 Start with 1, add the next number if one gets a prime then add the next number else subtract the next...

Original entry on oeis.org

1, 3, 6, 2, 7, 13, 20, 12, 3, 13, 24, 12, -1, -15, -30, -46, -63, -81, -100, -120, -141, -163, -140, -164, -189, -215, -242, -270, -299, -329, -360, -392, -425, -459, -494, -530, -567, -605, -644, -684, -725, -767, -810, -854, -899, -945, -992, -1040, -1089, -1139, -1190, -1242, -1295, -1349, -1404, -1460
Offset: 1

Views

Author

Amarnath Murthy, Aug 30 2002

Keywords

Comments

Note that a(22) = -163 is the last prime generated by this sequence. All subsequent terms are composite and equal (16-n)(n+17)/2.

Examples

			a(1) = 1, a(2) = 1+2 =3 is a prime hence a(3) = 3 +3 = 6 which is composite hence a(4) = 6-4 = 2 etc.
		

Crossrefs

Cf. A074171.

Programs

  • Mathematica
    a=3; Join[{1, 3}, Table[If[PrimeQ[a], a=a+n, a=a-n], {n, 3, 60}]]

Formula

a(n) = -(n-16)(n+17)/2 for n > 22

Extensions

Corrected and extended by Jason Earls, Sep 01 2002
Corrected by T. D. Noe, Oct 04 2004

A358269 a(n) is the position m of the last prime term in the sequence {b(m)} defined by b(1) = n, if b(m) is prime then b(m+1) = b(m) - m, else b(m+1) = b(m) + m.

Original entry on oeis.org

3, 1004, 3, 1004, 3, 1004, 30, 349, 30, 5, 19, 5, 30, 1004, 30, 8, 11, 8, 30, 5, 86, 17, 67, 17, 15, 9, 19, 9, 15, 9, 19, 484, 19, 13, 30, 9, 19, 9, 19, 13, 374, 13, 19, 13, 11, 484, 86, 484, 19, 13, 67, 16, 19, 16, 19, 484, 374, 484, 19, 484, 374, 24, 19, 13
Offset: 0

Views

Author

Samuel Harkness, Nov 06 2022

Keywords

Comments

A sequence {b(m)} is guaranteed to have no more primes when the m-th term "k" with value "s" is the sum of at least 3 consecutive positive integers where the sum is "s" and the last consecutive positive integer in the sum is k-1. Any number which is the sum of at least three consecutive positive integers is guaranteed to be composite. By the definition of the sequence, the next term k + 1 = s + k, and this term will be the sum of at least three consecutive positive integers with the last consecutive positive integer being k. This guarantees that this term is also guaranteed to be composite, and by induction, all future terms in {b(m)} will be composite.
In a sequence {b(m)}, if the m-th term k with value s satisfies c = (sqrt(-8*s + 4*k^2 - 4*k + 1) + 1)/2 for a positive integer c with s being nonprime and k > 3 then the value of all terms >= k will be composite.
It is unknown whether all initial conditions "n" guarantee a final prime. All terms up to n = 1000 have a final prime.
Treat negative numbers in the sequence {b(m)} as nonprime. The only n whose {b(m)} contain negative terms b(m) are 1, 3, 6, and 7.

Examples

			For n = 9: b(1) = 9. Nonprime, b(2) = 9 + 1 = 10. Nonprime, b(3) = 10 + 2 = 12. Nonprime, b(4) = 12 + 3 = 15. Nonprime, b(5) = 15 + 4 = 19. Prime, b(6) = 19 - 5 = 14. Note 14 = 2 + 3 + 4 + 5 and is nonprime, so b(7) = 2 + 3 + 4 + 5 + 6 and nonprime. All b(m) after this will be nonprime by the same pattern, thus the final prime for b(1) = 9 occurs at b(5), and a(9) = 5.
		

Crossrefs

Examples of sequences of the sum of consecutive positive integers, where the sum of at least three is guaranteed to be composite: A055999, A212427.

Programs

  • Mathematica
    T = {}; For[f = 0, f <= 63, f++, a = 0; t = f; q = 0; While[a == 0, q++; If[t < 0, t += q, If[PrimeQ[t], t -= q; If[t >= 0, If[q != 2 && q != 1 && ! PrimeQ[t], s = t; k = q + 1; z = (Sqrt[-8 s + 4 k^2 - 4 k + 1] + 1)/2; If[Element[z, Reals] && z > 0 && Mod[z, 1] == 0, AppendTo[T, q]; Break[]]]], t += q]]]]; Print[T]
Showing 1-3 of 3 results.