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

A005408 The odd numbers: a(n) = 2*n + 1.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131
Offset: 0

Views

Author

Keywords

Comments

Leibniz's series: Pi/4 = Sum_{n>=0} (-1)^n/(2n+1) (cf. A072172).
Beginning of the ordering of the natural numbers used in Sharkovski's theorem - see the Cielsielski-Pogoda paper.
The Sharkovski ordering begins with the odd numbers >= 3, then twice these numbers, then 4 times them, then 8 times them, etc., ending with the powers of 2 in decreasing order, ending with 2^0 = 1.
Apart from initial term(s), dimension of the space of weight 2n cusp forms for Gamma_0(6).
Also continued fraction for coth(1) (A073747 is decimal expansion). - Rick L. Shepherd, Aug 07 2002
a(1) = 1; a(n) is the smallest number such that a(n) + a(i) is composite for all i = 1 to n-1. - Amarnath Murthy, Jul 14 2003
Smallest number greater than n, not a multiple of n, but containing it in binary representation. - Reinhard Zumkeller, Oct 06 2003
Numbers n such that phi(2n) = phi(n), where phi is Euler's totient (A000010). - Lekraj Beedassy, Aug 27 2004
Pi*sqrt(2)/4 = Sum_{n>=0} (-1)^floor(n/2)/(2n+1) = 1 + 1/3 - 1/5 - 1/7 + 1/9 + 1/11 ... [since periodic f(x)=x over -Pi < x < Pi = 2(sin(x)/1 - sin(2x)/2 + sin(3x)/3 - ...) using x = Pi/4 (Maor)]. - Gerald McGarvey, Feb 04 2005
For n > 1, numbers having 2 as an anti-divisor. - Alexandre Wajnberg, Oct 02 2005
a(n) = shortest side a of all integer-sided triangles with sides a <= b <= c and inradius n >= 1.
First differences of squares (A000290). - Lekraj Beedassy, Jul 15 2006
The odd numbers are the solution to the simplest recursion arising when assuming that the algorithm "merge sort" could merge in constant unit time, i.e., T(1):= 1, T(n):= T(floor(n/2)) + T(ceiling(n/2)) + 1. - Peter C. Heinig (algorithms(AT)gmx.de), Oct 14 2006
2n-5 counts the permutations in S_n which have zero occurrences of the pattern 312 and one occurrence of the pattern 123. - David Hoek (david.hok(AT)telia.com), Feb 28 2007
For n > 0: number of divisors of (n-1)th power of any squarefree semiprime: a(n) = A000005(A001248(k)^(n-1)); a(n) = A000005(A000302(n-1)) = A000005(A001019(n-1)) = A000005(A009969(n-1)) = A000005(A087752(n-1)). - Reinhard Zumkeller, Mar 04 2007
For n > 2, a(n-1) is the least integer not the sum of < n n-gonal numbers (0 allowed). - Jonathan Sondow, Jul 01 2007
A134451(a(n)) = abs(A134452(a(n))) = 1; union of A134453 and A134454. - Reinhard Zumkeller, Oct 27 2007
Numbers n such that sigma(2n) = 3*sigma(n). - Farideh Firoozbakht, Feb 26 2008
a(n) = A139391(A016825(n)) = A006370(A016825(n)). - Reinhard Zumkeller, Apr 17 2008
Number of divisors of 4^(n-1) for n > 0. - J. Lowell, Aug 30 2008
Equals INVERT transform of A078050 (signed - cf. comments); and row sums of triangle A144106. - Gary W. Adamson, Sep 11 2008
Odd numbers(n) = 2*n+1 = square pyramidal number(3*n+1) / triangular number(3*n+1). - Pierre CAMI, Sep 27 2008
A000035(a(n))=1, A059841(a(n))=0. - Reinhard Zumkeller, Sep 29 2008
Multiplicative closure of A065091. - Reinhard Zumkeller, Oct 14 2008
a(n) is also the maximum number of triangles that n+2 points in the same plane can determine. 3 points determine max 1 triangle; 4 points can give 3 triangles; 5 points can give 5; 6 points can give 7 etc. - Carmine Suriano, Jun 08 2009
Binomial transform of A130706, inverse binomial transform of A001787(without the initial 0). - Philippe Deléham, Sep 17 2009
Also the 3-rough numbers: positive integers that have no prime factors less than 3. - Michael B. Porter, Oct 08 2009
Or n without 2 as prime factor. - Juri-Stepan Gerasimov, Nov 19 2009
Given an L(2,1) labeling l of a graph G, let k be the maximum label assigned by l. The minimum k possible over all L(2,1) labelings of G is denoted by lambda(G). For n > 0, this sequence gives lambda(K_{n+1}) where K_{n+1} is the complete graph on n+1 vertices. - K.V.Iyer, Dec 19 2009
A176271 = odd numbers seen as a triangle read by rows: a(n) = A176271(A002024(n+1), A002260(n+1)). - Reinhard Zumkeller, Apr 13 2010
For n >= 1, a(n-1) = numbers k such that arithmetic mean of the first k positive integers is an integer. A040001(a(n-1)) = 1. See A145051 and A040001. - Jaroslav Krizek, May 28 2010
Union of A179084 and A179085. - Reinhard Zumkeller, Jun 28 2010
For n>0, continued fraction [1,1,n] = (n+1)/a(n); e.g., [1,1,7] = 8/15. - Gary W. Adamson, Jul 15 2010
Numbers that are the sum of two sequential integers. - Dominick Cancilla, Aug 09 2010
Cf. property described by Gary Detlefs in A113801: more generally, these numbers are of the form (2*h*n + (h-4)*(-1)^n - h)/4 (h and n in A000027), therefore ((2*h*n + (h-4)*(-1)^n - h)/4)^2 - 1 == 0 (mod h); in this case, a(n)^2 - 1 == 0 (mod 4). Also a(n)^2 - 1 == 0 (mod 8). - Bruno Berselli, Nov 17 2010
A004767 = a(a(n)). - Reinhard Zumkeller, Jun 27 2011
A001227(a(n)) = A000005(a(n)); A048272(a(n)) < 0. - Reinhard Zumkeller, Jan 21 2012
a(n) is the minimum number of tosses of a fair coin needed so that the probability of more than n heads is at least 1/2. In fact, Sum_{k=n+1..2n+1} Pr(k heads|2n+1 tosses) = 1/2. - Dennis P. Walsh, Apr 04 2012
A007814(a(n)) = 0; A037227(a(n)) = 1. - Reinhard Zumkeller, Jun 30 2012
1/N (i.e., 1/1, 1/2, 1/3, ...) = Sum_{j=1,3,5,...,infinity} k^j, where k is the infinite set of constants 1/exp.ArcSinh(N/2) = convergents to barover(N). The convergent to barover(1) or [1,1,1,...] = 1/phi = 0.6180339..., whereas c.f. barover(2) converges to 0.414213..., and so on. Thus, with k = 1/phi we obtain 1 = k^1 + k^3 + k^5 + ..., and with k = 0.414213... = (sqrt(2) - 1) we get 1/2 = k^1 + k^3 + k^5 + .... Likewise, with the convergent to barover(3) = 0.302775... = k, we get 1/3 = k^1 + k^3 + k^5 + ..., etc. - Gary W. Adamson, Jul 01 2012
Conjecture on primes with one coach (A216371) relating to the odd integers: iff an integer is in A216371 (primes with one coach either of the form 4q-1 or 4q+1, (q > 0)); the top row of its coach is composed of a permutation of the first q odd integers. Example: prime 19 (q = 5), has 5 terms in each row of its coach: 19: [1, 9, 5, 7, 3] ... [1, 1, 1, 2, 4]. This is interpreted: (19 - 1) = (2^1 * 9), (19 - 9) = (2^1 * 5), (19 - 5) = (2^1 - 7), (19 - 7) = (2^2 * 3), (19 - 3) = (2^4 * 1). - Gary W. Adamson, Sep 09 2012
A005408 is the numerator 2n-1 of the term (1/m^2 - 1/n^2) = (2n-1)/(mn)^2, n = m+1, m > 0 in the Rydberg formula, while A035287 is the denominator (mn)^2. So the quotient a(A005408)/a(A035287) simulates the Hydrogen spectral series of all hydrogen-like elements. - Freimut Marschner, Aug 10 2013
This sequence has unique factorization. The primitive elements are the odd primes (A065091). (Each term of the sequence can be expressed as a product of terms of the sequence. Primitive elements have only the trivial factorization. If the products of terms of the sequence are always in the sequence, and there is a unique factorization of each element into primitive elements, we say that the sequence has unique factorization. So, e.g., the composite numbers do not have unique factorization, because for example 36 = 4*9 = 6*6 has two distinct factorizations.) - Franklin T. Adams-Watters, Sep 28 2013
These are also numbers k such that (k^k+1)/(k+1) is an integer. - Derek Orr, May 22 2014
a(n-1) gives the number of distinct sums in the direct sum {1,2,3,..,n} + {1,2,3,..,n}. For example, {1} + {1} has only one possible sum so a(0) = 1. {1,2} + {1,2} has three distinct possible sums {2,3,4} so a(1) = 3. {1,2,3} + {1,2,3} has 5 distinct possible sums {2,3,4,5,6} so a(2) = 5. - Derek Orr, Nov 22 2014
The number of partitions of 4*n into at most 2 parts. - Colin Barker, Mar 31 2015
a(n) is representable as a sum of two but no fewer consecutive nonnegative integers, e.g., 1 = 0 + 1, 3 = 1 + 2, 5 = 2 + 3, etc. (see A138591). - Martin Renner, Mar 14 2016
Unique solution a( ) of the complementary equation a(n) = a(n-1)^2 - a(n-2)*b(n-1), where a(0) = 1, a(1) = 3, and a( ) and b( ) are increasing complementary sequences. - Clark Kimberling, Nov 21 2017
Also the number of maximal and maximum cliques in the n-centipede graph. - Eric W. Weisstein, Dec 01 2017
Lexicographically earliest sequence of distinct positive integers such that the average of any number of consecutive terms is always an integer. (For opposite property see A042963.) - Ivan Neretin, Dec 21 2017
Maximum number of non-intersecting line segments between vertices of a convex (n+2)-gon. - Christoph B. Kassir, Oct 21 2022
a(n) is the number of parking functions of size n+1 avoiding the patterns 123, 132, and 231. - Lara Pudwell, Apr 10 2023

