A004277 1 together with positive even numbers.
1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132
Offset: 0
Links
- E. Friedman, Math. Magic
- Eric Weisstein's World of Mathematics, Cross Polytope
- Index entries for sequences related to Engel expansions
- Index entries for linear recurrences with constant coefficients, signature (2, -1).
Crossrefs
Programs
-
Haskell
a004277 n = 2 * n - 1 + signum (1 - n) a004277_list = 1 : [2, 4 ..] -- Reinhard Zumkeller, Dec 19 2013
-
Magma
[1] cat [2*n: n in [1..80]]; // Vincenzo Librandi, Jul 11 2015
-
Mathematica
Join[{1}, Table[2*n, {n, 200}]] (* Vladimir Joseph Stephan Orlovsky, Jul 10 2011 *) Select[Range@ 105, PowerMod[#, #, # + 1] == 1 &] (* Robert G. Wilson v, Sep 26 2016 *)
Formula
G.f.: (1+x^2)/(1-x)^2. - Paul Barry, Feb 28 2003
Inverse binomial transform of Cullen numbers A002064. a(n)=2n+0^n. - Paul Barry, Jun 12 2003
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k-1)*(-1)^k*2^(n-2k). - Paul Barry, Jan 16 2005
Equals binomial transform of [1, 1, 1, -1, 1, -1, 1, ...]. - Gary W. Adamson, Jul 15 2008
E.g.f.: 1+x*sinh(x) (aerated sequence). - Paul Barry, Oct 11 2009
Extensions
Corrected by Charles R Greathouse IV, Mar 18 2010
Comments