login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers that are congruent to {0, 1, 4, 5} mod 6.
3

%I #45 Sep 20 2023 14:20:15

%S 0,1,4,5,6,7,10,11,12,13,16,17,18,19,22,23,24,25,28,29,30,31,34,35,36,

%T 37,40,41,42,43,46,47,48,49,52,53,54,55,58,59,60,61,64,65,66,67,70,71,

%U 72,73,76,77,78,79,82,83,84,85,88,89,90,91,94,95,96,97

%N Numbers that are congruent to {0, 1, 4, 5} mod 6.

%C Numbers x which are not a solution to 3^x - 2^x == 5 mod 7. - _Cino Hilliard_, May 14 2003

%C The sequence is the interleaving of A047233 with A007310. - _Guenther Schrack_, Feb 13 2019

%H Guenther Schrack, <a href="/A047260/b047260.txt">Table of n, a(n) for n = 1..10006</a>

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).

%F G.f.: x^2*(1+3*x+x^2+x^3) / ((1+x)*(1+x^2)*(1-x)^2). - _R. J. Mathar_, Oct 08 2011

%F From _Wesley Ivan Hurt_, May 21 2016: (Start)

%F a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.

%F a(n) = (6*n - 5 - i^(2*n) + (1-i)*i^(-n) + (1+i)*i^n)/4 where i=sqrt(-1).

%F a(2*n) = A007310(n), a(2*n-1) = A047233(n). (End)

%F From _Guenther Schrack_, Feb 13 2019: (Start)

%F a(n) = (6*n - 5 - (-1)^n + 2*(-1)^(n*(n + 1)/2))/4.

%F a(n) = a(n-4) + 6, a(1)=0, a(2)=1, a(3)=4, a(4)=5, for n > 4.

%F a(-n) = -A047269(n+2). (End)

%F Sum_{n>=2} (-1)^n/a(n) = sqrt(3)*Pi/36 + log(3)/4 + 2*log(2)/3. - _Amiram Eldar_, Dec 16 2021

%p A047260:=n->(6*n-5-I^(2*n)+(1-I)*I^(-n)+(1+I)*I^n)/4: seq(A047260(n), n=1..100); # _Wesley Ivan Hurt_, May 21 2016

%t Table[(6n-5-I^(2n)+(1-I)*I^(-n)+(1+I)*I^n)/4, {n, 80}] (* _Wesley Ivan Hurt_, May 21 2016 *)

%t LinearRecurrence[{1,0,0,1,-1},{0,1,4,5,6},70] (* _Harvey P. Dale_, Sep 20 2023 *)

%o (Magma) [n : n in [0..100] | n mod 6 in [0, 1, 4, 5]]; // _Wesley Ivan Hurt_, May 21 2016

%o (PARI) my(x='x+O('x^70)); concat([0], Vec(x^2*(1+3*x+x^2+x^3)/((1-x)*(1-x^4)))) \\ _G. C. Greubel_, Feb 16 2019

%o (Sage) a=(x^2*(1+3*x+x^2+x^3)/((1-x)*(1-x^4))).series(x, 72).coefficients(x, sparse=False); a[1:] # _G. C. Greubel_, Feb 16 2019

%o (GAP) Filtered([0..100],n->n mod 6 = 0 or n mod 6 = 1 or n mod 6 = 4 or n mod 6 = 5); # _Muniru A Asiru_, Feb 19 2019

%Y Cf. A007310, A047233, A047269.

%Y Complement: A047243.

%K nonn,easy

%O 1,3

%A _N. J. A. Sloane_

%E More terms from _Wesley Ivan Hurt_, May 21 2016