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.

A164604 a(n) = ((1+4*sqrt(2))*(3+2*sqrt(2))^n + (1-4*sqrt(2))*(3-2*sqrt(2))^n)/2.

Original entry on oeis.org

1, 19, 113, 659, 3841, 22387, 130481, 760499, 4432513, 25834579, 150574961, 877615187, 5115116161, 29813081779, 173763374513, 1012767165299, 5902839617281, 34404270538387, 200522783613041, 1168732431139859
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Aug 17 2009

Keywords

Comments

Binomial transform of A164603. Third binomial transform of A164702. Inverse binomial transform of A164605.
From Klaus Purath, Mar 14 2024: (Start)
For any two consecutive terms (a(n), a(n+1)) = (x,y): x^2 - 6xy + y^2 = 248 = A028884(13). In general, the following applies to all recursive sequences (t) with constant coefficients (6,-1) and t(0) = 1 and two consecutive terms (x,y): x^2 - 6xy + y^2 = A028884(t(1)-6). This includes and interprets the Feb 04 2014 comment on A001541 by Colin Barker as well as the Mar 17 2021 comment on A054489 by John O. Oladokun.
By analogy to this, for three consecutive terms (x,y,z) of any recursive sequence (t) of form (6,-1) with t(0) = 1: y^2 - xz = A028884(t(1)-6). (End)

Crossrefs

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((1+4*r)*(3+2*r)^n+(1-4*r)*(3-2*r)^n)/2: n in [0..19] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Aug 23 2009
    
  • Mathematica
    LinearRecurrence[{6,-1}, {1,19}, 50] (* G. C. Greubel, Aug 11 2017 *)
  • PARI
    Vec((1+13*x)/(1-6*x+x^2)+O(x^99)) \\ Charles R Greathouse IV, Jun 12 2011

Formula

a(n) = 6*a(n-1) - a(n-2) for n > 1; a(0) = 1, a(1) = 19.
G.f.: (1+13*x)/(1-6*x+x^2).
E.g.f.: exp(3*x)*( cosh(2*sqrt(2)*x) + 4*sqrt(2)*sinh(2*sqrt(2)*x) ). - G. C. Greubel, Aug 11 2017

Extensions

Edited and extended beyond a(5) by Klaus Brockhaus, Aug 23 2009

A190576 a(n) = n^2 + 5*n - 5.

Original entry on oeis.org

1, 9, 19, 31, 45, 61, 79, 99, 121, 145, 171, 199, 229, 261, 295, 331, 369, 409, 451, 495, 541, 589, 639, 691, 745, 801, 859, 919, 981, 1045, 1111, 1179, 1249, 1321, 1395, 1471, 1549, 1629, 1711, 1795, 1881, 1969, 2059, 2151, 2245, 2341
Offset: 1

Views

Author

Keywords

Comments

Also a(n) = n^2 + 9*n + 9 if the offset is changed to -1. - R. J. Mathar, May 18 2011

Crossrefs

Cf. sequences of the form n^2 + k*n - k : A000290 (k=0), A028387 (k=1), A028872 (k=2), A082111 (k=3), A028884 (k=4).

Programs

Formula

G.f.: x*(-1 - 6*x + 5*x^2) / (x-1)^3. - R. J. Mathar, May 18 2011
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(1)=1, a(2)=9, a(3)=19. - Harvey P. Dale, May 28 2015
Sum_{n>=1} 1/a(n) = 199/495 + Pi*tan(3*sqrt(5)*Pi/2)/(3*sqrt(5)). - Amiram Eldar, Jan 18 2021

A213922 Natural numbers placed in table T(n,k) layer by layer. The order of placement: T(n,n), T(n-1,n), T(n,n-1), ... T(1,n), T(n,1). Table T(n,k) read by antidiagonals.

Original entry on oeis.org

