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-10 of 11 results. Next

A143098 First differences of A143097.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Jul 24 2008

Keywords

Comments

Binomial transform gives A143100.
1 followed by {2, -1, 2} repeated. - Amiram Eldar, Jun 02 2025

Crossrefs

Programs

  • Mathematica
    Join[{1}, Flatten[Table[{2, -1, 2}, {33}]]] (* Amiram Eldar, Jun 02 2025 *)

Formula

G.f.: x(1+2x-x^2+x^3)/((1-x)(1+x+x^2)). - R. J. Mathar, Sep 06 2008

A143099 A007318 * A143097.

Original entry on oeis.org

1, 3, 9, 22, 50, 113, 256, 576, 1281, 2818, 6146, 13313, 28672, 61440, 131073, 278530, 589826, 1245185, 2621440, 5505024, 11534337, 24117250, 50331650, 104857601, 218103808, 452984832, 939524097, 1946157058, 4026531842, 8321499137, 17179869184, 35433480192
Offset: 1

Views

Author

Gary W. Adamson, Jul 24 2008

Keywords

Comments

A143100 = (1, 3, 4, 6, 13, 30, 64, 129, ...).

Examples

			a(4) = 22 = (1, 3, 3, 1) dot (1, 2, 4, 3) = (1 + 6 + 12 + 3).
a(4) = 22 = 2*a(3) + A143099(3) = 2*9 + 4, where 4 = A143100(3).
		

Crossrefs

Programs

  • Maple
    A143097 := proc(n) if(n<=1)then return n: elif(n mod 3 <= 1)then return n+1-2*(n mod 3): else return n: fi: end: A143099 := proc(n) return add(binomial(n-1,k-1)*A143097(k),k=1..n): end: seq(A143099(n),n=1..32); # Nathaniel Johnston, Apr 30 2011

Formula

Binomial transform of A143097: (1, 2, 4, 3, 5, 7, 6, 8, 10, 9, 11, ...). a(n) = 2*a(n-1) + A143100(n-1).
G.f.: x*(5*x^4-7*x^3+5*x^2-3*x+1)/((1-x)*(x^2-x+1)*(1-2*x)^2). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 14 2009; [corrected by R. J. Mathar, Sep 16 2009]

A143101 Partial sums of A143097.

Original entry on oeis.org

1, 3, 7, 10, 15, 22, 28, 36, 46, 55, 66, 79, 91, 105, 121, 136, 153, 172, 190, 210, 232, 253, 276, 301, 325, 351, 379, 406, 435, 466, 496, 528, 562, 595, 630, 667, 703, 741, 781, 820, 861, 904, 946, 990, 1036, 1081, 1128, 1177, 1225, 1275, 1327, 1378, 1431
Offset: 1

Views

Author

Gary W. Adamson, Jul 24 2008

Keywords

Examples

			a(3) = 7 = T(3) + 1 since 3 == 0 mod 3 and T(3) = 6.
a(4) = 10 = T(4) since 4 == 1 mod 3.
		

Crossrefs

