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-19 of 19 results.

A061891 a(0) = 1; for n>0, a(n) = a(n-1) if n is already in the sequence, a(n) = a(n-1) + 3 otherwise.

Original entry on oeis.org

1, 1, 4, 7, 7, 10, 13, 13, 16, 19, 19, 22, 25, 25, 28, 31, 31, 34, 37, 37, 40, 43, 43, 46, 49, 49, 52, 55, 55, 58, 61, 61, 64, 67, 67, 70, 73, 73, 76, 79, 79, 82, 85, 85, 88, 91, 91, 94, 97, 97, 100, 103, 103, 106, 109, 109, 112, 115, 115, 118, 121, 121, 124
Offset: 0

Views

Author

N. J. A. Sloane and Benoit Cloitre, Apr 01 2003

Keywords

Crossrefs

Cf. A080578.

Programs

Formula

a(n) = 2*n-1 if n == 1 (mod 3), 2*n if n == 2 (mod 3), 2*n + 1 if n == 0 (mod 3).
Differences are periodic with period 3.
From Colin Barker, Jun 20 2013: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4).
G.f.: (2*x^3 + 3*x^2 + 1) / ((x - 1)^2*(x^2 + x +1)). (End)
a(n) = 2*n + 1 - A080425(n) = 2*n - 1 + A010872(n+1). [Wesley Ivan Hurt, Jul 07 2013]

A173178 Numbers k such that 2*k+3 is a prime of the form 3*A024893(m) + 2.

Original entry on oeis.org

1, 4, 7, 10, 13, 19, 22, 25, 28, 34, 40, 43, 49, 52, 55, 64, 67, 73, 82, 85, 88, 94, 97, 112, 115, 118, 124, 127, 130, 133, 139, 145, 154, 157, 172, 175, 178, 190, 193, 199, 208, 214, 220, 223, 229, 232, 238, 244, 250, 253, 259, 277, 280, 283, 292, 295, 298, 307, 319
Offset: 1

Views

Author

Eric Desbiaux, Feb 11 2010

Keywords

Comments