1, 3, 4, 8, 2, 9, 15, 6, 7, 16, 24, 13, 5, 14, 25, 35, 22, 11, 12, 23, 36, 48, 33, 20, 10, 21, 34, 49, 63, 46, 31, 18, 19, 32, 47, 64, 80, 61, 44, 29, 17, 30, 45, 62, 81, 99, 78, 59, 42, 27, 28, 43, 60, 79, 100, 120, 97, 76, 57, 40, 26, 41, 58, 77, 98, 121
Offset: 1

Views

Author

Boris Putievskiy, Mar 05 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1). Enumeration table T(n,k) is layer by layer. The order of the list:
T(1,1)=1;
T(2,2), T(1,2), T(2,1);
...
T(n,n), T(n-1,n), T(n,n-1), ... T(1,n), T(n,1);
...

Examples

			The start of the sequence as a table:
   1,  3,  8, 15, 24, 35, ...
   4,  2,  6, 13, 22, 33, ...
   9,  7,  5, 11, 20, 31, ...
  16, 14, 12, 10, 18, 29, ...
  25, 23, 21, 19, 17, 27, ...
  36, 34, 32, 30, 28, 26, ...
...
The start of the sequence as triangular array read by rows:
   1;
   3,  4;
   8,  2,  9;
  15,  6,  7, 16;
  24, 13,  5, 14, 25;
  35, 22, 11, 12, 23, 36;
  ...
		

Crossrefs

Cf. A060734, A060736; table T(n,k) contains: in rows A005563, A028872, A028875, A028881, A028560, A116711; in columns A000290, A008865, A028347, A028878, A028884.

Programs

  • Mathematica
    f[n_, k_] := n^2 - 2*k + 2 /; n >= k; f[n_, k_] := k^2 - 2*n + 1 /; n < k; TableForm[Table[f[n, k], {n, 1, 5}, {k, 1, 10}]]; Table[f[n - k + 1, k], {n, 5}, {k, n, 1, -1}] // Flatten (* G. C. Greubel, Aug 19 2017 *)
  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    if i >= j:
       result=i*i-2*j+2
    else:
       result=j*j-2*i+1

Formula

As a table,
T(n,k) = n*n - 2*k + 2, if n >= k;
T(n,k) = k*k - 2*n + 1, if n < k.
As a linear sequence,
a(n) = i*i - 2*j + 2, if i >= j;
a(n) = j*j - 2*i + 1, if i < j
where
i = n - t*(t+1)/2,
j = (t*t + 3*t + 4)/2 - n,
t = floor((-1 + sqrt(8*n-7))/2).

A175019 a(0)=a(1)=1; a(n) = a(n-a(n-2)) + 2.

Original entry on oeis.org

1, 1, 3, 5, 3, 3, 7, 5, 3, 5, 7, 9, 5, 5, 7, 9, 7, 5, 11, 9, 7, 7, 11, 9, 7, 9, 11, 13, 7, 9, 11, 13, 9, 9, 11, 13, 11, 9, 15, 13, 11, 9, 15, 13, 11, 11, 15, 13, 11, 13, 15, 17, 11, 13, 15, 17, 11, 13, 15, 17, 13, 13, 15, 17, 15, 13, 19, 17, 15, 13, 19, 17, 15, 13, 19, 17, 15, 15, 19, 17
Offset: 0

Views

Author

Keywords

Comments

Conjectures from Chai Wah Wu, Jun 12 2016: (Start)
All odd numbers appear in sequence.
2n+1 appears 2n+2 times.
a((n+3)^2-8) = 2n+1 is the last time 2n+1 appears.
For n > 0, a((n-1)^2+2) = 2n+1 is the first time 2n+1 appears. (End)

Crossrefs

Cf. A028884.

Programs

  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = a[n - a[n - 2]] + 2; Table[a[n], {n, 0, 200}]

