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.

Showing 1-6 of 6 results.

A135318 The Kentucky-2 sequence: a(n) = a(n-2) + 2*a(n-4), with a[0..3] = [1, 1, 1, 2].

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 8, 11, 16, 21, 32, 43, 64, 85, 128, 171, 256, 341, 512, 683, 1024, 1365, 2048, 2731, 4096, 5461, 8192, 10923, 16384, 21845, 32768, 43691, 65536, 87381, 131072, 174763, 262144, 349525, 524288, 699051, 1048576, 1398101, 2097152, 2796203
Offset: 0

Views

Author

Paul Curtz, Feb 16 2008

Keywords

Comments

Shifted Jacobsthal recurrence.
From L. Edson Jeffery, Apr 21 2011: (Start)
Let U be the unit-primitive matrix (see [Jeffery])
U=U_(6,2)=
(0 0 1)
(0 2 0)
(2 0 1),
let i in {0,1}, m>=0 an integer and n=2*m+i. Then a(n)=a(2*m+i)=Sum_{j=0..2} (U^m)_(i,j). (End)
a(n) is also the pebbling number of the cycle graph C_{n+1} for n > 1. - Eric W. Weisstein, Jan 07 2021
From Greg Dresden and Ziyi Xie, Aug 25 2023: (Start)
a(n) is the number of ways to tile a zig-zag strip of n cells using squares (of 1 cell) and triangles (of 3 cells). Here is the zig-zag strip corresponding to n=11, with 11 cells:
_ _
_| |_| |_
| |_| |_| |_
|_| |_| |_| |
| |_| |_| |_|
|_| |_| |_|,
and here are the two types of triangles (where one is just a reflection of the other):
_ _
| |_ _| |
| | | |
| _| and |_ |
|_| |_|.
As an example, here is one of the a(11) = 32 ways to tile the zig-zag strip of 11 cells:
_ _
_| |_| |_
| |_| | |_
| |_ | |
| _| |_| _|
|_| |_| |_|. (End)

Examples

			Let i=0 and m=3. Then U^3 = (2,0,3;0,8,0;6,0,5), and the first-row sum (corresponding to i=0) is 2 + 0 + 3 = 5. Hence a(n) = a(2*m+i) = a(2*3+0) = a(6) = 2 + 3 = 5.
		

Crossrefs

Programs

  • Magma
    [(2^Floor(n/2)*(5-(-1)^n)+(-1)^Floor(n/2)*(1+(-1)^n))/6: n in [0..50]]; // Vincenzo Librandi, Aug 10 2011
  • Maple
    a:= n-> (<<0|1>, <2|1>>^(iquo(n, 2, 'm')). <<1, 1+m>>)[1,1]:
    seq(a(n), n=0..50);  # Alois P. Heinz, May 30 2022
  • Mathematica
    LinearRecurrence[{0,1,0,2},{1,1,1,2},40] (* Harvey P. Dale, Oct 14 2015 *)

Formula

From R. J. Mathar, Feb 19 2008: (Start)
O.g.f.: (1/(1+x^2)+(-2-3*x)/(2*x^2-1))/3.
a(2n) = A001045(n+1).
a(2n+1) = A000079(n). (End)
From L. Edson Jeffery, Apr 21 2011: (Start)
G.f.: (1+x+x^3)/((1+x^2)*(1-2*x^2)).
a(n) = (((-i)^(n+1)-i^(n+1))*2*i*sqrt(2)+3*(1+(-1)^(n+1))*2^((n+2)/2)+(1-(-1)^(n+1))*2^((n+5)/2))/(12*sqrt(2)), where i=sqrt(-1). (End)
a(n) = (2^floor(n/2)*(5-(-1)^n)+(-1)^floor(n/2)*(1+(-1)^n))/6 = (A016116(n)*A010711(n)+2*A056594(n))/6. - Bruno Berselli, Apr 21 2011
a(2n) = 2*a(2n-1) - a(2n-2); a(2n+1) = a(2n) + a(2n-2). - Richard R. Forberg, Aug 19 2013
a(n) = A112387(n + (-1)^n). - Alois P. Heinz, Sep 28 2023
E.g.f.: (2*cos(x) + 4*cosh(sqrt(2)*x) + 3*sqrt(2)*sinh(sqrt(2)*x))/6. - Stefano Spezia, Nov 09 2024
a(2*n) + a(2*n+1) = A048573(n) for n >= 0. - Paul Curtz, May 18 2025

Extensions

More terms from R. J. Mathar, Feb 19 2008

A226294 Period 2: repeat [6, 4].

Original entry on oeis.org

6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6
Offset: 0

Views

Author

Richard R. Forberg, Jun 02 2013

Keywords

Comments