With the Bachet-Bézout theorem implicating Gauss Lemma and the Fundamental Theorem of Arithmetic,
for k > 1, k = 2*a + 3*b (a and b integers)
first type
A001477 = (2*A080425) + (3*A008611)
A000040 = (2*A039701) + (3*A157966)
A024893 Numbers k such that 3*k + 2 is prime
A034936 Numbers k such that 3*k + 4 is prime
OR second type
A001477 = (2*A028242) + (3*A059841)
A000040 = (2*A067076) + (3*1)
A067076 Numbers k such that 2*k + 3 is prime
k a b OR a b
-- - - - -
0 0 0 0 0
1 - - - -
2 1 0 1 0
3 0 1 0 1
4 2 0 2 0
5 1 1 1 1
6 0 2 3 0
7 2 1 2 1
8 1 2 4 0
9 0 3 3 1
10 2 2 5 0
11 1 3 4 1
12 0 4 6 0
13 2 3 5 1
14 1 4 7 0
15 0 5 6 1
...
2* 1 + 3 OR 3* 1 + 2 = 5;
2* 4 + 3 OR 3* 3 + 2 = 11;
2* 7 + 3 OR 3* 5 + 2 = 17;
2*10 + 3 OR 3* 7 + 2 = 23;
2*13 + 3 OR 3* 9 + 2 = 29;
2*19 + 3 OR 3*13 + 2 = 41;
2*22 + 3 OR 3*15 + 2 = 47;
2*25 + 3 OR 3*17 + 2 = 53;
2*28 + 3 OR 3*19 + 2 = 59.
A024893 Numbers k such that 3k+2 is prime.
A007528 Primes of the form 6k-1.
A024898 Positive integers k such that 6k-1 is prime.
1, 4, 7, 10, 13, 19, ... = (3*(4*A024898 - A024893) - 7)/2 = (A112774 - 3*A024893 - 5)/2 = A003627 - (3*A024893 - 5)/2.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 320], PrimeQ[(p = 2*# + 3)] && Mod[p, 3] == 2 &] (* Amiram Eldar, Jul 30 2024 *)

Formula

a(n) = 3*A059325(n) + 1. - Amiram Eldar, Jul 30 2024

Extensions

Data corrected and extended by Amiram Eldar, Jul 30 2024

A131380 a(3n) = 2n, a(3n+1) = 2n+2, a(3n+2) = 2n+1.

Original entry on oeis.org

0, 2, 1, 2, 4, 3, 4, 6, 5, 6, 8, 7, 8, 10, 9, 10, 12, 11, 12, 14, 13, 14, 16, 15, 16, 18, 17, 18, 20, 19, 20, 22, 21, 22, 24, 23, 24, 26, 25, 26, 28, 27, 28, 30, 29, 30, 32, 31, 32, 34, 33, 34, 36, 35, 36, 38, 37, 38, 40, 39, 40, 42, 41, 42, 44, 43, 44, 46, 45, 46, 48, 47, 48, 50
Offset: 0

Views

Author

Paul Curtz, Oct 01 2007

Keywords

Crossrefs

Programs

  • Magma
    [(-n mod 3) + 2*Floor(n/3) : n in [0..100]]; // Wesley Ivan Hurt, Aug 20 2014
    
  • Magma
    I:=[0,2,1,2]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..100]]; // Vincenzo Librandi, Sep 27 2017
  • Maple
    A131380:=n->(-n mod 3) + 2*floor(n/3): seq(A131380(n), n=0..100); # Wesley Ivan Hurt, Aug 20 2014
  • Mathematica
    Table[Mod[-n, 3] + 2 Floor[n/3], {n, 0, 100}] (* Wesley Ivan Hurt, Aug 20 2014 *)
    CoefficientList[Series[x*(2 - x + x^2)/((x - 1)^2 (1 + x + x^2)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Aug 20 2014 *)
    LinearRecurrence[{1, 0, 1, -1}, {0, 2, 1, 2}, 200] (* Vincenzo Librandi, Sep 27 2017 *)

Formula

G.f.: x*(2-x+x^2)/((x-1)^2*(1+x+x^2)); a(n) = a(n-1)+a(n-3)-a(n-4); a(n) = (-n mod 3) + 2*floor(n/3) = A080425(n) + 2*A002264(n). - Wesley Ivan Hurt, Aug 20 2014
E.g.f.: ((2*z+1)/3)*exp(z)+((5/9)*sqrt(3)*sin(sqrt(3)*z/2)-(1/3)*cos(sqrt(3)*z/2))*exp(-z/2). - Robert Israel, Aug 21 2014
a(n) = (6*n+3-6*cos(2*(n+4)*Pi/3)-4*sqrt(3)*sin(2*(n+4)*Pi/3))/9. - Wesley Ivan Hurt, Sep 26 2017

A132798 Period 6: repeat [0, 2, 1, 0, -2, -1].

Original entry on oeis.org

0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1
Offset: 0

Views

Author

Paul Curtz, Nov 21 2007

Keywords

Crossrefs

Programs

Formula

G.f.: x*(2+x)/((x+1)*(x^2-x+1)) = (1/3)*(4*x+1)/(x^2-x+1)-(1/3)/(x+1). - R. J. Mathar, Nov 28 2007
a(n) + a(n+1) = A117373(n+4). - R. J. Mathar, Jul 22 2009
a(n) = (-n mod 3) * (-1)^floor(n/3) = A080425(n) * (-1)^A002264(n) = A080425(n) * A130151(n). - Wesley Ivan Hurt, Jun 20 2014
From Wesley Ivan Hurt, Jun 21 2016: (Start)
a(n) + a(n-3) = 0 for n>2.
a(n) = sin(n*Pi/3) * (3*sqrt(3) + 2*sin(2*n*Pi/3))/3. (End)

A173177 Numbers k such that 2k+3 is a prime of the form 3*A034936(m) + 4.

Original entry on oeis.org

2, 5, 8, 14, 17, 20, 29, 32, 35, 38, 47, 50, 53, 62, 68, 74, 77, 80, 89, 95, 98, 104, 110, 113, 119, 134, 137, 140, 152, 155, 164, 167, 173, 182, 185, 188, 197, 203, 209, 215, 218, 227, 230, 242, 248, 260, 269, 272, 284, 287, 299
Offset: 1

Views

Author

Eric Desbiaux, Feb 11 2010

Keywords

Comments

With Bachet-Bézout theorem implicating Gauss Lemma and the Fundamental Theorem of Arithmetic,
for k > 1, k = 2*a + 3*b (a and b integers)
first type
A001477 = (2*A080425) + (3*A008611)
A000040 = (2*A039701) + (3*A157966)
A024893 Numbers k such that 3*k + 2 is prime
A034936 Numbers k such that 3*k + 4 is prime
OR
second type
A001477 = (2*A028242) + (3*A059841)
A000040 = (2*A067076) + (3*1)
A067076 Numbers k such that 2*k + 3 is prime
k a b OR a b
-- - - - -
0 0 0 0 0
1 - - - -
2 1 0 1 0
3 0 1 0 1
4 2 0 2 0
5 1 1 1 1
6 0 2 3 0
7 2 1 2 1
8 1 2 4 0
9 0 3 3 1
10 2 2 5 0
11 1 3 4 1
12 0 4 6 0
13 2 3 5 1
14 1 4 7 0
15 0 5 6 1
...
2* 2 + 3 OR 3* 1 + 4 = 7;
2* 5 + 3 OR 3* 3 + 4 = 13;
2* 8 + 3 OR 3* 5 + 4 = 19;
2*14 + 3 OR 3* 9 + 4 = 31;
2*17 + 3 OR 3*11 + 4 = 37;
2*20 + 3 OR 3*13 + 4 = 43;
2*29 + 3 OR 3*19 + 4 = 61;
2*32 + 3 OR 3*21 + 4 = 67;
2*35 + 3 OR 3*23 + 4 = 73.
A034936 Numbers k such that 3k+4 is prime.
A002476 Primes of the form 6k+1.
A024899 Nonnegative integers k such that 6k+1 is prime.
2, 5, 8, 14, 17, 20, ... = (3*(4*A024899 - A034936) - 5)/2.

Crossrefs

Programs

  • Mathematica
    Select[Range[300],PrimeQ[2#+3]&&Divisible[2#-1,3]&] (* Harvey P. Dale, Aug 25 2016 *)

Extensions

More terms from Harvey P. Dale, Aug 25 2016

A180964 a(0)=1; for n>0, a(n) = 1 + 3*A117571(n-1).

Original entry on oeis.org

1, 4, 4, 10, 13, 13, 19, 22, 22, 28, 31, 31, 37, 40, 40, 46, 49, 49, 55, 58, 58, 64, 67, 67, 73, 76, 76, 82, 85, 85, 91, 94, 94, 100, 103, 103, 109, 112, 112, 118, 121, 121, 127, 130, 130, 136, 139, 139, 145, 148, 148, 154, 157, 157, 163, 166, 166, 172
Offset: 0

Views

Author

Bruno Berselli, Sep 28 2010 - Oct 01 2010

Keywords

Crossrefs

Cf. A061347.

Programs

  • Magma
    I:=[1, 4, 4, 10]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..60]]; // Vincenzo Librandi, Mar 26 2013
    
  • Maple
    m:=60; S:=series( (1+3*x+5*x^3)/((1-x)^2*(1+x+x^2)), x, m+1):
    seq(coeff(S, x, j), j=1..m); # G. C. Greubel, Apr 06 2021
  • Mathematica
    CoefficientList[Series[(1 +3x +5x^3)/((1-x)^2(1+x+x^2)), {x, 0, 60}], x] (* Vincenzo Librandi, Mar 26 2013 *)
    LinearRecurrence[{1,0,1,-1},{1,4,4,10},60] (* Harvey P. Dale, Aug 05 2020 *)
  • Sage
    [3*n +chebyshev_U(n, -1/2) +2*chebyshev_U(n-1, -1/2) for n in (0..60)] # G. C. Greubel, Apr 06 2021

Formula

G.f.: (1 +3*x +5*x^3)/((1-x)^2*(1+x+x^2)).
a(n) = a(n-1) +a(n-3) -a(n-4) for n>3.
a(n) = (n-1)*(n mod 3) +(n+1)*(n+1 mod 3) +n*(n+2 mod 3).
a(n) = 3*n +sqrt(3)*cos((4*n-3)*Pi/6) -sin((4*n-3)*Pi/6).
a(n) - a(n-1) = 3*A080425(n+1) for n>0.
From G. C. Greubel, Apr 06 2021: (Start)
a(n) = 3*n - 2*cos(2*Pi*(n+1)/3) = 3*n + A061347(n+1).
a(n) = 3*n + ChebyshevU(n, -1/2) + 2*ChebyshevU(n-1, -1/2). (End)

A191272 Expansion of x*(4+5*x)/( (1-4*x)*(1 + x + x^2) ).

Original entry on oeis.org

0, 4, 17, 63, 256, 1025, 4095, 16384, 65537, 262143, 1048576, 4194305, 16777215, 67108864, 268435457, 1073741823, 4294967296, 17179869185, 68719476735, 274877906944, 1099511627777, 4398046511103, 17592186044416, 70368744177665
Offset: 0

Views

Author

Paul Curtz, May 29 2011

Keywords

Programs

  • Magma
    m:=24; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(4+5*x)/((1-4*x)*(1+x+x^2))));  // Bruno Berselli, Jul 04 2011
    
  • Mathematica
    LinearRecurrence[{3,3,4},{0,4,17},30] (* or *) CoefficientList[ Series[ x (4+5x)/((1-4x)(1+x+x^2)),{x,0,30}],x] (* Harvey P. Dale, Jun 19 2011 *)
  • Maxima
    makelist(coeff(taylor(x*(4+5*x)/((1-4*x)*(1+x+x^2)), x, 0, n), x, n), n, 0, 23);  /* Bruno Berselli, Jun 06 2011 */
  • PARI
    a(n)=4^n-[1,0,-1][n%3+1] \\ Charles R Greathouse IV, Jun 06 2011
    

