A026741 a(n) = n if n odd, n/2 if n even.
0, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38
Offset: 0
Examples
G.f. = x + x^2 + 3*x^3 + 2*x^4 + 5*x^5 + 3*x^6 + 7*x^7 + 4*x^8 + ...
References
- David Wells, Prime Numbers: The Most Mysterious Figures in Math. Hoboken, New Jersey: John Wiley & Sons (2005), p. 53.
- David Wells, The Penguin Dictionary of Curious and Interesting Numbers, 2nd Ed. Penguin (1997), p. 79.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..10000
- Isabel Cação, Helmuth R. Malonek, Maria Irene Falcão, and Graça Tomaz, Combinatorial Identities Associated with a Multidimensional Polynomial Sequence, J. Int. Seq., Vol. 21 (2018), Article 18.7.4.
- John M. Campbell, An Integral Representation of Kekulé Numbers, and Double Integrals Related to Smarandache Sequences, arXiv:1105.3399 [math.GM], 2011.
- Leonhard Euler, De mirabilibus proprietatibus numerorum pentagonalium, par. 2.
- Leonhard Euler, On the remarkable properties of the pentagonal numbers, arXiv:math/0505373 [math.HO], 2005.
- Y. Ito and I. Nakamura, Hilbert schemes and simple singularities, New trends in algebraic geometry (Warwick, 1996), 151-233, Cambridge University Press, 1999.
- Masanobu Kaneko, The Akiyama-Tanigawa algorithm for Bernoulli numbers, J. Integer Sequences, 3 (2000), Article 00.2.9.
- Mathematics Stack Exchange, Permutations (with no duplicates) of decimal base digits 1,2,...,8,9,0.
- Kival Ngaokrajang, Illustration of spiral with circle centers 2..5.
- Kival Ngaokrajang, Illustration of vertex angle of regular n-gon for n = 3..7.
- Eric Weisstein's World of Mathematics, Lehmer Number.
- Eric Weisstein's World of Mathematics, Simplex Simplex Picking.
- Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
- Index to divisibility sequences.
Crossrefs
Programs
-
Haskell
import Data.List (transpose) a026741 n = a026741_list !! n a026741_list = concat $ transpose [[0..], [1,3..]] -- Reinhard Zumkeller, Dec 12 2011
-
Magma
[2*n/(3+(-1)^n): n in [0..70]]; // Vincenzo Librandi, Aug 14 2011
-
Maple
A026741 := proc(n) if type(n,'odd') then n; else n/2; end if; end proc: seq(A026741(n), n=0..76); # R. J. Mathar, Jan 22 2011
-
Mathematica
Numerator[Abs[Table[Det[DiagonalMatrix[Table[1/i^2 - 1, {i, 1, n - 1}]] + 1], {n, 20}]]] (* Alexander Adamchuk, Jun 02 2006 *) halfMax = 40; Riffle[Range[0, halfMax], Range[1, 2halfMax + 1, 2]] (* Harvey P. Dale, Mar 27 2011 *) a[ n_] := Numerator[n / 2]; (* Michael Somos, Jan 20 2017 *) Array[If[EvenQ[#],#/2,#]&,80,0] (* Harvey P. Dale, Jul 08 2023 *)
-
PARI
a(n) = numerator(n/2) \\ Rick L. Shepherd, Sep 12 2007
-
Python
def A026741(n): return n if n % 2 else n//2 # Chai Wah Wu, Apr 02 2021
-
Sage
[lcm(n, 2) / 2 for n in range(77)] # Zerinvary Lajos, Jun 07 2009
Formula
G.f.: x*(1 + x + x^2)/(1-x^2)^2. - Len Smiley, Apr 30 2001
a(n) = 2*a(n-2) - a*(n-4) for n >= 4.
a(n) = n * 2^((n mod 2) - 1). - Reinhard Zumkeller, Oct 16 2001
a(n) = 2*n/(3 + (-1)^n). - Benoit Cloitre, Mar 24 2002
Multiplicative with a(2^e) = 2^(e-1) and a(p^e) = p^e, p > 2. - Vladeta Jovovic, Apr 05 2002
a(n) = n / gcd(n, 2). a(n)/A045896(n) = n/((n+1)*(n+2)).
For n > 0, a(n) = denominator of Sum_{i=1..n-1} 2/(i*(i+1)), numerator=A022998. - Reinhard Zumkeller, Apr 21 2012, Jul 25 2002 [thanks to Phil Carmody who noticed an error]
For n > 1, a(n) = GCD of the n-th and (n-1)-th triangular numbers (A000217). - Ross La Haye, Sep 13 2003
Euler transform of finite sequence [1, 2, -1]. - Michael Somos, Jun 15 2005
G.f.: x * (1 - x^3) / ((1 - x) * (1 - x^2)^2) = Sum_{k>0} k * (x^k - x^(2*k)). - Michael Somos, Jun 15 2005
a(n+3) + a(n+2) = 3 + a(n+1) + a(n). a(n+3) * a(n) = - 1 + a(n+2) * a(n+1). a(n) = -a(-n) for all n in Z. - Michael Somos, Jun 15 2005
For n > 1, a(n) is the numerator of the average of 1, 2, ..., n - 1; i.e., numerator of A000217(n-1)/(n-1), with corresponding denominators [1, 2, 1, 2, ...] (A000034). - Rick L. Shepherd, Jun 05 2006
Equals A126988 * (1, -1, 0, 0, 0, ...). - Gary W. Adamson, Apr 17 2007
For n >= 1, a(n) = gcd(n,A000217(n)). - Rick L. Shepherd, Sep 12 2007
a(n) = numerator(n/(2*n-2)) for n >= 2; A022998(n-1) = denominator(n/(2*n-2)) for n >= 2. - Johannes W. Meijer, Jun 18 2009
a(n) = A167192(n+2, 2). - Reinhard Zumkeller, Oct 30 2009
From R. J. Mathar, Apr 18 2011: (Start)
a(n) = A109043(n)/2.
Dirichlet g.f.: zeta(s-1)*(1 - 1/2^s). (End)
a((2*n+1)*2^p - 1) = 2^p - 1 + n*A151821(p+1), p >= 0 and n >= 0. - Johannes W. Meijer, Feb 03 2013
a(n+1) = denominator(H(n, 1)), n >= 0, with H(n, 1) = 2*n/(n+1) the harmonic mean of n and 1. a(n+1) = A227042(n, 1). See the formula a(n) = n/gcd(n, 2) given above. - Wolfdieter Lang, Jul 04 2013
a(n) = numerator(n/2). - Wesley Ivan Hurt, Oct 02 2013
a(n) = numerator(1 - 2/(n+2)), n >= 0; a(n) = denominator(1 - 2/n), n >= 1. - Kival Ngaokrajang, Jul 17 2014
a(n) = Sum_{i = floor(n/2)..floor((n+1)/2)} i. - Wesley Ivan Hurt, Apr 27 2016
Euler transform of length 3 sequence [1, 2, -1]. - Michael Somos, Jan 20 2017
G.f.: x / (1 - x / (1 - 2*x / (1 + 7*x / (2 - 9*x / (7 - 4*x / (3 - 7*x / (2 + 3*x))))))). - Michael Somos, Jan 20 2017
From Peter Bala, Mar 24 2019: (Start)
a(n) = Sum_{d|n, n/d odd} phi(d), where phi(n) is the Euler totient function A000010.
O.g.f.: Sum_{n >= 1} phi(n)*x^n/(1 - x^(2*n)). (End)
a(n) = A256095(2*n,n). - Alois P. Heinz, Jan 21 2020
E.g.f.: x*(2*cosh(x) + sinh(x))/2. - Stefano Spezia, Apr 28 2023
From Ctibor O. Zizka, Oct 05 2023: (Start)
For k >= 0, a(k) = gcd(k + 1, k*(k + 1)/2).
If (k mod 4) = 0 or 2 then a(k) = (k + 1).
If (k mod 4) = 1 or 3 then a(k) = (k + 1)/2. (End)
Sum_{n=1..oo} 1/a(n)^2 = 7*Pi^2/24. - Stefano Spezia, Dec 02 2023
a(n)*a(n+1) = A000217(n). - Rémy Sigrist, Mar 19 2025
Extensions
Better description from Jud McCranie
Edited by Ralf Stephan, Jun 04 2003
Comments