A two number repeating sequence for constructing a summation sequence from negative to positive infinity containing all primes except 2 and 5.
Essentially the same as A168428, A101432 and A010711.
NOTE: This sequence has a shift in the starting value at index 0 relative to A010711. It is used here for the purpose stated with positive and negative indices making the formula in A010711 non-applicable.
This infinitely repeating sequence, a(n), of two numbers (6,4) starting with a(0) = 6, allows for the creation of an infinite summation sequence, s(n), extending from negative to positive infinity, using the formula below in parallel with how the same is done in A226276 using a different repeating sequence. Letting "s(n+)" be the set positive s(n) values, and "s(n-)" be the absolute value of the set of negative s(n) values, the following applies:
s(n+) includes all numbers with last digits of 1 and 7.
s(n-) includes all numbers with last digits of 3 and 9.
Therefore, s(n) includes all primes (except 2 and 5) without duplication.
This is one of only two such repeating patterns that accomplish this goal relative to the primes, while excluding all numbers with a last digit of 5. The other is (8,4,4,4) but with a different split between which primes occur as positive vs. negative numbers. See A226276 for details. Both patterns have the same density of primes relative to all s(n), and both, presumably, have the same average density of primes as positive vs. negative values of s(n).

Examples

			s(1) = 7, s(2) = 11, s(3) = 17, s(4) = 21, s(5) = 27, s(6) = 31;
s(-1) = -3, s(-2) = -9, s(-3) = -13, s(-4) = -19, s(-5) = -23, s(-6) = -29;
		

Crossrefs

Programs

Formula

a(n) = 5+(-1)^n = 2*A176059(n).
To generate the summation sequence s(n), start with s(0) = 1, and a(0) = 6.
For positive values of s(n): s(n+1) = s(n) + a(n)
For negative values of s(n): s(n-1) = s(n) - a(n-1). n is negative here.
See example values for s(n) below, for both positive and negative indices.
G.f.: ( 6+4*x ) / ( (1-x)*(1+x) ). - R. J. Mathar, Jun 12 2013
a(n) = a(n-2) for n>1. - Wesley Ivan Hurt, Jul 18 2016

A176216 Decimal expansion of (6+sqrt(42))/3.

Original entry on oeis.org

4, 1, 6, 0, 2, 4, 6, 8, 9, 9, 4, 6, 9, 2, 8, 6, 7, 4, 3, 6, 5, 5, 3, 2, 2, 4, 7, 8, 6, 9, 5, 9, 9, 8, 8, 8, 5, 9, 0, 1, 7, 3, 4, 7, 6, 9, 0, 1, 9, 4, 4, 8, 8, 4, 9, 9, 0, 3, 7, 8, 4, 7, 9, 9, 2, 6, 9, 8, 7, 2, 4, 5, 9, 2, 8, 1, 3, 4, 8, 1, 2, 3, 8, 0, 0, 1, 2, 0, 3, 0, 2, 2, 0, 1, 8, 7, 0, 0, 7, 8, 5, 5, 8, 4, 8
Offset: 1

Views

Author

Klaus Brockhaus, Apr 12 2010

Keywords

Comments

Continued fraction expansion of (6+sqrt(42))/3 is A010711.

Examples

			(6+sqrt(42))/3 = 4.16024689946928674365...
		

Crossrefs

Cf. A010496 (decimal expansion of sqrt(42)), A010711 (repeat 4, 6).

A176396 Decimal expansion of (6+sqrt(42))/2.

Original entry on oeis.org

6, 2, 4, 0, 3, 7, 0, 3, 4, 9, 2, 0, 3, 9, 3, 0, 1, 1, 5, 4, 8, 2, 9, 8, 3, 7, 1, 8, 0, 4, 3, 9, 9, 8, 3, 2, 8, 8, 5, 2, 6, 0, 2, 1, 5, 3, 5, 2, 9, 1, 7, 3, 2, 7, 4, 8, 5, 5, 6, 7, 7, 1, 9, 8, 9, 0, 4, 8, 0, 8, 6, 8, 8, 9, 2, 2, 0, 2, 2, 1, 8, 5, 7, 0, 0, 1, 8, 0, 4, 5, 3, 3, 0, 2, 8, 0, 5, 1, 1, 7, 8, 3, 7, 7, 2
Offset: 1

Views

Author

Klaus Brockhaus, Apr 16 2010

Keywords

Comments

Continued fraction expansion of (6+sqrt(42))/2 is A010711 preceded by 6.

Examples

			(6+sqrt(42))/2 = 6.24037034920393011548...
		

Crossrefs

Cf. A010496 (decimal expansion of sqrt(42)), A010711 (repeat 4, 6).

Programs

  • Mathematica
    RealDigits[(6+Sqrt[42])/2,10,120][[1]] (* Harvey P. Dale, May 25 2012 *)