Formula

G.f.: x*(4+5*x)/(1 - 3*x - 3*x^2 - 4*x^3).
a(n) = 4^n-A057078(n) = 4^n - (n-th element of periodic length 3 repeat 1, 0, -1)
a(n) = A024495(2*n) + A024495(1+2*n).
a(n+1) = 4*a(n) + (n-th element of periodic length 3 repeat 4, 1, -5).
a(n) = A052539(n) - A080425(n+1). - Bruno Berselli, Jun 06 2011
a(0)=0, a(1)=4, a(2)=17, a(n) = 3*a(n-1) + 3*a(n-2) + 4*a(n-3). - Harvey P. Dale, Jun 19 2011
a(n) = 4*a(n-1) + a(n-3) - 4*(n-4) (n>3). - Bruno Berselli, Jul 04 2011

A271390 a(n) = (2*n + 1)^(2*floor((n-1)/2) + 1).

Original entry on oeis.org

1, 3, 5, 343, 729, 161051, 371293, 170859375, 410338673, 322687697779, 794280046581, 952809757913927, 2384185791015625, 4052555153018976267, 10260628712958602189, 23465261991844685929951, 59938945498865420543457, 177482997121587371826171875, 456487940826035155404146917
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 06 2016

Keywords

Comments

All members are odd, therefore:
........................
| k | a(n) mod k |
|.......|..............|
| n+1 | A001477(n) |
| 2*n+2 | A005408(n) |
| 2 | A000012(n) |
| 3 | A080425(n+2)|
| 4 | A010684(n) |
| 6 | A130793(n) |
........................
Final digit of (2*n + 1)^(2*floor((n-1)/2) + 1) gives periodic sequence -> period 20: repeat [1,3,5,3,9,1,3,5,3,9,1,7,5,7,9,1,7,5,7,9], defined by the recurrence relation b(n) = b(n-2) - b(n-4) + b(n+5) + b(n+6) - b(n-7) - b(n-8) + b(n-9) - b(n-11) + b(n-13).

