login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047229 Numbers that are congruent to {0, 2, 3, 4} mod 6. 13
0, 2, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 56, 57, 58, 60, 62, 63, 64, 66, 68, 69, 70, 72, 74, 75, 76, 78, 80, 81, 82, 84 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Appears to be the sequence of n such that n never divides 3^x-2^x for x>=0. - Benoit Cloitre, Aug 19 2002

Numbers divisible by 2 or 3. - Nick Hobson (nickh(AT)qbyte.org), Mar 13 2007

Numbers k such that average of squares of the first k positive integers is not integer. A089128(a(n)) > 1. For n >= 2, a(n) = complement of A007310. - Jaroslav Krizek, May 28 2010

Numbers n such that n*Fibonacci(n) is even. - Gary Detlefs, Oct 27 2011

Also numbers that have a divisor d with 2^1 <= d < 2^2 (see Ei definition p. 340 in Besicovitch article). - Michel Marcus, Oct 31 2013

Starting with 0, 2, a(n) is the smallest number greater than a(n-1) that is not relatively prime to a(n-2). - Franklin T. Adams-Watters, Dec 04 2014

REFERENCES

Hsien-Kuei Hwang, S Janson, TH Tsai, Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications, Preprint, 2016; http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf. Also Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..10000

A. S. Besicovitch, On the density of certain sequences of integers, Mathematische Annalen, 1935, Volume 110, Issue 1, pp 336-341.

A. S. Besicovitch, On the density of certain sequences of integers, Mathematische Annalen, 1935, Volume 110, Issue 1, pp 336-341.

Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1)

FORMULA

a(n) = (1/8)*{11*(n mod 4)+[(n+1) mod 4]+[(n+2) mod 4]-[(n+3) mod 4]} + 6*A002265(n). - Paolo P. Lava, Nov 05 2007

a(n) = (6*(n-1)-(1+(-1)^n)*(-1)^(n*(1+(-1)^n)/4))/4; also a(n) = (6*(n-1)-(-i)^n-i^n)/4, where i is the imaginary unit. - Bruno Berselli, Nov 08 2010

G.f.: x^2*(2-x+2*x^2) / ( (x^2+1)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011

a(n) = floor((6*n-5)/4)+floor(1/2*cos((n+2)*Pi/2)+1/2). - Gary Detlefs, Oct 28 2011 and corrected by Aleksey A. Solomein, Feb 08 2016

a(n) = a(n-1) + a(n-4) - a(n-5), n>4. - Gionata Neri, Apr 15 2015

a(n) = -a(2 - n) for all n in Z. - Michael Somos, Oct 05 2015

a(n) = n + 2*floor((n-2)/4) + floor(f(n+2)/3), where f(n) = n mod 4. - Aleksey A. Solomein, Feb 08 2016

a(n) = (3*n-3-cos(n*Pi/2))/2. - Wesley Ivan Hurt, Oct 02 2017

MATHEMATICA

Select[Range[0, 100], MemberQ[{0, 2, 3, 4}, Mod[#, 6]]&] (* Harvey P. Dale, Aug 15 2011 *)

a[ n_] := With[ {m = n - 1}, {2, 3, 4, 0}[[Mod[m, 4, 1]]] + Quotient[ m, 4] 6]; (* Michael Somos, Oct 05 2015 *)

PROG

(MAGMA) [ n : n in [0..150] | n mod 6 in [0, 2, 3, 4]] ; // Vincenzo Librandi, Jun 01 2011

(PARI) a(n)=(n-1)\4*6+[4, 0, 2, 3][n%4+1] \\ Charles R Greathouse IV, Oct 28 2011

(Haskell)

a047229 n = a047229_list !! (n-1)

a047229_list = filter ((`notElem` [1, 5]) . (`mod` 6)) [0..]

-- Reinhard Zumkeller, Jun 30 2012

CROSSREFS

Cf. A007310 (complement).

Union of A005843 and A008585.

Sequence in context: A173905 A171581 A063450 * A094229 A067290 A106577

Adjacent sequences:  A047226 A047227 A047228 * A047230 A047231 A047232

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 19 21:28 EDT 2019. Contains 328244 sequences. (Running on oeis4.)