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.
%I A047229 #134 Nov 19 2024 00:44:29 %S A047229 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, %T A047229 38,39,40,42,44,45,46,48,50,51,52,54,56,57,58,60,62,63,64,66,68,69,70, %U A047229 72,74,75,76,78,80,81,82,84 %N A047229 Numbers that are congruent to {0, 2, 3, 4} mod 6. %C A047229 Appears to be the sequence of n such that n never divides 3^x-2^x for x>=0. - _Benoit Cloitre_, Aug 19 2002 %C A047229 Numbers divisible by 2 or 3. - _Nick Hobson_, Mar 13 2007 %C A047229 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 %C A047229 Numbers k such that k*Fibonacci(k) is even. - _Gary Detlefs_, Oct 27 2011 %C A047229 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 %C A047229 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 %H A047229 Vincenzo Librandi, <a href="/A047229/b047229.txt">Table of n, a(n) for n = 1..10000</a> %H A047229 A. S. Besicovitch, <a href="http://dx.doi.org/10.1007/BF01448032">On the density of certain sequences of integers</a>, Mathematische Annalen, Vol. 110, No. 1 (1935), pp. 336-341; <a href="http://gdz.sub.uni-goettingen.de/dms/resolveppn/?PPN=GDZPPN002277255">alternative link</a>. %H A047229 Hsien-Kuei Hwang, Svante Janson and Tsung-Hsi Tsai, <a href="https://doi.org/10.1145/3127585">Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications</a>, ACM Transactions on Algorithms, Vol. 13, No. 4 (2017), Article #47; <a href="https://www.researchgate.net/profile/Hsien-Kuei-Hwang/publication/320642171_Exact_and_Asymptotic_Solutions_of_a_Divide-and-Conquer_Recurrence_Dividing_at_Half_Theory_and_Applications/links/59f9a5be0f7e9b553ec0eaad">ResearchGate link</a>; <a href="http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf">preprint</a>, 2016. %H A047229 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-1) %F A047229 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 %F A047229 G.f.: x^2*(2-x+2*x^2) / ( (x^2+1)*(x-1)^2 ). - _R. J. Mathar_, Oct 08 2011 %F A047229 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 %F A047229 a(n) = a(n-1) + a(n-4) - a(n-5), n>4. - _Gionata Neri_, Apr 15 2015 %F A047229 a(n) = -a(2-n) for all n in Z. - _Michael Somos_, Oct 05 2015 %F A047229 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 %F A047229 a(n) = (3*n - 3 - cos(n*Pi/2))/2. - _Wesley Ivan Hurt_, Oct 02 2017 %F A047229 Equals {0} union {A003586(j) * A007310(k) for j>1 and k>0}. - _Flávio V. Fernandes_, Jul 21 2021 %F A047229 Sum_{n>=2} (-1)^n/a(n) = log(3)/2 - log(2)/3. - _Amiram Eldar_, Dec 12 2021 %t A047229 Select[Range[0,100],MemberQ[{0,2,3,4},Mod[#,6]]&] (* _Harvey P. Dale_, Aug 15 2011 *) %t A047229 a[ n_] := With[ {m = n - 1}, {2, 3, 4, 0}[[Mod[m, 4, 1]]] + Quotient[ m, 4] 6]; (* _Michael Somos_, Oct 05 2015 *) %o A047229 (Magma) [ n : n in [0..150] | n mod 6 in [0, 2, 3, 4]] ; // _Vincenzo Librandi_, Jun 01 2011 %o A047229 (PARI) a(n)=(n-1)\4*6+[4,0,2,3][n%4+1] \\ _Charles R Greathouse IV_, Oct 28 2011 %o A047229 (Haskell) %o A047229 a047229 n = a047229_list !! (n-1) %o A047229 a047229_list = filter ((`notElem` [1,5]) . (`mod` 6)) [0..] %o A047229 -- _Reinhard Zumkeller_, Jun 30 2012 %o A047229 (Python) %o A047229 def A047229(n): return 3*(n-1>>1&-2)+(4,0,2,3)[n&3] # _Chai Wah Wu_, Nov 18 2024 %Y A047229 Cf. A007310 (complement). %Y A047229 Union of A005843 and A008585. %K A047229 nonn,easy %O A047229 1,2 %A A047229 _N. J. A. Sloane_