Programs

  • Maple
    A143097 := proc(n) if(n<=1)then return n: elif(n mod 3 <= 1)then return n+1-2*(n mod 3): else return n: fi: end: A143101 := proc(n) option remember: if(n=0)then return 0:else return procname(n-1)+A143097(n):fi: end:seq(A143101(n),n=1..60); # Nathaniel Johnston, Apr 30 2011
  • Mathematica
    With[{nn=70},Accumulate[Join[{1},Riffle[Rest[Select[Range[nn], !Divisible[ #,3]&]], Range[3,nn,3],3]]]] (* Harvey P. Dale, May 06 2012 *)
  • PARI
    a(n)=n*(n+1)/2+if(n%3==0,1,0) \\ Luc Rousseau, Jun 18 2017

Formula

G.f.: x(1+x+2x^2-2x^3+x^4)/((1-x)^3(1+x+x^2)). [R. J. Mathar, Sep 06 2008]
a(n) = n*(n+1)/2 + (3|n) = A000217(n) + A079978(n). - Luc Rousseau, Jun 18 2017

Extensions

a(18) corrected by Nathaniel Johnston, Apr 30 2011

A143102 Triangle read by rows, A000012 * (A143097 * 0^(n-k)) * A000012, 1<=k<=n.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 3, 7, 9, 10, 5, 8, 12, 14, 15, 7, 12, 15, 29, 21, 22, 6, 18, 18, 21, 25, 27, 28, 8, 14, 21, 26, 29, 33, 35, 36, 10, 18, 24, 31, 36, 39, 43, 45, 46, 9, 19, 27, 33, 40, 45, 48, 52, 54, 55, 11, 20, 30, 38, 44, 51, 56, 59, 63, 65, 66, 13, 24, 33, 43, 51, 57, 64, 69, 72
Offset: 1

Views

Author

Gary W. Adamson, Jul 24 2008

Keywords

Comments

Left border = A143097: (1, 2, 4, 3, 5, 7, 6, 8,...); right border = A143101, partial sums of A143097: (1, 3, 7, 10, 15, 22, 28,...).
Row sums = A143103: (1, 5, 17, 29, 54, 96,...).

Examples

			First few rows of the triangle are:
1;
2, 3;
4, 6, 7;
3, 7, 9, 10;
5, 8, 12, 14, 15;
7, 12, 15, 19, 21, 22;
6, 13, 18, 21, 25, 27, 28;
...
		

Crossrefs

Formula

Triangle read by rows, A000012 * (A143097 * 0(n-k)) * A000012, 1<=k<=n; where = A000012 = an infinite lower triangular matrix with all 1's and A143097 * 0^(n-k) = an infinite lower triangular matrix with A143097 (1, 2, 4, 3, 5, 7, 6,...) in the main diagonal and the rest zeros.

A064429 a(n) = floor(n / 3) * 3 + sign(n mod 3) * (3 - n mod 3).

Original entry on oeis.org

0, 2, 1, 3, 5, 4, 6, 8, 7, 9, 11, 10, 12, 14, 13, 15, 17, 16, 18, 20, 19, 21, 23, 22, 24, 26, 25, 27, 29, 28, 30, 32, 31, 33, 35, 34, 36, 38, 37, 39, 41, 40, 42, 44, 43, 45, 47, 46, 48, 50, 49, 51, 53, 52, 54, 56, 55, 57, 59, 58, 60, 62, 61, 63, 65, 64, 66, 68, 67, 69, 71, 70
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 15 2001

Keywords

Comments

a(a(n)) = n (a self-inverse permutation).
Take natural numbers, exchange trisections starting with 1 and 2.
Lodumo_3 of A080425. - Philippe Deléham, Apr 26 2009
From Franck Maminirina Ramaharo, Jul 27 2018: (Start)
The sequence is A008585 interleaved with A016789 and A016777.
a(n) is also obtained as follows: write n in base 3; if the rightmost digit is '1', then replace it with '2' and vice versa; convert back to decimal. For example a(14) = a('11'2') = '11'1' = 13 and a(10) = a('10'1') = '10'2' = 11. (End)
A permutation of the nonnegative integers partitioned into triples [3*k-3, 3*k-1, 3*k-2] for k > 0. - Guenther Schrack, Feb 05 2020

Examples

			From _Franck Maminirina Ramaharo_, Jul 27 2018: (Start)
Interleave 3 sequences:
A008585: 0.....3.....6.....9.......12.......15........
A016789: ..2.....5.....8.....11.......14.......17.....
A016777: ....1.....4.....7......10.......13.......16..
(End)
		

Crossrefs

Programs

  • GAP
    a:=[0,2,1,3];; for n in [5..100] do a[n]:=a[n-1]+a[n-3]-a[n-4]; od; a; # Muniru A Asiru, Jul 27 2018
    
  • Magma
    [2*n - 3 - 3*((n-2) div 3): n in [0..80]]; // Vincenzo Librandi, Aug 05 2018
  • Maple
    A064429:=n->2*n-3-3*floor((n-2)/3): seq(A064429(n), n=0..100); # Wesley Ivan Hurt, Nov 30 2013
  • Mathematica
    Table[2 n - 3 - 3 Floor[(n - 2)/3], {n, 0, 100}] (* Wesley Ivan Hurt, Nov 30 2013 *)
    {#+1,#-1,#}[[Mod[#,3,1]]]&/@Range[0, 100] (* Federico Provvedi, May 11 2021 *)
    LinearRecurrence[{1,0,1,-1},{0,2,1,3},80] (* or *) {#[[1]],#[[3]],#[[2]]}&/@Partition[Range[0,80],3]//Flatten (* Harvey P. Dale, Mar 28 2025 *)
  • PARI
    a(n) = 2*n-3-3*((n-2)\3); \\ Altug Alkan, Oct 06 2017
    

Formula

a(n) = A080782(n+1) - 1.
a(n) = n - 2*sin(4*Pi*n/3)/sqrt(3). - Jaume Oliver Lafont, Dec 05 2008
a(n) = A001477(n) + A102283(n). - Jaume Oliver Lafont, Dec 05 2008
a(n) = lod_3(A080425(n)). - Philippe Deléham, Apr 26 2009
G.f.: x*(2 - x + 2*x^2)/((1 + x + x^2)*(1 - x)^2 ). - R. J. Mathar, Feb 20 2011
a(n) = 2*n - 3 - 3*floor((n-2)/3). - Wesley Ivan Hurt, Nov 30 2013
a(n) = a(n-1) + a(n-3) - a(n-4) for n > 3. - Wesley Ivan Hurt, Oct 06 2017
E.g.f.: x*exp(x) + (2*sin((sqrt(3)*x)/2))/(exp(x/2)*sqrt(3)). - Franck Maminirina Ramaharo, Jul 27 2018
From Guenther Schrack, Feb 05 2020: (Start)
a(n) = a(n-3) + 3 with a(0)=0, a(1)=2, a(2)=1 for n > 2;
a(n) = n + (w^(2*n) - w^n)*(1 + 2*w)/3 where w = (-1 + sqrt(-3))/2. (End)
Sum_{n>=1} (-1)^n/a(n) = log(2)/3. - Amiram Eldar, Jan 31 2023

A115302 Permutation of natural numbers generated by 3-rowed array shown below.

Original entry on oeis.org

1, 4, 2, 7, 5, 3, 10, 8, 6, 13, 11, 9, 16, 14, 12, 19, 17, 15, 22, 20, 18, 25, 23, 21, 28, 26, 24, 31, 29, 27, 34, 32, 30, 37, 35, 33, 40, 38, 36, 43, 41, 39, 46, 44, 42, 49, 47, 45, 52, 50, 48, 55, 53, 51, 58, 56, 54, 61, 59, 57, 64, 62, 60
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 05 2006

Keywords

Comments

1 4 7 10 13 16 19 22 25...a(n)=3n+1 => A016777
2 5 8 11 14 17 20 23 26...a(n)=3n+2 => A016789
3 6 9 12 15 18 21 24 27...a(n)=3n => A008585
Reversing the direction of the diagonals gives A143097. - Jeremy Gardiner, Oct 14 2012.

References

  • M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988
  • Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta,UTET, CittaStudiEdizioni, Milano 1997

Crossrefs

Formula

For n > 1, a(n+5) = a(n) + 6, iff a(n+5)=1.

A143100 A007318 * A143098.

Original entry on oeis.org

1, 3, 4, 6, 13, 30, 64, 129, 256, 510, 1021, 2046, 4096, 8193, 16384, 32766, 65533, 131070, 262144, 524289, 1048576, 2097150, 4194301, 8388606, 16777216, 33554433, 67108864, 134217726, 268435453, 536870910, 1073741824, 2147483649, 4294967296, 8589934590
Offset: 1

Views

Author

Gary W. Adamson, Jul 24 2008

Keywords

Examples

			a(4) = 6 = (1, 3, 3, 1) dot (1, 2, -1, 2) = (1 + 6 - 3 + 2).
		

Crossrefs

Programs

  • Maple
    A143098 := proc(n) if(n=1)then return 1: elif(n mod 3 = 0)then return -1: else return 2: fi: end: A143100 := proc(n) return add(binomial(n-1,k-1)*A143098(k),k=1..n): end: seq(A143100(n),n=1..34); # Nathaniel Johnston, Apr 30 2011

Formula

Binomial transform of A143098: (1, 2, -1, 2, 2, -1, 2, 2, -1, 2, 2, ...).
From R. J. Mathar, Jul 31 2008: (Start)
G.f.: (3x^3 - 2x^2 - x + 1)*x/((x^2-x+1)*(2x-1)*(x-1)).
a(n) = -1 + 2^(n-1) + A057079(n-1). (End)

A281409 Lexicographically first sequence of distinct terms, beginning with a(1)=5, with the property that each triple of consecutive terms contains a term that divides the sum of the other two terms.

Original entry on oeis.org

5, 1, 2, 3, 4, 7, 9, 8, 10, 6, 14, 16, 12, 20, 28, 24, 13, 11, 15, 18, 21, 33, 27, 30, 19, 41, 22, 25, 47, 36, 58, 50, 42, 23, 61, 31, 32, 63, 65, 64, 43, 85, 44, 91, 45, 17, 40, 57, 74, 97, 51, 37, 60, 83, 106, 129, 152, 175, 109, 66, 35, 39, 82, 113, 133, 93
Offset: 1

Views

Author

Rémy Sigrist, Jan 21 2017

Keywords

Comments

The initial term a(1)=5 seems to be the least one that leads to a sequence that is not ultimately linear.
The variant with:
- a(1)=1 matches A000027,
- a(1)=2 matches A181440,
- a(1)=3 starts with 3, 1, 2, and then matches A000027,
- a(1)=4 starts with 4, 1, 2, and then matches A143097,
- a(1)=6 starts with 6, 1, 2, 3, 4, 5, and then matches A000027,
- a(1)=9 starts with 9, 1, 2, 3, 4, 5, 6, 7, 8, 13, 11, 12, 10, and then matches A143097.
Conjecturally, all other variants are not ultimately linear.

Examples

			The first terms, alongside the indexes of the terms that divide the sum of the other two terms within the n-th triple of consecutive terms, are:
   n  a(n)   Indexes
  --  ----   -------
   1    5    2, 3
   2    1    1, 2, 3
   3    2    2
   4    3    3
   5    4    1
   6    7    3
   7    9    1
   8    8    1, 3
   9   10    1, 2
  10    6    1
  11   14    1
  12   16    1, 2
  13   12    1, 2
  14   20    3
  15   28    3
  16   24    1
  17   13    1
  18   11    1
  19   15    2
  20   18    1
  21   21    3
  22   33    3
  23   27    3
  24   30    1
  25   19    2
		

Crossrefs

A236348 Expansion of (1 - x + 2*x^2 + x^3) / ((1 - x) * (1 - x^3)) in powers of x.

Original entry on oeis.org

1, 0, 2, 4, 3, 5, 7, 6, 8, 10, 9, 11, 13, 12, 14, 16, 15, 17, 19, 18, 20, 22, 21, 23, 25, 24, 26, 28, 27, 29, 31, 30, 32, 34, 33, 35, 37, 36, 38, 40, 39, 41, 43, 42, 44, 46, 45, 47, 49, 48, 50, 52, 51, 53, 55, 54, 56, 58, 57, 59, 61, 60, 62, 64, 63, 65, 67
Offset: 0

Views

Author

Michael Somos, Jan 23 2014

Keywords

Comments

An order 2 permutation of nonnegative integers.

Examples

			G.f. = 1 + 2*x^2 + 4*x^3 + 3*x^4 + 5*x^5 + 7*x^6 + 6*x^7 + 8*x^8 + 10*x^9 + ...
		

Crossrefs

Cf. A143097.

Programs

  • Magma
    [n-1+((n-1) mod 3) : n in [0..100]]; // Wesley Ivan Hurt, Aug 21 2014
    
  • Magma
    I:=[1,0,2,4]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..80]]; // Vincenzo Librandi, Sep 28 2017
  • Mathematica
    Table[n - 1 + Mod[n - 1, 3], {n, 0, 100}] (* Wesley Ivan Hurt, Aug 21 2014 *)
    LinearRecurrence[{1, 0, 1, -1}, {1, 0, 2, 4}, 80] (* or *) CoefficientList[Series[(1 - x + 2 x^2 + x^3) / ((1 - x) (1 -x^3)), {x, 0, 80}], x] (* Vincenzo Librandi, Sep 28 2017 *)
  • PARI
    {a(n) = (n-1) % 3 + n-1 }
    

Formula

G.f.: (1 - x + 2*x^2 + x^3) / ((1 - x) * (1 - x^3)).
First difference is period 3 sequence [-1, 2, 2, ...].
a(n) = a(n-1) + a(n-3) - a(n-4). a(4-n) = 4-a(n).
0 = a(n)*(-a(n+1) + a(n+3)) + a(n+1)*(a(n+1) - a(n+2)) + a(n+2)*(a(n+2) - a(n+3)) for all n in Z.
a(n) = A143097(n) if n>1.
a(n) = n - 1 + mod(n-1, 3). - Wesley Ivan Hurt, Aug 21 2014
a(n) = n + (2/sqrt(3))*sin(2*(n+1)*Pi/3). - Wesley Ivan Hurt, Sep 26 2017
Sum_{n>=2} (-1)^n/a(n) = 2*Pi/(3*sqrt(3)) + log(2)/3 - 1. - Amiram Eldar, Sep 10 2023

A143103 Row sums of triangle A143102.

Original entry on oeis.org

1, 5, 17, 29, 54, 96, 138, 202, 292, 382, 503, 659, 815, 1011
Offset: 1

Views

Author

Gary W. Adamson, Jul 24 2008

Keywords

Examples

			a(4) = 29 = sum of row 4 terms of triangle A143102: (3 + 7 + 9 + 10).
a(4) = 29 since A143097 = (1, 2, 4, 3, 5,...) with n*A143097(n) = (1, 4, 12, 12, 25, 42,...) and 29 = (1 + 4 + 12 + 12).
		

Crossrefs

Showing 1-10 of 11 results. Next