A001651 Numbers not divisible by 3.
1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 73, 74, 76, 77, 79, 80, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95, 97, 98, 100, 101, 103, 104
Offset: 1
Examples
G.f.: x + 2*x^2 + 4*x^3 + 5*x^4 + 7*x^5 + 8*x^6 + 10*x^7 + 11*x^8 + 13*x^9 + ...
References
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..10000
- L. Carlitz, R. Scoville and T. Vaughan, Some arithmetic functions related to Fibonacci numbers, Fib. Quart., Vol. 11, No. 4 (1973), pp. 337-386.
- Aneta Dudek, Gyula Y. Katona, and A.Pawel Wojda, m_Path Cover Saturated Graphs, Electronic Notes in Discrete Math., Vol. 13 (April 2003), pp. 41-44.
- Marietjie Frick and Joy Singleton, Lower Bound for the Size of Maximal Nontraceable Graphs, Electron. J. Combin., 12#R32 (2005), 9 pp.
- Aviezri S. Fraenkel, New games related to old and new sequences, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 4, Paper G6, 2004. (See Table 5.)
- Brian Hopkins, Euler's Enumerations, Enumerative Combinatorics and Applications, Vol. 1, No. 1 (2021), Article #S1H1.
- G. Ledin, Jr., Is Eratosthenes out?, Fib. Quart., Vol. 6, No. 4 (1968), pp. 261-265.
- Gerard P. Michon, Counting Polyhedra.
- Melvyn B. Nathanson, On the fractional parts of roots of positive real numbers, Amer. Math. Monthly, Vol. 120, No. 5 (2013), pp. 409-429 [see p. 417].
- M. A. Nyblom, Some curious sequences involving floor and ceiling functions, Am. Math. Monthly, Vol. 109, No. 6 (2002), pp. 559-564, Ex. 2.2.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
- Marco Ripà, The rectangular spiral or the n1 X n2 X ... X nk Points Problem , Notes on Number Theory and Discrete Mathematics, Vol. 20, No. 1 (2014), pp. 59-71.
- Eric Weisstein's World of Mathematics, Complete Bipartite Graph, Graph Bandwidth, and RATS Sequence.
- Dominika Závacká, Cristina Dalfó, and Miquel Angel Fiol, Integer sequences from k-iterated line digraphs, CEUR: Proc. 24th Conf. Info. Tech. - Appl. and Theory (ITAT 2024) Vol 3792, 156-161. See p. 161, Table 2.
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Crossrefs
Programs
-
GAP
Filtered([0..110],n->n mod 3<>0); # Muniru A Asiru, Jul 24 2018
-
Haskell
a001651 = (`div` 2) . (subtract 1) . (* 3) a001651_list = filter ((/= 0) . (`mod` 3)) [1..] -- Reinhard Zumkeller, Jul 07 2012, Aug 23 2011
-
Magma
[3*(2*n-1)/4-(-1)^n/4: n in [1..80]]; // Vincenzo Librandi, Jun 07 2011
-
Maple
A001651 := n -> 3*floor(n/2) - (-1)^n; # Corrected by M. F. Hasler, Apr 07 2015 A001651:=(1+z+z**2)/(z+1)/(z-1)**2; # Simon Plouffe in his 1992 dissertation a[1]:=1:a[2]:=2:for n from 3 to 100 do a[n]:=a[n-2]+3 od: seq(a[n], n=1..69); # Zerinvary Lajos, Mar 16 2008, offset corrected by M. F. Hasler, Apr 07 2015
-
Mathematica
Select[Table[n,{n,200}],Mod[#,3]!=0&] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011 *) Drop[Range[200 + 1], {1, -1, 3}] - 1 (* József Konczer, May 24 2016 *) Floor[(3 Range[70] - 1)/2] (* Eric W. Weisstein, Apr 24 2017 *) CoefficientList[Series[(x^2 + x + 1)/((x - 1)^2 (x + 1)), {x, 0, 70}], x] (* or *) LinearRecurrence[{1, 1, -1}, {1, 2, 4}, 70] (* Robert G. Wilson v, Jul 25 2018 *)
-
PARI
{a(n) = n + (n-1)\2}; /* Michael Somos, Jan 15 2011 */
-
PARI
x='x+O('x^100); Vec(x*(1+x+x^2)/((1-x)*(1-x^2))) \\ Altug Alkan, Oct 22 2015
-
Python
print([k for k in range(1, 105) if k%3]) # Michael S. Branicky, Sep 06 2021
-
Python
def A001651(n): return (n<<1)-(n>>1)-1 # Chai Wah Wu, Mar 05 2024
Formula
a(n) = 3 + a(n-2) for n > 2.
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3.
a(2*n+1) = 3*n+1, a(2*n) = 3*n-1.
G.f.: x * (1 + x + x^2) / ((1 - x) * (1 - x^2)). - Michael Somos, Jun 08 2000
a(n) = (4-n)*a(n-1) + 2*a(n-2) + (n-3)*a(n-3) (from the Carlitz et al. article).
a(n) = floor((3*n-1)/2). [Corrected by Gary Detlefs]
a(1) = 1, a(n) = 2*a(n-1) - 3*floor(a(n-1)/3). - Benoit Cloitre, Aug 17 2002
a(n+1) = 1 + n - n mod 2 + (n + n mod 2)/2. - Reinhard Zumkeller, Dec 17 2002
a(1) = 1, a(n+1) = a(n) + (a(n) mod 3). - Reinhard Zumkeller, Mar 23 2003
a(1) = 1, a(n) = 3*(n-1) - a(n-1). - Benoit Cloitre, Apr 12 2003
a(n) = 3*(2*n-1)/4 - (-1)^n/4. - Benoit Cloitre, Jun 12 2003
Nearest integer to (Sum_{k>=n} 1/k^3)/(Sum_{k>=n} 1/k^4). - Benoit Cloitre, Jun 12 2003
a(n) = T(n, 1) = T(n, n-1), where T is the array in A026386. - Emeric Deutsch, Feb 18 2004
a(n) = sqrt(3*A001082(n)+1). - Zak Seidov, Dec 12 2007
Euler transform of length 3 sequence [2, 1, -1]. - Michael Somos, Sep 06 2008
A011655(a(n)) = 1. - Reinhard Zumkeller, Nov 30 2009
a(n) = n - 1 + ceiling(n/2). - Michael Somos, Jan 15 2011
a(n) = 3*A000217(n)+1 - 2*Sum_{i=1..n-1} a(i), for n>1. - Bruno Berselli, Nov 17 2010
a(n) = 3*floor(n/2) + (-1)^(n+1). - Gary Detlefs, Dec 29 2011
A215879(a(n)) > 0. - Reinhard Zumkeller, Dec 28 2012 [More precisely, A215879 is the characteristic function of A001651. - M. F. Hasler, Apr 07 2015]
a(n) = 2n - 1 - floor(n/2). - Wesley Ivan Hurt, Oct 25 2013
a(n) = (3n - 2 + (n mod 2)) / 2. - Wesley Ivan Hurt, Mar 31 2014
1/1^3 - 1/2^3 + 1/4^3 - 1/5^3 + 1/7^3 - 1/8^3 + ... = 4 Pi^3/(3 sqrt(3)). - M. F. Hasler, Mar 29 2015
E.g.f.: (4 + sinh(x) - cosh(x) + 3*(2*x - 1)*exp(x))/4. - Ilya Gutkovskiy, May 24 2016
a(n) = a(n+k-1) + a(n-k) - a(n-1) for n > k >= 0. - Bob Selcoe, Feb 03 2017
a(n) = -a(1-n) for all n in Z. - Michael Somos, Jul 31 2018
a(n) = n + A004526(n-1). - David James Sycamore, Sep 06 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(3*sqrt(3)) (A073010). - Amiram Eldar, Dec 04 2021
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 1.
Product_{n>=2} (1 + (-1)^n/a(n)) = 2*Pi/(3*sqrt(3)) (A248897). (End)
Extensions
This is a list, so the offset should be 1. I corrected this and adjusted some of the comments and formulas. Other lines probably also need to be adjusted. - N. J. A. Sloane, Jan 01 2011
Offset of pre-2011 formulas verified or corrected by M. F. Hasler, Apr 07-18 2015 and by Danny Rorabaugh, Oct 23 2015
Comments