A193517 T(n,k) = number of ways to place any number of 5X1 tiles of k distinguishable colors into an nX1 grid.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 4, 5, 4, 1, 1, 1, 1, 5, 7, 7, 5, 1, 1, 1, 1, 6, 9, 10, 9, 6, 1, 1, 1, 1, 7, 11, 13, 13, 11, 8, 1, 1, 1, 1, 8, 13, 16, 17, 16, 17, 11, 1, 1, 1, 1, 9, 15, 19, 21, 21, 28, 27, 15, 1, 1, 1, 1, 10, 17, 22, 25, 26, 41, 49, 41, 20, 1, 1, 1
Offset: 1

Views

Author

R. H. Hardin, with proof and formula from Robert Israel in the Sequence Fans Mailing List, Jul 29 2011

Keywords

Comments

Table starts:
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..2..3...4...5...6...7...8....9...10...11...12...13...14...15...16...17...18
..3..5...7...9..11..13..15...17...19...21...23...25...27...29...31...33...35
..4..7..10..13..16..19..22...25...28...31...34...37...40...43...46...49...52
..5..9..13..17..21..25..29...33...37...41...45...49...53...57...61...65...69
..6.11..16..21..26..31..36...41...46...51...56...61...66...71...76...81...86
..8.17..28..41..56..73..92..113..136..161..188..217..248..281..316..353..392
.11.27..49..77.111.151.197..249..307..371..441..517..599..687..781..881..987
.15.41..79.129.191.265.351..449..559..681..815..961.1119.1289.1471.1665.1871
.20.59.118.197.296.415.554..713..892.1091.1310.1549.1808.2087.2386.2705.3044
.26.81.166.281.426.601.806.1041.1306.1601.1926.2281.2666.3081.3526.4001.4506

Examples

			Some solutions for n=11 k=3; colors=1, 2, 3; empty=0
..0....2....2....0....0....1....0....3....3....0....0....0....0....3....1....0
..0....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..0....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....1....0....2....1....0....3....3....0....3....2....3....1....0....0....1
..3....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..3....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....0....3....0....1....1....2....0....2....0....0....3....0....3....0....2
		

Crossrefs

Column 1 is A003520,
Column 2 is A143447(n-4),
Column 3 is A143455(n-4),
Row 10 is A028884.

Programs

  • Maple
    T:= proc(n, k) option remember;
          `if`(n<0, 0,
          `if`(n<5 or k=0, 1, k*T(n-5, k) +T(n-1, k)))
        end:
    seq(seq(T(n, d+1-n), n=1..d), d=1..13); # Alois P. Heinz, Jul 29 2011
  • Mathematica
    T[n_, k_] := T[n, k] = If[n<0, 0, If[n < 5 || k == 0, 1, k*T[n-5, k]+T[n-1, k]]]; Table[Table[T[n, d+1-n], {n, 1, d}], {d, 1, 14}] // Flatten (* Jean-François Alcover, Mar 04 2014, after Alois P. Heinz *)

Formula

With z X 1 tiles of k colors on an n X 1 grid (with n >= z), either there is a tile (of any of the k colors) on the first spot, followed by any configuration on the remaining (n-z) X 1 grid, or the first spot is vacant, followed by any configuration on the remaining (n-1) X 1. So T(n,k) = T(n-1,k) + k*T(n-z,k), with T(n,k) = 1 for n=0,1,...,z-1. The solution is T(n,k) = sum_r r^(-n-1)/(1 + z k r^(z-1)) where the sum is over the roots of the polynomial k x^z + x - 1.
T(n,k) = sum {s=0..[n/5]} (binomial(n-4*s,s)*k^s).
For z X 1 tiles, T(n,k,z) = sum{s=0..[n/z]} (binomial(n-(z-1)*s,s)*k^s). - R. H. Hardin, Jul 31 2011

A214870 Natural numbers placed in table T(n,k) layer by layer. The order of placement: at the beginning filled odd places of layer clockwise, next - even places counterclockwise. T(n,k) read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 10, 9, 8, 13, 17, 16, 6, 14, 21, 26, 25, 11, 12, 22, 31, 37, 36, 18, 15, 20, 32, 43, 50, 49, 27, 24, 23, 30, 44, 57, 65, 64, 38, 35, 19, 33, 42, 58, 73, 82, 81, 51, 48, 28, 29, 45, 56, 74, 91, 101, 100, 66, 63, 39, 34, 41, 59, 72, 92, 111
Offset: 1

