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.

Previous Showing 11-15 of 15 results.

A047250 Numbers that are congruent to {0, 3, 4, 5} (mod 6).

Original entry on oeis.org

0, 3, 4, 5, 6, 9, 10, 11, 12, 15, 16, 17, 18, 21, 22, 23, 24, 27, 28, 29, 30, 33, 34, 35, 36, 39, 40, 41, 42, 45, 46, 47, 48, 51, 52, 53, 54, 57, 58, 59, 60, 63, 64, 65, 66, 69, 70, 71, 72, 75, 76, 77, 78, 81, 82, 83, 84, 87, 88, 89, 90, 93, 94, 95, 96, 99
Offset: 1

Views

Author

Keywords

Comments

The sequence is the interleaving of A047233 with A047270. - Guenther Schrack, Feb 15 2019

Crossrefs

Complement: A047239.

Programs

  • Magma
    [n : n in [0..150] | n mod 6 in [0, 3, 4, 5]]; // Wesley Ivan Hurt, Jun 02 2016
    
  • Maple
    A047250:=n->(6*n-3+I^(2*n)-(1+I)*I^(-n)-(1-I)*I^n)/4: seq(A047250(n), n=1..100); # Wesley Ivan Hurt, Jun 02 2016
  • Mathematica
    Select[Range[0,100], MemberQ[{0,3,4,5}, Mod[#,6]]&] (* or *) LinearRecurrence[{1,0,0,1,-1}, {0,3,4,5,6}, 60] (* Harvey P. Dale, Apr 01 2013 *)
  • PARI
    my(x='x+O('x^70)); concat([0], Vec(x^2*(3+x+x^2+x^3)/((1+x)*(1+x^2)*(1-x)^2))) \\ G. C. Greubel, Feb 16 2019
    
  • Sage
    a=(x^2*(3+x+x^2+x^3)/((1+x)*(1+x^2)*(1-x)^2)).series(x, 72).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 16 2019

Formula

G.f.: x^2*(3+x+x^2+x^3)/((1+x)*(1+x^2)*(1-x)^2). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, Jun 02 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (6*n - 3 + i^(2*n) - (1+i)*i^(-n) - (1-i)*i^n)/4 where i=sqrt(-1).
a(2*k) = A047270(k), a(2*k-1) = A047233(k). (End)
E.g.f.: (2 - sin(x) - cos(x) + (3*x - 2)*sinh(x) + (3*x - 1)*cosh(x))/2. - Ilya Gutkovskiy, Jun 02 2016
From Guenther Schrack, Feb 15 2019: (Start)
a(n) = (6*n - 3 + (-1)^n - 2*(-1)^(n*(n-1)/2))/4.
a(n) = a(n-4) + 6, a(1)=0, a(2)=3, a(3)=4, a(4)=5, for n > 4.
a(-n) = -A047246(n+2). (End)
Sum_{n>=2} (-1)^n/a(n) = 2*log(2)/3 - Pi/(6*sqrt(3)). - Amiram Eldar, Dec 17 2021

A084060 a(n) = 1/2 + (1-6*n)*(-1)^n/2.

Original entry on oeis.org

1, 3, -5, 9, -11, 15, -17, 21, -23, 27, -29, 33, -35, 39, -41, 45, -47, 51, -53, 57, -59, 63, -65, 69, -71, 75, -77, 81, -83, 87, -89, 93, -95, 99, -101, 105, -107, 111, -113, 117, -119, 123, -125, 129, -131, 135, -137, 141, -143, 147, -149, 153, -155, 159, -161, 165, -167, 171, -173, 177, -179
Offset: 0

Views

Author

Paul Barry, May 11 2003

Keywords

Comments

abs(a(n+1)) = A047270(n).

Crossrefs

Programs

  • GAP
    List([0..60], n-> (1 + (1-6*n)*(-1)^n)/2); # G. C. Greubel, Jan 03 2020
  • Magma
    [1/2+(1-6*n)*(-1)^n/2: n in [0..60]]; // Vincenzo Librandi, Oct 26 2011
    
  • Maple
    seq( (1 + (1-6*n)*(-1)^n)/2, n=0..60); # G. C. Greubel, Jan 03 2020
  • Mathematica
    Table[(1 + (1-6*n)*(-1)^n)/2, {n,0,60}] (* G. C. Greubel, Jan 03 2020 *)
    LinearRecurrence[{-1,1,1},{1,3,-5},100] (* Harvey P. Dale, Mar 05 2023 *)
  • PARI
    vector(61, n, (1 - (7-6*n)*(-1)^n)/2) \\ G. C. Greubel, Jan 03 2020
    
  • Sage
    [(1 + (1-6*n)*(-1)^n)/2 for n in (0..60)] # G. C. Greubel, Jan 03 2020
    

Formula

Unsigned version is sum of alternate terms of A032766 (numbers congruent to {0,1,3} mod 4): (1, 3, 4, 6, 7, 9, 10, 12, ...) such that a(n) = A032766(n-1) + A032766(n+1). - Gary W. Adamson, Sep 13 2007
G.f.: (1 + 4*x - 3*x^2 )/( (1-x)*(1+x)^2 ). - R. J. Mathar, Oct 25 2011
E.g.f.: (1+3*x)*cosh(x) - 3*x*sinh(x). - G. C. Greubel, Jan 03 2020

A154253 Primes of the form 9n^2-8n+2.

Original entry on oeis.org

2, 3, 59, 659, 1907, 2467, 3803, 9539, 19507, 23003, 24859, 30859, 37507, 42299, 52747, 58403, 61339, 67427, 98387, 122267, 126499, 139627, 162947, 182899, 209459, 214987, 232003, 243707, 280547, 347707, 362003, 383987, 429899, 478403
Offset: 1

Views

Author

Vincenzo Librandi, Jan 05 2009

Keywords

Comments

Primes in A154254.
Primes generated by n = 1, 3, 9, 15, 17, 21, 33, 47, 51, 53, 59,...
(All but the first of these are either 3 (mod 6) or 5 (mod 6), as in A047270, because otherwise 9n^2-8n+2 is a multiple of 2 or 3. R. J. Mathar, Jul 17 2012).

Programs

  • Magma
    [a: n in [0..250] | IsPrime(a) where a is 9*n^2-8*n+2]; // Vincenzo Librandi, Jul 16 2012
  • Mathematica
    Select[Table[9n^2-8n+2,{n,0,1500}],PrimeQ] (* Vincenzo Librandi, Jul 16 2012 *)

A269112 a(n) = (3*(n-1)*n + (-1)^((n-1)*n/2) + 5)/2.

Original entry on oeis.org

3, 5, 11, 21, 33, 47, 65, 87, 111, 137, 167, 201, 237, 275, 317, 363, 411, 461, 515, 573, 633, 695, 761, 831, 903, 977, 1055, 1137, 1221, 1307, 1397, 1491, 1587, 1685, 1787, 1893, 2001, 2111, 2225, 2343, 2463, 2585, 2711, 2841, 2973, 3107, 3245, 3387, 3531, 3677, 3827
Offset: 1

Views

Author

Mikk Heidemaa, Feb 19 2016

Keywords

Crossrefs

Programs

  • Magma
    I:=[3,5]; [n le 2 select I[n] else 3*(n-1)^2-3*(n-1)- Self(n-2)+8: n in [1..50]]; // Vincenzo Librandi, Feb 22 2016
    
  • Mathematica
    Table[(3 (n - 1) n + (-1)^((n - 1) n/2) + 5)/2, {n, 100}]
    LinearRecurrence[{3, -4, 4, -3, 1}, {3, 5, 11, 21, 33}, 100]
    CoefficientList[Series[(3-4*x+8*x^2-4*x^3+3*x^4)/((1+x^2)*(1-x)^3), {x, 0, 100}], x]
  • PARI
    Vec((3-4*x+8*x^2-4*x^3+3*x^4)/((1+x^2)*(1-x)^3) + O(x^60)) \\ Michel Marcus, Feb 22 2016
    
  • Sage
    [(3*(n-1)*n+(-1)^((n-1)*n/2)+5)/2 for n in (1..50)] # Bruno Berselli, Feb 23 2016

Formula

G.f.: x*(3 - 4*x + 8*x^2 - 4*x^3 + 3*x^4)/((1 + x^2)*(1 - x)^3).
a(n) = (3*n^2 - 3*n + cos(n*Pi/2) + sin(n*Pi/2) + 5)/2.
a(n) = 3*(n-1)^2 - 3*(n-1) - a(n-2) + 8 for n>2.
a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5) for n>5. - Colin Barker, Feb 22 2016
a(n) = A047270(A000124(n-1)). - Bruno Berselli, Feb 23 2016

Extensions

Edited by Bruno Berselli, Feb 23 2016

A058301 Number of solutions to c(0)F(0) + ... + c(n)F(n) = 0, where c(i) = +-1 for i >= 0, number of (+1)'s >= number of (-1)'s, F(i) = A000045(i) = Fibonacci numbers.

Original entry on oeis.org

1, 0, 2, 3, 0, 6, 4, 0, 8, 11, 0, 22, 16, 0, 32, 42, 0, 84, 64, 0, 128, 165, 0, 330, 256, 0, 512, 654, 0, 1308, 1024, 0, 2048, 2605, 0, 5210, 4096, 0, 8192, 10398, 0, 20796, 16384, 0, 32768, 41550, 0, 83100, 65536, 0, 131072, 166116, 0, 332232, 262144, 0
Offset: 0

Views

Author

Naohiro Nomoto, Dec 08 2000

Keywords

Examples

			a(3) = 3 because +0+1+1-2 = -0+1+1-2 = +0-1-1+2 = 0;
a(5) = 6 because +0+1-1-2-3+5 = +0-1+1-2-3+5 = +0+1-1+2+3-5 = -0+1-1+2+3-5 = +0-1+1+2+3-5 = -0-1+1+2+3-5 = 0.
		

Crossrefs

Formula

a(3n+1) = 0, a(A047270(n)) = A002083(n+5), a(A047238(n)) = 2^n.

Extensions

More terms from Sean A. Irvine, Aug 02 2022
Previous Showing 11-15 of 15 results.