Examples

			a(0) =  1;
a(1) =  3^1 = 3;
a(2) =  5^1 = 5;
a(3) =  7^3 = 343;
a(4) =  9^3 = 729;
a(5) = 11^5 = 161051;
a(6) = 13^5 = 371293;
a(7) = 15^7 = 170859375;
a(8) = 17^7 = 410338673;
...
a(10000) = 1.644...*10^43006;
...
a(100000) = 8.235...*10^530097, etc.
This sequence can be represented as a binary tree:
                                    1
                 ................../ \..................
                3^1                                   5^1
     7^3......../ \......9^3                11^5....../ \.......13^5
     / \                 / \                 / \                 / \
    /   \               /   \               /   \               /   \
   /     \             /     \             /     \             /     \
15^7    17^7        19^9    21^9        23^11   25^11       27^13   29^13
		

Crossrefs

Programs

  • Maple
    A271390:=n->(2*n + 1)^(n - 1/2 - (-1)^n/2): seq(A271390(n), n=0..30); # Wesley Ivan Hurt, Apr 10 2016
  • Mathematica
    Table[(2 n + 1)^(2 Floor[(n - 1)/2] + 1), {n, 0, 18}]
    Table[(2 n + 1)^(n - 1 + (1 + (-1)^(n - 1))/2), {n, 0, 18}]
  • PARI
    a(n) = (2*n + 1)^(2*((n-1)\2) + 1); \\ Altug Alkan, Apr 06 2016
    
  • Python
    for n in range(0,10**3):print((int)((2*n+1)**(2*floor((n-1)/2)+1)))
    # Soumil Mandal, Apr 10 2016

Formula

a(n) = (2*n + 1)^(n - 1 + (1 + (-1)^(n-1))/2).
a(n) = A005408(n)^A109613(n-1).
a(n) = (2*n + 1)^(n - 1/2 - (-1)^n/2). - Wesley Ivan Hurt, Apr 10 2016

A174012 a(n) = 3 * A064680(n).

Original entry on oeis.org

0, 6, 3, 18, 6, 30, 9, 42, 12, 54, 15, 66, 18, 78, 21, 90, 24, 102, 27, 114, 30, 126, 33, 138, 36, 150, 39, 162, 42, 174, 45, 186, 48, 198, 51, 210, 54, 222, 57, 234, 60, 246, 63, 258, 66, 270, 69, 282, 72, 294, 75, 306, 78, 318, 81, 330, 84, 342, 87, 354, 90, 366, 93, 378, 96
Offset: 0

Views

Author

Paul Curtz, Mar 05 2010

Keywords

Crossrefs

Formula

a(n) = A064680(3*n), similar to A165988.
a(n) mod 9 = 3*A080425(n) (period length 3).
a(2n+1) = A017593(n).
a(2n) = A008585(n).

Extensions

a(0) = 0 prepended by Georg Fischer, Jul 01 2020
Previous Showing 11-19 of 19 results.