The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A118286 Numbers n such that n == 0 (mod 4) or n == 2 (mod 12). 2
 2, 4, 8, 12, 14, 16, 20, 24, 26, 28, 32, 36, 38, 40, 44, 48, 50, 52, 56, 60, 62, 64, 68, 72, 74, 76, 80, 84, 86, 88, 92, 96, 98, 100, 104, 108, 110, 112, 116, 120, 122, 124, 128, 132, 134, 136, 140, 144, 146, 148, 152, 156, 158, 160, 164, 168, 170, 172, 176, 180, 182 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS 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. The difference between two consecutive terms follow the 4-period: (2, 4, 4, 2). - Bernard Schott, Feb 25 2019 LINKS Guenther Schrack, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Colin Barker) Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1). FORMULA G.f.: 2*x*(1+2*x^2) / ( (1+x^2)*(1-x)^2 ). - R. J. Mathar, Dec 02 2011 a(n) = 2*A047237(n+1) = 3*n - 1 + cos(n*Pi/2). - R. J. Mathar, Dec 02 2011 a(n) = (-2 + (-i)^n + i^n + 6*n)/2, where i = sqrt(-1). - Colin Barker, Oct 19 2015 a(n) = (6*n - 2 + (1 + (-1)^n)*(-1)^(n*(n-1)/2))/2. - Guenther Schrack, Feb 21 2019 E.g.f.: cos(x) + (3*x-1)*exp(x). - G. C. Greubel, Feb 21 2019 MAPLE select(n->modp(n, 4)=0 or modp(n, 12)=2, [\$1..190]); # Muniru A Asiru, Feb 22 2019 MATHEMATICA Union[4*Range, 2+12*Range] PROG (PARI) a(n) = (-2+(-I)^n+I^n+6*n)/2 \\ Colin Barker, Oct 19 2015 (PARI) Vec(2*x*(1+2*x^2)/((1+x^2)*(1-x)^2) + O(x^70)) \\ Colin Barker, Oct 19 2015 (PARI) for(n=1, 1e3, if(n%4 == 0 || n%12 == 2, print1(n", "))) \\ Altug Alkan, Oct 19 2015 (MAGMA) [Round((3*n-1) + (Sqrt(-1))^n*(1+(-1)^n)/2): n in [1..70]]; // G. C. Greubel, Feb 21 2019 (Sage) [(3*n-1) + I^n*(1+(-1)^n)/2 for n in (1..70)] # G. C. Greubel, Feb 21 2019 (GAP) Filtered([1..190], n->n mod 4=0 or n mod 12=2); # Muniru A Asiru, Feb 22 2019 CROSSREFS Cf. A047237, A118278, A118282. Sequence in context: A182837 A256940 A048314 * A211823 A024911 A024906 Adjacent sequences:  A118283 A118284 A118285 * A118287 A118288 A118289 KEYWORD nonn,easy AUTHOR T. D. Noe, Apr 23 2006 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.

Last modified July 10 00:25 EDT 2020. Contains 335570 sequences. (Running on oeis4.)