A187715 a(n) = 5*n - (9 + (-1)^n)/2.

Original entry on oeis.org

1, 5, 11, 15, 21, 25, 31, 35, 41, 45, 51, 55, 61, 65, 71, 75, 81, 85, 91, 95, 101, 105, 111, 115, 121, 125, 131, 135, 141, 145, 151, 155, 161, 165, 171, 175, 181, 185, 191, 195, 201, 205, 211, 215, 221, 225
Offset: 1

Views

Author

Vincenzo Librandi, Mar 13 2011

Keywords

Comments

Numbers congruent to {1,5} mod 10. - Bruno Berselli, Mar 31 2012

Crossrefs

Cf. A001622, A010711 (first differences), A017281, A017329.

Programs

  • GAP
    Filtered([1..250],n-> n mod 10 =1 or n mod 10 = 5); # Muniru A Asiru, Nov 25 2018
    
  • Magma
    [5*n -(9+(-1)^n)/2: n in [1..60]];
    
  • Maple
    [5*n-(9+(-1)^n)/2$n=1..50]; # Muniru A Asiru, Nov 25 2018
  • Mathematica
    nxt[{n_,a_}]:={n+1,If[EvenQ[n+1],a+4,a+6]}; Transpose[NestList[nxt,{1,1},50]][[2]] (* Harvey P. Dale, Feb 16 2013 *)
    Table[BitOr[5*n, 1], {n, 0, 50}] (* Jon Maiga, Nov 24 2018 *)
  • PARI
    vector(50, n, (10*n -9-(-1)^n)/2) \\ G. C. Greubel, Dec 04 2018
    
  • Python
    for n in range(1,60): print(int(5*n - (9 + (-1)**n)/2), end=', ') # Stefano Spezia, Nov 30 2018
    
  • Sage
    [(10*n -9-(-1)^n)/2 for n in (1..50)] # G. C. Greubel, Dec 04 2018

Formula

a(n) = a(n-1) + 4 if n is even, a(n) = a(n-1) + 6 if n is odd.
a(n) = 2*a(n-1) - a(n-2) - 2*(-1)^n.
From R. J. Mathar, Mar 15 2011: (Start)
G.f.: x*(1 + 4*x + 5*x^2)/( (1+x)*(1-x)^2 ).
Bisections: a(2*n+1) = A017281(n), a(2*n) = A017329(n-1). (End)
a(n) = 5*(n-1) bitwise-OR 1. - Jon Maiga, Nov 24 2018
E.g.f.: ((10*x-9)*exp(x) - exp(-x) + 10)/2. - G. C. Greubel, Dec 04 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(5+2*sqrt(5))*Pi/20 + 3*log(phi)/(4*sqrt(5)) + log(5)/8, where phi is the golden ratio (A001622). - Amiram Eldar, Apr 15 2023

Extensions

Definition rewritten by R. J. Mathar, Mar 15 2011

A173809 a(2n+1) = 1+A131941(2n+1). a(2n) = A131941(2n).

Original entry on oeis.org

2, 3, 9, 16, 30, 47, 73, 104, 146, 195, 257, 328, 414, 511, 625, 752, 898, 1059, 1241, 1440, 1662, 1903, 2169, 2456, 2770, 3107, 3473, 3864, 4286, 4735, 5217, 5728, 6274, 6851, 7465, 8112, 8798, 9519, 10281, 11080
Offset: 1

Views

Author

Paul Curtz, Feb 25 2010

Keywords

Comments

An array T(n,k) of a(n) and its successive differences is T(1,k) = a(k), T(n,k) = T(n-1,k+1)-T(n-1,k) and starts:
2, 3, 9, 16, 30, 47, 73, 104, 146, 195, 257, 328,...
1, 6, 7, 14, 17, 26, 31, 42, 49, 62, 71, 86, 97, 114,... interleaved A056220 and A051890
5, 1, 7, 3, 9, 5, 11, 7, 13, 9, 15, 11, 17, 13, 19, 15.... A158552
-4, 6, -4, 6, -4, 6, -4, 6, -4, 6, -4, 6, -4, 6, -4,... A010711
10, -10, 10, -10, 10, -10, 10, -10, 10, -10, 10,..

Programs

  • Mathematica
    LinearRecurrence[{3,-2,-2,3,-1},{2,3,9,16,30},60] (* Harvey P. Dale, Aug 10 2021 *)

Formula

G.f.: -x*(-2+3*x+x^3-4*x^2) / ( (1+x)*(x-1)^4 ). - R. J. Mathar, Jan 13 2011
a(2n) = A172482(n-1).
a(n)+a(n+1) = A116731(n+2). - R. J. Mathar, Jan 13 2011
Showing 1-6 of 6 results.