Views

Author

Boris Putievskiy, Mar 11 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1).
Enumeration table T(n,k) layer by layer. The order of the list:
T(1,1)=1;
T(1,2), T(2,1), T(2,2);
. . .
T(1,n), T(3,n), ... T(n,3), T(n,1); T(n,2), T(n,4), ... T(4,n), T(2,n);
. . .

Examples

			The start of the sequence as table:
   1   2   5  10  17  26 ...
   3   4   9  16  25  36 ...
   7   8   6  11  18  27 ...
  13  14  12  15  24  35 ...
  21  22  20  23  19  28 ...
  31  32  30  33  29  34 ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   2,  3;
   5,  4,  7;
  10,  9,  8, 13;
  17, 16,  6, 14, 21;
  26, 25, 11, 12, 22, 31;
  ...
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    if i > j:
       result=i*i-i+(j%2)*(2-(j+1)/2)+((j+1)%2)*(j/2+1)
    else:
       result=j*j-2*(i%2)*j + (i%2)*((i+1)/2+1) + ((i+1)%2)*(-i/2+1)

Formula

As table
T(n,k) = k*k-2*(n mod 2)*k+(n mod 2)*((n+1)/2+1)+((n+1) mod 2)*(-n/2+1), if n<=k;
T(n,k) = n*n-n+(k mod 2)*(2-(k+1)/2)+((k+1) mod 2)*(k/2+1), if n>k.
As linear sequence
a(n) = j*j-2*(i mod 2)*j+(i mod 2)*((i+1)/2+1)+((i+1) mod 2)*(-i/2+1), if i<=j;
a(n) = i*i-i+(j mod 2)*(2-(j+1)/2)+((j+1) mod 2)*(j/2+1), if i>j; where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).

A221131 Table, T, read by antidiagonals where T(-j,k) = ((1+sqrt(j))^k + (1-sqrt(j))^k)/2.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -2, 1, 1, 1, -2, -5, -4, 1, 1, 1, -3, -8, -7, -4, 1, 1, 1, -4, -11, -8, 1, 0, 1, 1, 1, -5, -14, -7, 16, 23, 8, 1, 1, 1, -6, -17, -4, 41, 64, 43, 16, 1, 1, 1, -7, -20, 1, 76, 117, 64, 17, 16, 1, 1, 1, -8, -23, 8, 121, 176, 29, -128, -95, 0, 1
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com) and Robert G. Wilson v, Jan 02 2013

Keywords

Comments

.j\k.........0..1...2....3...4....5....6......7.......8......9......10
.0: A000012..1..1...1....1...1....1....1......1.......1......1.......1
-1: A146559..1..1...0...-2..-4...-4....0......8......16.....16.......0
-2: A087455..1..1..-1...-5..-7....1...23.....43......17....-95....-241
-3: A138230..1..1..-2...-8..-8...16...64.....64....-128...-512....-512
-4: A006495..1..1..-3..-11..-7...41..117.....29....-527..-1199.....237
-5: A138229..1..1..-4..-14..-4...76..176...-104...-1264..-1904....3776
-6: A090592..1..1..-5..-17...1..121..235...-377...-2399..-2159...12475
-7: A090590..1..1..-6..-20...8..176..288...-832...-3968..-1280...29184
-8: A025172..1..1..-7..-23..17..241..329..-1511...-5983...1633...57113
-9: A120743..1..1..-8..-26..28..316..352..-2456...-8432...7696...99712
-10: ........1..1..-9..-29..41..401..351..-3709..-11279..18241..160551

Crossrefs

Programs

  • Mathematica
    T[j_, k_] := Expand[((1 + Sqrt[j])^k + (1 - Sqrt[j])^k)/2]; Table[ T[ -j + k, k], {j, 0, 11}, {k, 0, j}] // Flatten

