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 21-26 of 26 results.

A214630 a(n) is the reduced numerator of 1/4 - 1/A109043(n)^2 = (1 - 1/A026741(n)^2)/4.

Original entry on oeis.org

-1, 0, 0, 2, 3, 6, 2, 12, 15, 20, 6, 30, 35, 42, 12, 56, 63, 72, 20, 90, 99, 110, 30, 132, 143, 156, 42, 182, 195, 210, 56, 240, 255, 272, 72, 306, 323, 342, 90, 380, 399, 420, 110, 462, 483, 506, 132, 552, 575, 600, 156
Offset: 0

Views

Author

Paul Curtz, Jul 23 2012

Keywords

Comments

The unreduced fractions are -1/0, 0/4, 0/1, 8/36, 3/16, 24/100, 2/9, 48/196, 15/64, 80/324, 6/25, ... = c(n)/A061038(n), say.
Note that c(n)=A061037(n) + (period of length 2: repeat 0, 3).
c(n) is a permutation of A198442(n). The corresponding ranks are (the 0's have been swapped for convenience) 0,2,1,6,4,10,... = A145979(n-2).
Define the following sequences, satisfying the recurrence a(n) = 2*a(n-4) - a(n-8),
e(n) = -1, 0, 0, 2, 1, 4, 1, 6, 3, 8, 2, 10, 5, ... (after -1, a permutation of A004526(n) or mix A026741(n-1), 2*n),
f(n) = 1, 2, 1, 4, 3, 6, 2, 8, 5, 10, 3, 12, 7, ..., (another permutation of A004526(n+2) or mix A026741(n+1), 2*n+2).
f(n) - e(n) = periodic of period length 4: repeat 2, 2, 1, 2.
e(n) + f(n) = 0, 2, 1, 6, 4, 10, ... = A145979(n-2).
Then c(n) = e(n)*f(n).
Note that A061038(n) - 4*c(n) = periodic of period length 4: repeat 4, 4, 1, 4.
After division (by period 2: repeat 1, 4, A010685(n)), the reduced fractions of c(n) are -1/0, 0/1 ?, 0/4 ?, 2/9, 3/16, 6/25, 2/9, 12/49, 15/64, 20/81, 6/25, ... = a(n)/b(n).
Note that a(1+4*n) + a(2+4*n) + a(3+4*n) = 2,20,56,... = A002378(1+3*n) = A194767(3*n).
A061037(n-2) - a(n-2) = 0, -3, 0, -3, 0, 3, 0, 15, 0, 33, 0, 57, ... = Fip(n-2).
Fip(n-2)/3 = 0,-1,0,-1,0,1,0,5,0,11,0,19,0,29, .... Without 0's: A165900(n) (a Fibonacci polynomial); also -A110331(n+1) (Pell numbers).
g(n) = -1, 0, 0, 1, 1, 2, 1, 3, 3, 4, ... = mix A026741(n-1), n.
h(n) = 1, 1, 1, 2, 3, 3, 2, 4, 5, 5, ... = mix A026741(n+1), n+1.
h(n) - g(n) = (period 2: repeat 2, 1, 1, 1 = A177704(n-1)).
k(n) = 1, 1, 0, 2, 3, 3, 1, 4, 5, 5, ... = mix A174239(n), n+1.
l(n) = -1, 0, 1, 1, 1, 2, 2, 3, 3, 4, ... .
k(n) - l(n) = period 4: repeat 2, 1, -1, 1.
2) By the second formula in the definition, we take first 1 - 1/A026741(n)^2.
Hence, using a convention for the first fraction, -1/0, 0/1, 0/1, 8/9, 3/4, 24/25, 8/9, 48/49, 15/16, 80/81, 24/25, ... = (A005563(n-1) - A033996(n))/A168077(n) = q(n)/A168077(n).
For a(n), we divide by 4.
Note that A214297 is the reduced numerator of 1/4 - 1/A061038(n).
Note also that A168077(n) = A026741(n)^2.

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((1-x)^3*(x+1)^3*(x^2+1)^3))); // G. C. Greubel, Sep 20 2018
  • Mathematica
    CoefficientList[Series[(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((1-x)^3*(x+1)^3*(x^2+1)^3), {x, 0, 50}], x] (* G. C. Greubel, Sep 20 2018 *)
    LinearRecurrence[{0,0,0,3,0,0,0,-3,0,0,0,1},{-1,0,0,2,3,6,2,12,15,20,6,30},60] (* Harvey P. Dale, Jul 01 2019 *)
  • PARI
    Vec(-(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((x-1)^3*(x+ 1)^3*(x^2+1)^3) + O(x^100)) \\ Colin Barker, Jan 22 2015
    

Formula

a(4*n) = 4*n^2-1 = (2*n-1)*(2*n+1), a(2*n+1) = a(4*n+2) = n(n+1).
a(n)= A198442(n)/(period of length 4: repeat 1,1,4,1=A010121(n+2)).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12). Is this the shortest possible recurrence? See A214297.
a(n+2) - a(n-2) = 0, 2, 4, 6, 2, 10, 12, 14, 4, ... = 2*A214392(n). a(-2)=a(-1)=0=a(1)=a(2).
a(n+4) - a(n-4) = 0, 4, 2, 12, 16, 20, 6, 28, 32, 36,... = 2*A188167(n). a(-4)=3=a(4), a(-3)=2=a(3).
a(n) = g(n) * h(n).
a(n) = k(n) * l(n).
G.f.: -(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1) / ((x-1)^3*(x+1)^3*(x^2+1)^3). - Colin Barker, Jan 22 2015
From Luce ETIENNE, Apr 08 2017: (Start)
a(n) = (13*n^2-28-3*(n^2+4)*(-1)^n+3*(n^2-4)*((-1)^((2*n-1+(-1)^n)/4)+(-1)^((2*n+1-(-1)^n)/4)))/64.
a(n) = (13*n^2-28-3*(n^2+4)*cos(n*Pi)+6*(n^2-4)*cos(n*Pi/2))/64. (End)

Extensions

Edited by N. J. A. Sloane, Aug 04 2012

A259925 a(n) = (n^2 - n - 1)^n.

Original entry on oeis.org

1, -1, 1, 125, 14641, 2476099, 594823321, 194754273881, 83733937890625, 45848500718449031, 31181719929966183601, 25804264053054077850709, 25542038069936263923006961, 29806575070123343006591796875, 40504199006061377874300161158921
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 09 2015

Keywords

Comments

(n^2-n-1) is the Fibonacci polynomial; so (n^2 - n - 1)^n = 0 has a single root phi (A001622).

Examples

			For n = 0, a(0) = (0^2 - 0 - 1)^0 = (-1)^0 = 1.
		

Crossrefs

Cf. A165900.

Programs

Formula

a(n) = A165900(n)^n.

Extensions

More terms from Vincenzo Librandi, Jul 10 2015

A319070 a(n) is the area of the surface made of the rectangles with vertices (d, n/d), (D, n/d), (D, n/D), (d, n/D) for all (d, D), pair of consecutive divisors of n.

Original entry on oeis.org

0, 1, 4, 4, 16, 7, 36, 12, 24, 19, 100, 17, 144, 39, 44, 32, 256, 33, 324, 41, 72, 103, 484, 40, 160, 147, 108, 65, 784, 57, 900, 80, 152, 259, 228, 66, 1296, 327, 204, 93, 1600, 99, 1764, 137, 160, 487, 2116, 92, 504, 165, 332, 185, 2704, 135, 388
Offset: 1

Views

Author

Luc Rousseau, Sep 09 2018

Keywords

Examples

			The divisors of n=12 are {1, 2, 3, 4, 6, 12}. The widths of the rectangles from the definition are obtained by difference: {1, 1, 1, 2, 6}. By symmetry, their heights are the same, but in reverse order: {6, 2, 1, 1, 1}. The sought total area is the sum of products width*height of each rectangle, in other words it is the dot product 1*6 + 1*2 + 1*1 + 2*1 + 6*1. Result: 17. So, a(12)=17.
		

Crossrefs

Cf. A191743, A290110 (introducing factorization patterns of sequences of divisors).
Cf. A165900 (the Fibonacci polynomial).

Programs

  • Mathematica
    a[n_] := Module[{x = Differences[Divisors[n]]}, Plus @@ (x*Reverse[x])];
    Table[a[n], {n, 1, 55}]
  • PARI
    arect(n, d, D) = (D-d)*(n/d - n/D);
    a(n) = my(vd = divisors(n)); sum(k=1, #vd-1, arect(n, vd[k], vd[k+1])); \\ Michel Marcus, Oct 28 2018

Formula

a(1) = 0.
a(p) = (p-1)^2 for p a prime number.
a(p^k) = (p-1)^2*k*p^(k-1) for p^k a prime power.
a(p*q) = 2*(p-1)^2*q + (q-p)^2 for p and q primes (p < q).
a(n) = (n/2 - 1)^2 + 3 if n=2*p with p a prime greater than 2.
a(n) = (n/p + F(p-1))^2 + p^2 - F(p-1)^2 if n = p*q, p < q primes; where F denotes the Fibonacci polynomial, F(x) = x^2 - x - 1 (see A165900).
For more complex factorization patterns of n, the formula depends on the factorization pattern of the sequence of divisors of n (see A191743 or A290110), e.g.:
a(p^2*q) = 4*p*q*(p-1)^2 + (q-p^2)^2 if 1 < p < p^2 < q < p*q < p^2*q,
but
a(p^2*q) = 2*p*q*(p-1)^2 + 2*p*(q-p)^2 + (p^2-q)^2 if 1 < p < q < p^2 < p*q < p^2*q.
a(n) = Sum_{i=1..tau(n)-1} (d_[tau(n)-i+1] - d_[tau(n)-i])*(d_[i+1] - d_[i]), where {d_i}, i=1..tau(n) is the increasing sequence of divisors of n. - Ridouane Oudra, Oct 17 2021

A384329 Table read by rows: row n is the unique primitive Pythagorean triple (a,b,c) such that (a-b+c)/2 = A000217(n) and its long leg and hypotenuse are consecutive natural numbers, n >= 0.

Original entry on oeis.org

-1, 0, 1, 1, 0, 1, 5, 12, 13, 11, 60, 61, 19, 180, 181, 29, 420, 421, 41, 840, 841, 55, 1512, 1513, 71, 2520, 2521, 89, 3960, 3961, 109, 5940, 5941, 131, 8580, 8581, 155, 12012, 12013, 181, 16380, 16381, 209, 21840, 21841, 239, 28560, 28561, 271, 36720, 36721, 305, 46512, 46513, 341, 58140, 58141
Offset: 0

Views

Author

Keywords

Comments

Row n = 0 and n = 1 are included by convention and correspond to the Pythagorean triples (-1)^2 + 0^2 = 1^2 and 1^2 + 0^2 = 1^2.

Examples

			  n=0:     -1,     0,     1;
  n=1:      1,     0,     1;
  n=2:      5,    12,    13;
  n=3:     11,    60,    61;
  ...
		

Crossrefs

Cf. A000217, A165900 (short leg), A062392 (semiperimeter), A384498 (sum of the legs).

Programs

  • Mathematica
    a=Table[(n(n+1))/2,{n,0,18}];Apply[Join,Map[{2#-1,2#^2-2#,2#^2-2#+1}&,a]]

Formula

row(n) = (2*T(n) - 1, 2*T(n)*(T(n) - 1), 2*T(n)*(T(n) - 1) + 1) where T(n) = A000217(n).

A307991 Fibonacci numbers of the form k^2 - k - 1 with integer k.

Original entry on oeis.org

1, 5, 55, 89
Offset: 1

Views

Author

Amiram Eldar, May 09 2019

Keywords

Comments

The corresponding values of k are 2, 3, 8, 10.
Intersection of A000045 and A028387.
Also Fibonacci numbers whose reciprocals equal to Sum_{i>=1} F(i)/k^(i+1), where F(i) is the i-th Fibonacci number.
de Weger proved that there are no other terms.

Examples

			89 is in the sequence since 89 = 10^2 - 10 - 1 or equivalently 1/89 = 1/10^2 + 1/10^3 + 2/10^4 + 3/10^5 + 5/10^6 + ... This is why the first digits of the decimal expansion of 1/89 = 0.011235... are the first terms of the Fibonacci sequence.
		

References

  • Fenton Stancliff, A curious property of a_11, Scripta Math., Vol. 19 (1953), p. 126.

Crossrefs

Programs

  • Mathematica
    Select[Fibonacci[Range[2, 20]], IntegerQ[Sqrt[4# + 5]] &]

A355659 Martingale win/loss triangle, read by rows: T(n,k) = total number of dollars won (or lost) using the martingale method on all possible n trials that have exactly k losses and n-k wins, for 0 <= k <= n.

Original entry on oeis.org

0, 1, -1, 2, 1, -3, 3, 5, -1, -7, 4, 11, 7, -7, -15, 5, 19, 24, 4, -21, -31, 6, 29, 53, 38, -12, -51, -63, 7, 41, 97, 111, 41, -57, -113, -127, 8, 55, 159, 243, 187, 5, -163, -239, -255, 9, 71, 242, 458, 500, 248, -130, -394, -493, -511, 10, 89, 349, 784, 1084, 874, 202, -488, -878, -1003, -1023
Offset: 0

Views

Author

Greg Dresden and Max Winnick, Jul 12 2022

Keywords

Comments

The martingale betting method is as follows: bet $1. If win, bet $1 on next trial. If lose, double your bet on next trial. Repeat for a total of n times.
We can use row n of the triangle to find the total expected value for n trials, if we assume that the probability of each win is p. The expected value is Sum_{k=0..n} T(n,k)*p^k*(1-p)^(n-k). In a "fair" game where p = 1/2, this equals 0, as expected.

Examples

			Triangle T(n,k) begins:
n\k| 0   1   2   3    4   5    6    7    8    9
---+-------------------------------------------
  0| 0
  1| 1  -1
  2| 2   1  -3
  3| 3   5  -1  -7
  4| 4  11   7  -7  -15
  5| 5  19  24   4  -21 -31
  6| 6  29  53  38  -12 -51  -63
  7| 7  41  97 111   41 -57 -113 -127
  8| 8  55 159 243  187   5 -163 -239 -255
  9| 9  71 242 458  500 248 -130 -394 -493 -511
Examples from triangle:
T(4,3) = -7: In this example, we consider all possibilities with 4 trials that result in 3 losses and one win. There are binomial(4,3) = 4 different combinations to consider (lllw, llwl, lwll, and wlll), which have net earnings of +1, 0, -2, -6 respectively when using the martingale method, giving a total of -7.
T(6,2) = 53: In this example, we have 6 trials and we consider the results with 2 losses and 4 wins. There are binomial(6,2) = 15 such combinations to consider (wwwwll, wwwlwl, wwwllw, wwlwwl, wwlwlw, wwllww, wlwwwl, wlwwlw, wlwlww, wllwww, lwwwwl, lwwwlw, lwwlww, lwlwww, llwwww), and summing over all 15 earnings gives us a total of 53.
T(2,0) = 2: In this example, we have 2 trials, with 0 losses and 2 wins. In this one single case, the martingale method gives us earnings of +1 and +1 with a total of 2.
		

Crossrefs

Formula

T(n,k) = T(n-1,k) + T(n-1,k-1) + binomial(n-1,k) for 0 < k < n.
Sum_{k=0..n} T(n,k) = 0 (the sum of each row equals 0).
The following six formulas describe the three leftmost columns and the three rightmost diagonals of the triangle drawn below.
T(n,0) = n (this is the scenario with n trials, 0 losses; since the martingale method has us bet 1 after each win, we end up with total earnings equal to n).
T(n,1) = n^2 - n - 1 (this scenario is when there are n trials with just 1 loss; calculations show that this equals n^2 - n - 1 = A165900(n)).
T(n,2) = (n^3 - 3n^2 - 2)/2.
T(n,n) = 1 - 2^n = A000225(n).
T(n,n-1)= 1 + 2*n - 2^n = A070313(n).
T(n,n-2) = (3*n^2 - n)/2 + 1 - 2^n.
G.f.: x*(1-y)*(1-x*y) / ((1 - x*(1+y))^2 * (1-2*x*y)). - Kevin Ryde, Aug 30 2022
Previous Showing 21-26 of 26 results.