Examples

			G.f. = q + 3*q^3 + 5*q^5 + 7*q^7 + 9*q^9 + 11*q^11 + 13*q^13 + 15*q^15 + ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 28.
  • T. Dantzig, The Language of Science, 4th Edition (1954) page 276.
  • H. Doerrie, 100 Great Problems of Elementary Mathematics, Dover, NY, 1965, p. 73.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.1 Terminology, p. 264.
  • D. Hök, Parvisa mönster i permutationer [Swedish], (2007).
  • E. Maor, Trigonometric Delights, Princeton University Press, NJ, 1998, pp. 203-205.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A120062 for sequences related to integer-sided triangles with integer inradius n.
Cf. A001651 (n=1 or 2 mod 3), A047209 (n=1 or 4 mod 5).
Cf. A003558, A216371, A179480 (relating to the Coach theorem).
Cf. A000754 (boustrophedon transform).

Programs

Formula

a(n) = 2*n + 1. a(-1 - n) = -a(n). a(n+1) = a(n) + 2.
G.f.: (1 + x) / (1 - x)^2.
E.g.f.: (1 + 2*x) * exp(x).
G.f. with interpolated zeros: (x^3+x)/((1-x)^2 * (1+x)^2); e.g.f. with interpolated zeros: x*(exp(x)+exp(-x))/2. - Geoffrey Critzer, Aug 25 2012
a(n) = L(n,-2)*(-1)^n, where L is defined as in A108299. - Reinhard Zumkeller, Jun 01 2005
Euler transform of length 2 sequence [3, -1]. - Michael Somos, Mar 30 2007
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = v * (1 + 2*u) * (1 - 2*u + 16*v) - (u - 4*v)^2 * (1 + 2*u + 2*u^2). - Michael Somos, Mar 30 2007
a(n) = b(2*n + 1) where b(n) = n if n is odd is multiplicative. [This seems to say that A000027 is multiplicative? - R. J. Mathar, Sep 23 2011]
From Hieronymus Fischer, May 25 2007: (Start)
a(n) = (n+1)^2 - n^2.
G.f. g(x) = Sum_{k>=0} x^floor(sqrt(k)) = Sum_{k>=0} x^A000196(k). (End)
a(0) = 1, a(1) = 3, a(n) = 2*a(n-1) - a(n-2). - Jaume Oliver Lafont, May 07 2008
a(n) = A000330(A016777(n))/A000217(A016777(n)). - Pierre CAMI, Sep 27 2008
a(n) = A034856(n+1) - A000217(n) = A005843(n) + A000124(n) - A000217(n) = A005843(n) + 1. - Jaroslav Krizek, Sep 05 2009
a(n) = (n - 1) + n (sum of two sequential integers). - Dominick Cancilla, Aug 09 2010
a(n) = 4*A000217(n)+1 - 2*Sum_{i=1..n-1} a(i) for n > 1. - Bruno Berselli, Nov 17 2010
n*a(2n+1)^2+1 = (n+1)*a(2n)^2; e.g., 3*15^2+1 = 4*13^2. - Charlie Marion, Dec 31 2010
arctanh(x) = Sum_{n>=0} x^(2n+1)/a(n). - R. J. Mathar, Sep 23 2011
a(n) = det(f(i-j+1))A113311(n);%20for%20n%20%3C%200%20we%20have%20f(n)=0.%20-%20_Mircea%20Merca">{1<=i,j<=n}, where f(n) = A113311(n); for n < 0 we have f(n)=0. - _Mircea Merca, Jun 23 2012
G.f.: Q(0), where Q(k) = 1 + 2*(k+1)*x/( 1 - 1/(1 + 2*(k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 11 2013
a(n) = floor(sqrt(2*A000384(n+1))). - Ivan N. Ianakiev, Jun 17 2013
a(n) = 3*A000330(n)/A000217(n), n > 0. - Ivan N. Ianakiev, Jul 12 2013
a(n) = Product_{k=1..2*n} 2*sin(Pi*k/(2*n+1)) = Product_{k=1..n} (2*sin(Pi*k/(2*n+1)))^2, n >= 0 (undefined product = 1). See an Oct 09 2013 formula contribution in A000027 with a reference. - Wolfdieter Lang, Oct 10 2013
Noting that as n -> infinity, sqrt(n^2 + n) -> n + 1/2, let f(n) = n + 1/2 - sqrt(n^2 + n). Then for n > 0, a(n) = round(1/f(n))/4. - Richard R. Forberg, Feb 16 2014
a(n) = Sum_{k=0..n+1} binomial(2*n+1,2*k)*4^(k)*bernoulli(2*k). - Vladimir Kruchinin, Feb 24 2015
a(n) = Sum_{k=0..n} binomial(6*n+3, 6*k)*Bernoulli(6*k). - Michel Marcus, Jan 11 2016
a(n) = A000225(n+1) - A005803(n+1). - Miquel Cerda, Nov 25 2016
O.g.f.: Sum_{n >= 1} phi(2*n-1)*x^(n-1)/(1 - x^(2*n-1)), where phi(n) is the Euler totient function A000010. - Peter Bala, Mar 22 2019
Sum_{n>=0} 1/a(n)^2 = Pi^2/8 = A111003. - Bernard Schott, Dec 10 2020
Sum_{n >= 1} (-1)^n/(a(n)*a(n+1)) = Pi/4 - 1/2 = 1/(3 + (1*3)/(4 + (3*5)/(4 + ... + (4*n^2 - 1)/(4 + ... )))). Cf. A016754. - Peter Bala, Mar 28 2024
a(n) = A055112(n)/oblong(n) = A193218(n+1)/Hex number(n). Compare to the Sep 27 2008 comment by Pierre CAMI. - Klaus Purath, Apr 23 2024
a(k*m) = k*a(m) - (k-1). - Ya-Ping Lu, Jun 25 2024
a(n) = A000217(a(n))/n for n > 0. - Stefano Spezia, Feb 15 2025

Extensions

Incorrect comment and example removed by Joerg Arndt, Mar 11 2010
Peripheral comments deleted by N. J. A. Sloane, May 09 2022

A008588 Nonnegative multiples of 6.

Original entry on oeis.org

0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348
Offset: 0

Views

Author

Keywords

Comments

For n > 3, the number of squares on the infinite 3-column half-strip chessboard at <= n knight moves from any fixed point on the short edge.
Second differences of A000578. - Cecilia Rossiter (cecilia(AT)noticingnumbers.net), Dec 15 2004
A008615(a(n)) = n. - Reinhard Zumkeller, Feb 27 2008
A157176(a(n)) = A001018(n). - Reinhard Zumkeller, Feb 24 2009
These numbers can be written as the sum of four cubes (i.e., 6*n = (n+1)^3 + (n-1)^3 + (-n)^3 + (-n)^3). - Arkadiusz Wesolowski, Aug 09 2013
A122841(a(n)) > 0 for n > 0. - Reinhard Zumkeller, Nov 10 2013
Surface area of a cube with side sqrt(n). - Wesley Ivan Hurt, Aug 24 2014
a(n) is representable as a sum of three but not two consecutive nonnegative integers, e.g., 6 = 1 + 2 + 3, 12 = 3 + 4 + 5, 18 = 5 + 6 + 7, etc. (see A138591). - Martin Renner, Mar 14 2016 (Corrected by David A. Corneth, Aug 12 2016)
Numbers with three consecutive divisors: for some k, each of k, k+1, and k+2 divide n. - Charles R Greathouse IV, May 16 2016
Numbers k for which {phi(k),phi(2k),phi(3k)} is an arithmetic progression. - Ivan Neretin, Aug 12 2016

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 81.

Crossrefs

Essentially the same as A008458.
Cf. A044102 (subsequence).

Programs

Formula

From Vincenzo Librandi, Dec 24 2010: (Start)
a(n) = 6*n = 2*a(n-1) - a(n-2).
G.f.: 6*x/(1-x)^2. (End)
a(n) = Sum_{k>=0} A030308(n,k)*6*2^k. - Philippe Deléham, Oct 24 2011
a(n) = Sum_{k=2n-1..2n+1} k. - Wesley Ivan Hurt, Nov 22 2015
From Ilya Gutkovskiy, Aug 12 2016: (Start)
E.g.f.: 6*x*exp(x).
Convolution of A010722 and A057427.
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/6 = A002162*A020793. (End)
a(n) = 6 * A001477(n). - David A. Corneth, Aug 12 2016

A057716 The nonpowers of 2.

Original entry on oeis.org

0, 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74
Offset: 0

Views

Author

John Lindgren (john.lindgren(AT)Eng.Sun.COM), Oct 24 2000

Keywords

Comments

a(n) is the length signature of a string plus its length.
The positive members of this sequence are exactly the numbers that can be expressed as the sum of two or more consecutive positive integers (cf. A138591). - David Wasserman, Jan 24 2002
Starting at 3, these are the positions of the data bits in the single-error-correcting Hamming code.
Except for the offset 0, sequence corresponds to numbers with at least an odd divisor > 1 (For largest odd divisor see A000265). - Lekraj Beedassy, Apr 12 2005
These are exactly the numbers n with the property that, given the n(n-1)/2 sums of pairs, the original numbers can be recovered uniquely. [Nick Reingold, see Winkler reference.]
Subsequence of A158581; A000120(a(n)) > 1. - Reinhard Zumkeller, Apr 16 2009
Range of A140977. - Reinhard Zumkeller, Aug 15 2010
A209229(a(n)) = 0. - Reinhard Zumkeller, Mar 07 2012
A001227(a(n)) > 1. - Reinhard Zumkeller, May 01 2012
Numbers that can be expressed as the sum of at least two consecutive integers; numbers that can be expressed as the difference of two nonconsecutive triangular numbers. - Charles R Greathouse IV, Jul 27 2012
Except for the 1st term 0, these are the integers k such that 2*(2*k-1) divides binomial(2*k-1,k). See Ihringer & Kupavskii. - Michel Marcus, Oct 02 2017

References

  • Martin Davis, "Algorithms, Equations, and Logic", pp. 4-15 of S. Barry Cooper and Andrew Hodges, Eds., "The Once and Future Turing: Computing the World", Cambridge 2016.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 67-69.
  • P. Winkler, Mathematical Mind-Benders, Peters, Wellesley, MA, 2007; see p. 27.

Crossrefs

Complement of A000079. Cf. A057717, A001227, A103586, A138591, A138592.
See A074894 for more about the question of when the sums of n numbers taken k at a time determine the numbers.

Programs

  • Haskell
    a057716 n = a057716_list !! n
    a057716_list = filter ((== 0) . a209229) [0..]
    -- Reinhard Zumkeller, Mar 07 2012
    
  • Maple
    select(t -> t/2^padic:-ordp(t,2) <> 1, [$0..100]); # Robert Israel, May 05 2015
  • Mathematica
    Module[{nn = 100,maxpwr},maxpwr = Floor[Log[2, nn]]; Complement[Range[0, nn], 2^Range[0, maxpwr]]]  (* Harvey P. Dale, May 24 2012 *)
    Complement[Range[0, 99], 2^Range[0, 7]] (* Alonso del Arte, May 05 2015 *)
  • PARI
    print1(0);for(n=1,5,for(m=2^n+1,2^(n+1)-1,print1(", "m))) \\ Charles R Greathouse IV, Mar 07 2012
    
  • Python
    def A057716(n): return n + (n + n.bit_length()).bit_length() # Matthew Andres Moreno, Jun 16 2024
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        yield 0
        yield from (j for i in count(0) for j in range(2**i+1, 2**(i+1)))
    print(list(islice(agen(), 70))) # Michael S. Branicky, Oct 11 2024

Formula

a(n) = n + [log_2(n + [log_2(n)])] gives this sequence with the exception of a(1) = 1. - David W. Wilson, Mar 29 2005
Find k such that 2^k - (k + 1) <= n < 2^(k+1) - (k + 2), then a(n) = n + k + 1.
Numbers n = 2a(k) - 1, k > 0 are such that Sum_{k=0..n} B_k*M(n-k)*binomial(n, k) = 0 where B_k is the k-th Bernoulli number and M_k the k-th Motzkin number. - Benoit Cloitre, Oct 19 2005
From Robert Israel, May 05 2015: (Start)
G.f.: (1-x)^(-2)*Sum(m>=0, x^(2^m-m)*(2^m*x-2^m*x^2+x) + x^(2^(m+1)-m)*(2^(m+1)*x-2^(m+1)-x)).
a(i-m) = i for 2^m < i < 2^(m+1).
a(n) = A103586(n) + n for n >= 1. (End)

Extensions

Better description from Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 29 2001

A174090 Powers of 2 and odd primes; alternatively, numbers that cannot be written as a sum of at least three consecutive positive integers.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 11, 13, 16, 17, 19, 23, 29, 31, 32, 37, 41, 43, 47, 53, 59, 61, 64, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 256
Offset: 1

Views

Author

Vladimir Joseph Stephan Orlovsky, Mar 07 2010, and Omar E. Pol, Feb 24 2014

Keywords

Comments

From Omar E. Pol, Feb 24 2014: (Start)
Also the odd noncomposite numbers (A006005) and the powers of 2 with positive exponent, in increasing order.
If a(n) is composite and a(n) - a(n-1) = 1 then a(n-1) is a Mersenne prime (A000668), hence a(n-1)*a(n)/2 is a perfect number (A000396) and a(n-1)*a(n) equals the sum of divisors of a(n-1)*a(n)/2.
If a(n) is even and a(n+1) - a(n) = 1 then a(n+1) is a Fermat prime (A019434). (End)

Crossrefs

Numbers not in A111774.
Equals A000079 UNION A065091.
Equals A067133 \ {6}.

Programs

  • Maple
    N:= 300: # to get all terms <= N
    S:= {seq(2^i,i=0..ilog2(N))} union select(isprime,{ 2*i+1 $ i=1..floor((N-1)/2) }):
    sort(convert(S,list)); # Robert Israel, Jun 18 2015
  • Mathematica
    a[n_] := Product[GCD[2 i - 1, n], {i, 1, (n - 1)/2}] - 1;
    Select[Range[242], a[#] == 0 &] (* Gerry Martens, Jun 15 2015 *)
  • PARI
    list(lim)=Set(concat(concat(1,primes(lim)), vector(logint(lim\2,2),i,2^(i+1)))) \\ Charles R Greathouse IV, Sep 19 2024
    
  • PARI
    select( {is_A174090(n)=isprime(n)||n==1<M. F. Hasler, Oct 24 2024
  • Python
    from sympy import primepi
    def A174090(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x+(0 if x<=1 else 1-primepi(x))-x.bit_length())
        return bisection(f,n,n) # Chai Wah Wu, Sep 19 2024
    

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Sep 19 2024

Extensions

This entry is the result of merging an old incorrect entry and a more recent correct version. N. J. A. Sloane, Dec 07 2015

A091999 Numbers that are congruent to {2, 10} mod 12.

Original entry on oeis.org

2, 10, 14, 22, 26, 34, 38, 46, 50, 58, 62, 70, 74, 82, 86, 94, 98, 106, 110, 118, 122, 130, 134, 142, 146, 154, 158, 166, 170, 178, 182, 190, 194, 202, 206, 214, 218, 226, 230, 238, 242, 250, 254, 262, 266, 274, 278, 286, 290, 298, 302, 310, 314, 322, 326, 334
Offset: 1

Views

Author

Ray Chandler, Feb 21 2004

Keywords

Comments

Numbers divisible by 2 but not by 3 or 4. - Robert Israel, Apr 24 2015
For n > 1, a(n) is representable as a sum of four but no fewer consecutive nonnegative integers, i.e., 10 = 1 + 2 + 3 + 4, 14 = 2 + 3 + 4 + 5, 22 = 4 + 5 + 6 + 7, etc. (see A138591). - Martin Renner, Mar 14 2016
Essentially the same as A063221. - Omar E. Pol, Aug 16 2023

Crossrefs

Second row of A092260.
Cf. A109761 (subsequence).

Programs

  • Haskell
    a091999 n = a091999_list !! (n-1)
    a091999_list = 2 : 10 : map (+ 12) a091999_list
    -- Reinhard Zumkeller, Jan 21 2013
    
  • Magma
    [6*n-3+(-1)^n : n in [1..100]]; // Wesley Ivan Hurt, Apr 23 2015
    
  • Maple
    A091999:=n->6*n-3+(-1)^n: seq(A091999(n), n=1..100); # Wesley Ivan Hurt, Apr 23 2015
  • Mathematica
    Flatten[#+{2,10}&/@(12*Range[0,30])] (* or *) LinearRecurrence[{1,1,-1},{2,10,14},60] (* Harvey P. Dale, Jun 24 2013 *)
  • PARI
    a(n) = 6*n - 3 + (-1)^n \\ David Lovler, Jul 16 2022

Formula

a(n) = 2*A007310(n).
a(n) = A186424(n) - A186424(n-2), for n > 1.
a(n) = 12*(n-1) - a(n-1), with a(1)=2. - Vincenzo Librandi, Nov 16 2010
G.f.: 2*x*(1+4*x+x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(n) = a(n-1) + a(n-2) - a(n-3); a(1)=2, a(2)=10, a(3)=14. - Harvey P. Dale, Jun 24 2013
a(n) = 6*n - 3 + (-1)^n. - Wesley Ivan Hurt, Apr 23 2015
E.g.f.: 2 + (6*x - 2)*cosh(x) + 2*(3*x - 2)*sinh(x). - Stefano Spezia, May 09 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(4*sqrt(3)). - Amiram Eldar, Dec 13 2021
E.g.f.: 2 + (6*x - 3)*exp(x) + exp(-x). - David Lovler, Aug 08 2022
a(n) = A063221(n), n > 1. - Omar E. Pol, Aug 15 2023
From Amiram Eldar, Nov 24 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = sqrt(2) (A002193).
Product_{n>=1} (1 + (-1)^n/a(n)) = 2*sin(Pi/12) (A101263). (End)

A069283 a(n) = -1 + number of odd divisors of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 13 2002

Keywords

Comments

Number of nontrivial ways to write n as sum of at least 2 consecutive integers. That is, we are not counting the trivial solution n=n. E.g., a(9)=2 because 9 = 4 + 5 and 9 = 2 + 3 + 4. a(8)=0 because there are no integers m and k such that m + (m+1) + ... + (m+k-1) = 8 apart from k=1, m=8. - Alfred Heiligenbrunner, Jun 07 2004
Also number of sums of sequences of consecutive positive integers excluding sequences of length 1 (e.g., 9 = 2+3+4 or 4+5 so a(9)=2). (Useful for cribbage players.) - Michael Gilleland, Dec 29 2002
Let M be any positive integer. Then a(n) = number of proper divisors of M^n + 1 of the form M^k + 1.
This sequence gives the distinct differences of triangular numbers Ti giving n : n = Ti - Tj; none if n = 2^k. If factor a = n or a > (n/a - 1)/2 : i = n/a + (a - 1)/2; j = n/a - (a+1)/2. Else : i = n/2a + (2a - 1)/2; j = n/2a - (2a - 1)/2. Examples: 7 is prime; 7 = T4 - T2 = (1 + 2 + 3 + 4) - (1 + 2) (a = 7; n/a = 1). The odd factors of 35 are 35, 7 and 5; 35 = T18 - T16 (a = 35) = T8 - T1 (a = 7) = T5 - T7 (a = 5). 144 = T20 - T11 (a = 9) = T49 - T46 (a = 3). - M. Dauchez (mdzzdm(AT)yahoo.fr), Oct 31 2005
Also number of partitions of n into the form 1 + 2 + ...( k - 1) + k + k + ... + k for some k >= 2. Example: a(9) = 2 because we have [2, 2, 2, 2, 1] and [3, 3, 2, 1]. - Emeric Deutsch, Mar 04 2006
a(n) is the number of nontrivial runsum representations of n, and is also known as the politeness of n. - Ant King, Nov 20 2010
Also number of nonpowers of 2 dividing n, divided by the number of powers of 2 dividing n, n > 0. - Omar E. Pol, Aug 24 2019
a(n) only depends on the prime signature of A000265(n). - David A. Corneth, May 30 2020, corrected by Charles R Greathouse IV, Oct 31 2021

Examples

			a(14) = 1 because the divisors of 14 are 1, 2, 7, 14, and of these, two are odd, 1 and 7, and -1 + 2 = 1.
a(15) = 3 because the divisors of 15 are 1, 3, 5, 15, and of these, all four are odd, and -1 + 4 = 3.
a(16) = 0 because 16 has only one odd divisor, and -1 + 1 = 0.
Using Ant King's formula: a(90) = 5 as 90 = 2^1 * 3^2 * 5^1, so a(90) = (1 + 2) * (1 + 1) - 1 = 5. - _Giovanni Ciriani_, Jan 12 2013
x^3 + x^5 + x^6 + x^7 + 2*x^9 + x^10 + x^11 + x^12 + x^13 + x^14 + ...
a(120) = 3 as the odd divisors of 120 are the odd divisors of 15 as 120 = 15*2^3. 15 has 4 odd divisors so that gives a(120) = 4 - 1 = 3. - _David A. Corneth_, May 30 2020
		

References

  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics, 2nd ed., Addison-Wesley, 1994, see exercise 2.30 on p. 65.

Crossrefs

Cf. A095808 (sums of ascending and descending consecutive integers).

Programs

  • Haskell
    a069283 0 = 0
    a069283 n = length $ tail $ a182469_row n
    -- Reinhard Zumkeller, May 01 2012
    
  • Magma
    [0] cat [-1 + #[d:d in Divisors(n)| IsOdd(d)]:n in [1..100]]; // Marius A. Burtea, Aug 24 2019
    
  • Maple
    g:=sum(x^(k*(k+1)/2)/(1-x^k),k=2..20): gser:=series(g,x=0,115): seq(coeff(gser,x,n),n=0..100); # Emeric Deutsch, Mar 04 2006
    A069283 := proc(n)
        A001227(n)-1 ;
    end proc: # R. J. Mathar, Jun 18 2015
  • Mathematica
    g[n_] := Module[{dL = Divisors[2n], dP}, dP = Transpose[{dL, 2n/dL}]; Select[dP, ((1 < #[[1]] < #[[2]]) && (Mod[ #[[1]] - #[[2]], 2] == 1)) &] ]; Table[Length[g[n]], {n, 1, 100}]
    Table[Length[Select[Divisors[k], OddQ[#] &]] - 1, {k, 100}] (* Ant King, Nov 20 2010 *)
    Join[{0}, Times @@@ (#[[All, 2]] & /@ Replace[FactorInteger[Range[2, 50]], {2, a_} -> {2, 0}, Infinity] + 1) - 1] (* Horst H. Manninger, Oct 30 2021 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv( n, d, d%2) - 1)} /* Michael Somos, Aug 07 2013 */
    
  • PARI
    a(n) = numdiv(n >> valuation(n, 2)) - 1 \\ David A. Corneth, May 30 2020
    
  • Python
    from sympy import divisor_count
    def A069283(n): return divisor_count(n>>(~n&n-1).bit_length())-1 if n else 0 # Chai Wah Wu, Jul 16 2022

Formula

a(n) = 0 if and only if n = 2^k.
a(n) = A001227(n)-1.
a(n) = 1 if and only if n = 2^k * p where k >= 0 and p is an odd prime. - Ant King, Nov 20 2010
G.f.: sum(k>=2, x^(k(k + 1)/2)/(1 - x^k) ). - Emeric Deutsch, Mar 04 2006
If n = 2^k p1^b1 p2^b2 ... pr^br, then a(n) = (1 + b1)(1 + b2) ... (1 + br) - 1. - Ant King, Nov 20 2010
Dirichlet g.f.: (zeta(s)*(1-1/2^s) - 1)*zeta(s). - Geoffrey Critzer, Feb 15 2015
a(n) = (A000005(n) - A001511(n))/A001511(n) = A326987(n)/A001511(n), with n > 0 in both formulas. - Omar E. Pol, Aug 24 2019
G.f.: Sum_{k>=1} x^(3*k) / (1 - x^(2*k)). - Ilya Gutkovskiy, May 30 2020
From David A. Corneth, May 30 2020: (Start)
a(2*n) = a(n).
a(n) = A001227(A000265(n)) - 1. (End)
Sum_{k=1..n} a(k) ~ n*log(n)/2 + (gamma + log(2)/2 - 3/2)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 01 2023

Extensions

Edited by Vladeta Jovovic, Mar 25 2002

A109814 a(n) is the largest k such that n can be written as sum of k consecutive positive integers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

n is the sum of at most a(n) consecutive positive integers. As suggested by David W. Wilson, Aug 15 2005: Suppose n is to be written as sum of k consecutive integers starting with m, then 2n = k(2m + k - 1). Only one of the factors is odd. For each odd divisor d of n there is a unique corresponding k = min(d,2n/d). a(n) is the largest among those k. - Jaap Spies, Aug 16 2005
The numbers that can be written as a sum of k consecutive positive integers are those in column k of A141419 (as a triangle). - Peter Munn, Mar 01 2019
The numbers that cannot be written as a sum of two or more consecutive positive integers are the powers of 2. So a(n) = 1 iff n = 2^k for k >= 0. - Bernard Schott, Mar 03 2019

Examples

			Examples provided by _Rainer Rosenthal_, Apr 01 2008:
1 = 1     ---> a(1) = 1
2 = 2     ---> a(2) = 1
3 = 1+2   ---> a(3) = 2
4 = 4     ---> a(4) = 1
5 = 2+3   ---> a(5) = 2
6 = 1+2+3 ---> a(6) = 3
a(15) = 5: 15 = 15 (k=1), 15 = 7+8 (k=2), 15 = 4+5+6 (k=3) and 15 = 1+2+3+4+5 (k=5). - _Jaap Spies_, Aug 16 2005
		

Crossrefs

Cf. A000079 (powers of 2), A000217 (triangular numbers).

Programs

  • Maple
    A109814:= proc(n) local m, k, d; m := 0; for d from 1 by 2 to n do if n mod d = 0 then k := min(d, 2*n/d): fi; if k > m then m := k fi: od; return(m); end proc; seq(A109814(i),i=1..150); # Jaap Spies, Aug 16 2005
  • Mathematica
    a[n_] := Reap[Do[If[OddQ[d], Sow[Min[d, 2n/d]]], {d, Divisors[n]}]][[2, 1]] // Max; Table[a[n], {n, 1, 102}]
  • Python
    from sympy import divisors
    def a(n): return max(min(d, 2*n//d) for d in divisors(n) if d&1)
    print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Dec 23 2022
  • Sage
    [sloane.A109814(n) for n in range(1,20)]
    # Jaap Spies, Aug 16 2005
    

Formula

From Reinhard Zumkeller, Apr 18 2006: (Start)
a(n)*(a(n)+2*A118235(n)-1)/2 = n;
a(A000079(n)) = 1;
a(A000217(n)) = n. (End)

Extensions

Edited by N. J. A. Sloane, Aug 23 2008 at the suggestion of R. J. Mathar

A105441 Numbers with at least two odd prime factors (not necessarily distinct).

Original entry on oeis.org

9, 15, 18, 21, 25, 27, 30, 33, 35, 36, 39, 42, 45, 49, 50, 51, 54, 55, 57, 60, 63, 65, 66, 69, 70, 72, 75, 77, 78, 81, 84, 85, 87, 90, 91, 93, 95, 98, 99, 100, 102, 105, 108, 110, 111, 114, 115, 117, 119, 120, 121, 123, 125, 126, 129, 130, 132, 133, 135, 138, 140, 141
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 09 2005

Keywords

Comments

Also polite numbers (A138591) that can be expressed as the sum of two or more consecutive integers in more than one ways. For example 9=4+5 and 9=2+3+4. Also 15=7+8, 15=4+5+6 and 15=1+2+3+4+5. - Jayanta Basu, Apr 30 2013

Crossrefs

Complement of A093641; A093642 is a subsequence.

Programs

  • Haskell
    a105441 n = a105441_list !! (n-1)
    a105441_list = filter ((> 2) . a001227) [1..]
    -- Reinhard Zumkeller, May 01 2012
    
  • Mathematica
    opf3Q[n_]:=Count[Flatten[Table[First[#],{Last[#]}]&/@FactorInteger[n]], ?OddQ]>1 (* _Harvey P. Dale, Jun 13 2011 *)
  • PARI
    upTo(lim)=my(v=List(),p=7,m);forprime(q=8,lim,forstep(n=p+2,q-2,2,m=n;while(m<=lim,listput(v,m);m<<=1));p=q);forstep(n=p+2,lim,2,listput(v,n));vecsort(Vec(v)) \\ Charles R Greathouse IV, Aug 08 2011
    
  • PARI
    is(n)=n>>=valuation(n,2); !isprime(n) && n>1 \\ Charles R Greathouse IV, Apr 30 2013
    
  • Python
    from sympy import primepi
    def A105441(n):
        def f(x): return int(n+1+sum(primepi(x>>i) for i in range(x.bit_length())))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Feb 02 2025

Formula

A087436(a(n)) > 1.
A001227(a(n)) > 2. [Reinhard Zumkeller, May 01 2012]

A174069 Numbers that can be written as a sum of at least 2 squares of consecutive positive integers.

Original entry on oeis.org

5, 13, 14, 25, 29, 30, 41, 50, 54, 55, 61, 77, 85, 86, 90, 91, 110, 113, 126, 135, 139, 140, 145, 149, 174, 181, 190, 194, 199, 203, 204, 221, 230, 245, 255, 265, 271, 280, 284, 285, 294, 302, 313, 330, 355, 365, 366, 371, 380, 384, 385, 415, 421, 434, 446, 451
Offset: 1

Views

Author

Keywords

Comments

Numbers are listed without multiplicity: 365 is the first term that is the sum of two or more squares in more than one way. See A062681 for other numbers of that form. - M. F. Hasler, Dec 22 2013
A subsequence of A212016. This sequence focuses on the squares of consecutive positive integers. - Altug Alkan, Dec 24 2015

Examples

			5 = 1^2 + 2^2
13 = 2^2 + 3^2
14 = 1^2 + 2^2 + 3^2
25 = 3^2 + 4^2
		

Crossrefs

Cf. A111774, A138591, A151557 (subset of squares), A163251 (subset of primes).
See also A062681, A212016.

Programs

  • Mathematica
    max = 50^2; lst = {}; Do[z = n^2; Do[z += (n + x)^2; If[z > max, Break[]]; AppendTo[lst, z], {x, max/2}], {n, max/2}]; Union[lst]
  • PARI
    N=20;a=[];for(i=2,N, for(k=1,i-1,if(N^2*2>t=sum(j=i-k,i,j^2),a=setunion(a,Set(t)),break)));a \\ M. F. Hasler, Dec 22 2013

Extensions

Name edited by Altug Alkan, Dec 24 2015

A163169 a(n) = minimal number of consecutive integers required which when summed make n.

Original entry on oeis.org

0, 2, 0, 2, 0, 2, 3, 2, 0, 2, 4, 2, 3, 2, 4, 2, 0, 2, 3, 2, 5, 2, 4, 2, 3, 2, 4, 2, 7, 2, 3, 2, 0, 2, 4, 2, 3, 2, 4, 2, 5, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 8, 2, 3, 2, 7, 2, 4, 2, 3, 2, 4, 2, 0, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 8, 2, 3, 2, 5, 2, 4, 2, 3, 2, 4, 2, 11, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 5, 2, 3, 2
Offset: 0

Views

Author

Carl R. White, Jul 22 2009

Keywords

Comments

Zeros occur where no number of consecutive integers can be summed to make n; This only happens where n is an even power of two, or zero itself.
Entries where this sequence is nonzero are in A138591.

Examples

			20 = 2 + 3 + 4 + 5 + 6; No shorter sequence of consecutive integers sums to 20 and so a(20) = the number of elements in {2,3,4,5,6} = 5.
15 = 4 + 5 + 6, but also 15 = 7 + 8, so a(15) = 2, since this is the minimum.
		

Crossrefs

Showing 1-10 of 33 results. Next