cp's OEIS Frontend

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.

A118286 Numbers n such that n == 0 (mod 4) or n == 2 (mod 12).

This page as a plain text file.
%I A118286 #36 Sep 08 2022 08:45:25
%S A118286 2,4,8,12,14,16,20,24,26,28,32,36,38,40,44,48,50,52,56,60,62,64,68,72,
%T A118286 74,76,80,84,86,88,92,96,98,100,104,108,110,112,116,120,122,124,128,
%U A118286 132,134,136,140,144,146,148,152,156,158,160,164,168,170,172,176,180,182
%N A118286 Numbers n such that n == 0 (mod 4) or n == 2 (mod 12).
%C A118286 Except for n=2, conjectured n such that A118278(n)=-1 and A118282(n)=-1; n such that there is an infinite set of numbers not representable as the sum of three n-gonal numbers or three generalized n-gonal numbers.
%C A118286 The difference between two consecutive terms follow the 4-period: (2, 4, 4, 2). - _Bernard Schott_, Feb 25 2019
%H A118286 Guenther Schrack, <a href="/A118286/b118286.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Colin Barker)
%H A118286 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-1).
%F A118286 G.f.: 2*x*(1+2*x^2) / ( (1+x^2)*(1-x)^2 ). - _R. J. Mathar_, Dec 02 2011
%F A118286 a(n) = 2*A047237(n+1) = 3*n - 1 + cos(n*Pi/2). - _R. J. Mathar_, Dec 02 2011
%F A118286 a(n) = (-2 + (-i)^n + i^n + 6*n)/2, where i = sqrt(-1). - _Colin Barker_, Oct 19 2015
%F A118286 a(n) = (6*n - 2 + (1 + (-1)^n)*(-1)^(n*(n-1)/2))/2. - _Guenther Schrack_, Feb 21 2019
%F A118286 E.g.f.: cos(x) + (3*x-1)*exp(x). - _G. C. Greubel_, Feb 21 2019
%p A118286 select(n->modp(n,4)=0 or modp(n,12)=2,[$1..190]); # _Muniru A Asiru_, Feb 22 2019
%t A118286 Union[4*Range[50], 2+12*Range[16]]
%o A118286 (PARI) a(n) = (-2+(-I)^n+I^n+6*n)/2 \\ _Colin Barker_, Oct 19 2015
%o A118286 (PARI) Vec(2*x*(1+2*x^2)/((1+x^2)*(1-x)^2) + O(x^70)) \\ _Colin Barker_, Oct 19 2015
%o A118286 (PARI) for(n=1, 1e3, if(n%4 == 0 || n%12 == 2, print1(n", "))) \\ _Altug Alkan_, Oct 19 2015
%o A118286 (Magma) [Round((3*n-1) + (Sqrt(-1))^n*(1+(-1)^n)/2): n in [1..70]]; // _G. C. Greubel_, Feb 21 2019
%o A118286 (Sage) [(3*n-1) + I^n*(1+(-1)^n)/2 for n in (1..70)] # _G. C. Greubel_, Feb 21 2019
%o A118286 (GAP) Filtered([1..190],n->n mod 4=0 or n mod 12=2); # _Muniru A Asiru_, Feb 22 2019
%Y A118286 Cf. A047237, A118278, A118282.
%K A118286 nonn,easy
%O A118286 1,1
%A A118286 _T. D. Noe_, Apr 23 2006