A382310 Array read by ascending antidiagonals: A(n,m) is the squared distance between the roots of the 2nd degree equations z^2 +- n*z + m = 0 on the complex plane.

Original entry on oeis.org

0, 1, 4, 4, 3, 8, 9, 0, 7, 12, 16, 5, 4, 11, 16, 25, 12, 1, 8, 15, 20, 36, 21, 8, 3, 12, 19, 24, 49, 32, 17, 4, 7, 16, 23, 28, 64, 45, 28, 13, 0, 11, 20, 27, 32, 81, 60, 41, 24, 9, 4, 15, 24, 31, 36, 100, 77, 56, 37, 20, 5, 8, 19, 28, 35, 40, 121, 96, 73, 52, 33, 16, 1, 12, 23, 32, 39, 44
Offset: 0

Views

Author

Stefano Spezia, Mar 21 2025

Keywords

Examples

			The array begins as:
   0,  4,  8, 12, 16, 20, 24, 28, 32, 36, 40, 44, ...
   1,  3,  7, 11, 15, 19, 23, 27, 31, 35, 39, 43, ...
   4,  0,  4,  8, 12, 16, 20, 24, 28, 32, 36, 40, ...
   9,  5,  1,  3,  7, 11, 15, 19, 23, 27, 31, 35, ...
  16, 12,  8,  4,  0,  4,  8, 12, 16, 20, 24, 28, ...
  25, 21, 17, 13,  9,  5,  1,  3,  7, 11, 15, 19, ...
  ...
A(2,0) = 4 since z^2 - 2*z = 0 and z^2 + 2*z = 0 have respectively roots 0, 2, and -2, 0 with squared distance equal to 4;
A(1,2) = 7 since z^2 - z + 2 = 0 and z^2 + z + 2 = 0 have respectively roots (1 +- i*sqrt(7))/2 and (-1 +- i*sqrt(7))/2 with squared distance equal to 7, where i denotes the imaginary unit.
		

Crossrefs

Cf. A000290 (m=0), A008586 (n=0), A028347, A028566, A028884, A131098, A134594, A145917, A382311 (antidiagonal sums).

Programs

  • Mathematica
    A[n_,m_]:=Abs[n^2-4m]; Table[A[n-m,m],{n,0,11},{m,0,n}]//Flatten

Formula

A(n,m) = abs(n^2 - 4*m).
A(n,n) = A028347(n-2) for n > 3.
A(n,1) = A028347(n) for n > 1.
A(n,2) = A028884(n-3) for n > 2.
A(n,4) = A028566(n-4) for n > 3.
A(n,5) = A134594(n-5) for n > 4.
A(1,n) = A131098(n+1).

A374584 Numbers k such that 7*k + 2 is a square.

Original entry on oeis.org

1, 2, 14, 17, 41, 46, 82, 89, 137, 146, 206, 217, 289, 302, 386, 401, 497, 514, 622, 641, 761, 782, 914, 937, 1081, 1106, 1262, 1289, 1457, 1486, 1666, 1697, 1889, 1922, 2126, 2161, 2377, 2414, 2642, 2681, 2921, 2962, 3214, 3257, 3521, 3566, 3842, 3889
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 12 2024

Keywords

Crossrefs

The numbers k such that (m + (9-m)*k) is a square: A000217 (m = 1), this sequence (m = 2), A003154 (m = 3), A195162 (m = 4), A028387 (m = 5), A100536 (m = 6), A059993 (m = 7), A028884 (m = 8).
Cf. A047341.

Programs

  • Magma
    [k: k in [0..4000] | IsSquare(7*k + 2)];
  • Mathematica
    ((Table[7*n + {3, 4}, {n, 0, 23}] // Flatten)^2 - 2)/7 (* Amiram Eldar, Aug 12 2024 *)

Formula

a(n) = (A047341(n)^2 - 2)/7. - Amiram Eldar, Aug 12 2024
Previous Showing 11-19 of 19 results.