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.

A316269 Array T(n,k) = n*T(n,k-1) - T(n,k-2) read by upward antidiagonals, with T(n,0) = 0, T(n,1) = 1, n >= 2.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 3, 3, 0, 1, 4, 8, 4, 0, 1, 5, 15, 21, 5, 0, 1, 6, 24, 56, 55, 6, 0, 1, 7, 35, 115, 209, 144, 7, 0, 1, 8, 48, 204, 551, 780, 377, 8, 0, 1, 9, 63, 329, 1189, 2640, 2911, 987, 9, 0, 1, 10, 80, 496, 2255, 6930, 12649, 10864, 2584, 10
Offset: 2

Views

Author

Jianing Song, Jun 28 2018

Keywords

Comments

Define {x(k)} to be an integer sequence satisfying all the following conditions:
(i) {x(k)} satisfies second-order linear recursion, that is, there exists two integers P, Q such that x(k+2) = P*x(k+1) + Q*x(k) holds for all k >= 0.
(ii) {x(k)} is (not necessarily strictly) increasing. ({A000035(k)} satisfies condition (i), but it doesn't satisfy this.)
(iii) All terms in {x(k)} do not share a common factor. ({A024023(k)} satisfies both conditions (i) and (ii), but all terms share a common factor 2.)
(iv) {x(k)} satisfies strong divisibility, that is, gcd(x(m),x(n)) = x(gcd(m,n)) holds for all m, n >= 0. ({A093131(k)} satisfies all conditions (i) to (iii), but 5 = gcd(A093131(2),A093131(3)) != A093131(gcd(2,3)) = 1.)
(v) For all positive integers n, there eventually exists some m > 0 such that n divides x(m). ({A002275(k)} satisfies all conditions (i) to (iv), but 2, 5 and 10 never divide any term.)
Then it's easy to show that the only solutions to {x(k)} are x(k) = A172236(n,k) or x(k) = T(n,k), i.e., x(0) = 0, x(1) = 1, P >= 1, Q = 1 or P >= 2, Q = -1.
The case n = 0 is not included since it gives the period-4 signed sequence 0, 1, 0, -1, 0, 1, 0, -1, ..., the g.f. of which is the inverse of the 4th cyclotomic polynomial.
The case n = 1 is not included since it gives the period-6 signed sequence 0, 1, 1, 0, -1, -1, ..., the g.f. of which is the inverse of the 6th cyclotomic polynomial.
The congruence property: let p be an odd prime which is not divisible by n^2 - 4, then T(n,(p-1)/2) == 1/2(((n-2)/p) - ((n+2)/p)) (mod p), T(n,(p+1)/2) == 1/2(((n-2)/p) + ((n+2)/p)) (mod p). Here ((n-2)/p) is the Legendre symbol. Or equivalently:
((n-2)/p)...((n+2)/p)...T(n,(p-1)/2) mod p...T(n,(p+1)/2) mod p
.....1...........1...............0....................1
....-1..........-1...............0...................-1
.....1..........-1...............1....................0
....-1...........1..............-1....................0
To prove this, rewrite (n +- sqrt(n^2-4))/2 as ((sqrt(n+2) +- sqrt(n-2))/2)^2.
Let E(n,m) be the smallest number l such that m divides T(n,l), we have: E(n,p) divides (p - ((n^2-4)/p))/2 for odd primes p that are not divisible by n^2 - 4. E(n,p) = p for odd primes p that are divisible by n^2 - 4. E(n,2) = 2 for even n and 3 for odd n.
E(n,p^e) <= p^(e-1)*E(n,p) for all primes p. If p^2 does not divide T(n,E(n,p)), then E(n,p^e) = p^(e-1)*E(n,p) for all exponent e. Specially, for primes p >= 5 that are divisible by n^2 - 4, p^2 is never divisible by T(n,p), so E(n,p^e) = p^e as described above. E(n,m_1*m_2) = lcm(E(n,m_1),E(n,m_2)) if gcd(m_1,m_2) = 1.
Given n, the largest possible value of E(n,m)/m is 1 for even n and 3/2 for odd n. It can be obtained by the value of E(n,2) described above.
Let pi(n,m) be the Pisano period of T(n,k) modulo m, i.e, the smallest number l such that T(n,k+1) == T(n,k) (mod m) holds for all k >= 0, we have: for odd primes p that are not divisible by n^2 - 4, pi(n,p) divides p + ((n-2)/p) if ((n+2)/p) = -1 and (p - ((n-2)/p))/2 if ((n+2)/p) = 1. pi(n,p) = p for odd primes p that are divisible by n - 2 and 2p for odd primes p that are divisible by n + 2. pi(n,2) = 2 even n and 3 for odd n.
pi(n,p^e) <= p^(e-1)*pi(n,p) for all primes p. If p^2 does not divide T(n,E(n,p)), then pi(n,p^e) = p^(e-1)*pi(n,p) for all exponent e. Specially, for primes p >= 5 that are divisible by n^2 - 4, p^2 is never divisible by T(n,p), so pi(n,p^e) = p^e or 2p^e as described above. pi(n,m_1*m_2) = lcm(pi(n,m_1),pi(n,m_2)) if gcd(m_1,m_2) = 1.
Given n, the largest possible value of pi(n,m)/m is:
Parity of n...n + 2 is a power of 2 or 3...max{pi(n,m)/m}.....obtained by
....even..........yes (even exponent)............1...........pi(n,2^e) = 2^e
....even...........yes (odd exponent)...........4/3............pi(n,3) = 4
....even...................no....................2.............pi(n,p) = 2p (p >= 3 is any prime factor of n + 2)
.....odd..................yes....................2..........pi(n,3^e) = 2*3^e
.....odd...................no....................3..........pi(n,2p^e) = 6p^e (p >= 5 is any prime factor of n + 2)
The largest possible value of pi(n,m)/m is obtained by infinitely many m except for the case n = 10, in which we have pi(10,3) = 6, pi(10,7) = 8, pi(10,21) = 24 and pi(10,m)/m <= 14/13 for all other m. [Corrected by Jianing Song, Nov 04 2018]
Let z(n,m) be the number of zeros in a period of T(n,k) modulo m, i.e., z(n,m) = pi(n,m)/E(n,m), then we have: for odd primes p that are not divisible by n^2 - 4, z(n,p) = 2 if ((n+2)/p) = -1; 1 or 2 if ((n+2)/p) = 1. z(n,p) = 1 for odd primes p that are divisible by n - 2 and 2 for odd primes p that are divisible by n + 2. z(n,2) = 1.
For all odd primes p, z(n,p) = 2 if and only if pi(n,p) is even, z(n,p) = 1 if and only if pi(n,p) is odd. For all odd primes p, if E(n,p) is even then z(n,p) = 2 (the converse is not necessarily true). [Comment revised by Jianing Song, Jul 06 2019]
z(n,p^e) = z(n,p) for all odd primes p. z(n,4) = 1 if n == 2, 3 (mod 4) and 2 if n == 0, 1 (mod 4). z(n,2^e) = 1 for even n and 2 for odd n, e >= 3.
By induction it is easy to show that T(n,k) = T(n,m+1)*T(n,k-m) - T(n,m)*T(k-m-1). Let k = 2m we have T(n,2m) = T(n,m)*(T(n,m+1)-T(m-1)); let k = 2m+1 we have T(n,2m+1) = T(n,m+1)^2 - T(n,m)^2 = (T(n,m+1)+T(n,m))*(T(n,m+1)-T(n,m)). So T(n,k) is composite if n >= 3, k >= 3. - Jianing Song, Jul 06 2019

Examples

			The array starts in row n = 2 with columns k >= 0 as follows:
  0      1      2      3      4      5      6
  0      1      3      8     21     55    144
  0      1      4     15     56    209    780
  0      1      5     24    115    551   2640
  0      1      6     35    204   1189   6930
  0      1      7     48    329   2255  15456
  0      1      8     63    496   3905  30744
  0      1      9     80    711   6319  56160
  0      1     10     99    980   9701  96030
  0      1     11    120   1309  14279 155760
		

Crossrefs

Cf. A172236.
Sequences with g.f. 1/(1-k*x+x^2): A001477 (k=2), A001906 (k=3), A001353 (k=4), A004254 (k=5), A001109 (k=6), A004187 (k=7), A001090 (k=8), A018913 (k=9), A004189 (k=10).
Cf. A005563 (4th column), A242135 (5th column), A057722 (6th column).

Programs

  • Mathematica
    Table[If[# == 2, k, Simplify[(((# + Sqrt[#^2 - 4])/2)^k - ((# - Sqrt[#^2 - 4])/2)^k)/Sqrt[#^2 - 4]]] &[n - k + 2], {n, 0, 10}, {k, n, 0, -1}] // Flatten (* Michael De Vlieger, Jul 19 2018 *)
  • PARI
    T(n, k) = if (k==0, 0, if (k==1, 1, n*T(n,k-1) - T(n,k-2)));
    tabl(nn) = for(n=2, nn, for (k=0, nn, print1(T(n,k), ", ")); print); \\ Michel Marcus, Jul 03 2018
    
  • PARI
    T(n, k) = ([n, -1; 1, 0]^k)[2, 1] \\ Jianing Song, Nov 10 2018

Formula

T(2,k) = k; T(n,k) = (((n+sqrt(n^2 - 4))/2)^k - ((n - sqrt(n^2 - 4))/2)^k)/sqrt(n^2 - 4), n >= 3, k >= 0.
T(n^2+2,k) = A172236(n,2k); T(n^4+4n^2+2,k) = A172236(n,4k)/A172236(n,4).
For n >= 2, Sum_{i=1..k} 1/T(n,2^i) = 2/n - ((u^(2^k-1) + v^(2^k-1))/(u + v)) * (1/T(n,2^k)), where u = (n + sqrt(n^2 - 4))/2, v = (n - sqrt(n^2 - 4))/2 are the two roots of the polynomial x^2 - n*x + 1. As a result, Sum_{i=>1} 1/T(n,2^i) = (n - sqrt(n^2 - 4))/2. - Jianing Song, Apr 21 2019

A372817 Table read by antidiagonals: T(m,n) = number of 1-metered (m,n)-parking functions.

Original entry on oeis.org

1, 0, 2, 0, 3, 3, 0, 4, 8, 4, 0, 6, 21, 15, 5, 0, 8, 55, 56, 24, 6, 0, 12, 145, 209, 115, 35, 7, 0, 16, 380, 780, 551, 204, 48, 8, 0, 24, 1000, 2912, 2640, 1189, 329, 63, 9, 0, 32, 2625, 10868, 12649, 6930, 2255, 496, 80, 10, 0, 48, 6900, 40569, 60606, 40391, 15456, 3905, 711, 99, 11
Offset: 1

Views

Author

Spencer Daugherty, May 13 2024

Keywords

Examples

			For T(3,2) the 1-metered (3,2)-parking functions are 111, 121, 211, 212.
Table begins:
  1,  2,    3,     4,     5,      6,      7, ...
  0,  3,    8,    15,    24,     35,     48, ...
  0,  4,   21,    56,   115,    204,    329, ...
  0,  6,   55,   209,   551,   1189,   2255, ...
  0,  8,  145,   780,  2640,   6930,  15456, ...
  0, 12,  380,  2912, 12649,  40391, 105937, ...
  0, 16, 1000, 10868, 60606, 235416, 726103, ...
  ...
		

Crossrefs

Main diagonal is A097690 and first row of A372816.
First, second, and third diagonals above main are A097691, A342167, A342168.
Second column A029744. Second row A005563. Third row A242135.

Formula

T(m,n) = (n*(n+sqrt(n^2 - 4))-2)/(n*(n+sqrt(n^2 - 4))-4)*((n+sqrt(n^2-4))/2)^m + (n*(n-sqrt(n^2 - 4))-2)/(n*(n-sqrt(n^2 - 4))-4)*((n-sqrt(n^2-4))/2)^m.
T(m,n) = n*T(m-1,n) - T(m-2,n) with T(0,n) = 1.

A240436 Semiprimes of the form n^3 - 2*n.

Original entry on oeis.org

4, 21, 115, 329, 2171, 6821, 24331, 50579, 79421, 103729, 226859, 357769, 704791, 1092521, 1224829, 2048129, 2247829, 2685341, 5177371, 6967489, 9393509, 11089121, 12648871, 13651441, 16974079, 25153171, 30663671, 38272079, 46267561, 74617619, 86937421, 90517951
Offset: 1

Views

Author

K. D. Bajpai, Aug 17 2014

Keywords

Comments

Intersection of A001358 and A242135.
Since n^3 - 2*n = n * (n^2 - 2), it follows that n and (n^2 - 2) both should be prime.

Examples

			a(2) = 21: 3^3 - 2*3 = 27 - 6 = 21 = 3 * 7, which is semiprime.
a(3) = 115: 5^3 - 2*5 = 125 - 10 = 115 = 5 * 23, which is semiprime.
		

Crossrefs

Programs

  • Maple
    select(k -> numtheory:-bigomega(k)=2, [seq((n^3-2*n), n=1..500)]);
  • Mathematica
    Select[Table[n^3 - 2*n, {n, 1000}], PrimeOmega[#] == 2 &]
  • PARI
    forprime(p=1,10^3,q=p^2-2;if(isprime(q),print1(p*q,", "))) \\ Derek Orr, Aug 17 2014

Formula

a(n) = A062326(n) * (A062326(n)^2 - 2). - Michel Marcus, Aug 26 2014

A242436 n^5 - 2n.

Original entry on oeis.org

0, -1, 28, 237, 1016, 3115, 7764, 16793, 32752, 59031, 99980, 161029, 248808, 371267, 537796, 759345, 1048544, 1419823, 1889532, 2476061, 3199960, 4084059, 5153588, 6436297, 7962576, 9765575, 11881324, 14348853, 17210312, 20511091, 24299940, 28629089, 33554368, 39135327, 45435356
Offset: 0

Views

Author

Derek Orr, Aug 16 2014

Keywords

Comments

For n > 0, a(n) is the largest number k such that k^5 + n is divisible by k + n, or -1 if k is infinite. When k = n^5 - 2n, (k^5 + n)/(k + n) = n^20 - 9n^16 + 31n^12 - 49n^8 + 31n^4 - 1.
For n > 1 and j > 0, the largest number k such that k^(2j+1) + n is divisible by k + n is given by k = n^(2j+1) - 2n.
For n > 1, a(n) is also the largest number k such that k + n^5 is divisible by k + n. - Derek Orr, Oct 16 2014

Examples

			a(2) = 28. 28 is the largest number k such that k^5 + 2 is divisible by k + 2. The resulting integer is 573679 = 2^20 - 9*2^16 + 31*2^12 - 49*2^8 + 31*2^4 - 1.
		

Crossrefs

Programs

  • Magma
    [n^5-2*n: n in [0..35]]; // Vincenzo Librandi, Oct 17 2014
  • Maple
    A242436:=n->n^5-2*n: seq(A242436(n), n=0..30); # Wesley Ivan Hurt, Aug 17 2014
  • Mathematica
    Table[n^5 - 2 n, {n, 0, 30}] (* Wesley Ivan Hurt, Aug 17 2014 *)
    CoefficientList[Series[(-x + 34 x^2 + 54 x^3 + 34 x^4 - x^5)/(-1 + x)^6, {x, 0, 30}], x] (* Wesley Ivan Hurt, Aug 17 2014 *)
    LinearRecurrence[{6,-15,20,-15,6,-1},{0,-1,28,237,1016,3115},40] (* Harvey P. Dale, Apr 07 2017 *)
  • PARI
    vector(100, n, (n-1)^5 - 2*(n-1))
    

Formula

From Wesley Ivan Hurt, Aug 17 2014: (Start)
G.f.: (-x+34*x^2+54*x^3+34*x^4-x^5) / (x-1)^6;
a(n) = 6*a(n-1)-15*a(n-2)+20*a(n-3)-15*a(n-4)+6*a(n-5)-a(n-6);
a(n) = A000584(n) - A005843(n). (End)

A246767 a(n) = n^4 - 2n.

Original entry on oeis.org

0, -1, 12, 75, 248, 615, 1284, 2387, 4080, 6543, 9980, 14619, 20712, 28535, 38388, 50595, 65504, 83487, 104940, 130283, 159960, 194439, 234212, 279795, 331728, 390575, 456924, 531387, 614600, 707223, 809940, 923459, 1048512, 1185855, 1336268, 1500555, 1679544, 1874087, 2085060
Offset: 1

Views

Author

Derek Orr, Sep 04 2014

Keywords

Comments

For n > 0, a(n) is the largest number k such that k + n divides k + n^4, or -1 if k is infinite. In general, for m > 0 and n > 0, the largest number k such that k + n divides k + n^m is given by k = n^m - 2*n. If k = -1 (when n = 1 for any m or when m = 1 for any n), it is infinite.

Crossrefs

Programs

  • Mathematica
    Table[n^4-2n,{n,0,40}] (* or *) LinearRecurrence[{5,-10,10,-5,1},{0,-1,12,75,248},40] (* Harvey P. Dale, May 05 2019 *)
  • PARI
    vector(100,n,(n-1)^4-2*(n-1))
    
  • PARI
    concat(0, Vec(-x^2*(3*x^3+5*x^2+17*x-1)/(x-1)^5 + O(x^100))) \\ Colin Barker, Sep 04 2014

Formula

G.f.: -x^2*(3*x^3+5*x^2+17*x-1) / (x-1)^5. - Colin Barker, Sep 04 2014
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5). - Wesley Ivan Hurt, Jun 07 2021

A361134 a(1) = 1, a(2) = 2; for n >= 3, a(n) = (n-1)^3 - a(n-1) - a(n-2).

Original entry on oeis.org

1, 2, 5, 20, 39, 66, 111, 166, 235, 328, 437, 566, 725, 906, 1113, 1356, 1627, 1930, 2275, 2654, 3071, 3536, 4041, 4590, 5193, 5842, 6541, 7300, 8111, 8978, 9911, 10902, 11955, 13080, 14269, 15526, 16861, 18266, 19745, 21308, 22947, 24666, 26475, 28366, 30343
Offset: 1

Views

Author

Tamas Sandor Nagy, Mar 02 2023

Keywords

Comments

The sum of every three consecutive terms is equal to the cube of the index of the middle one, i.e., a(n-1) + a(n) + a(n+1) = n^3.

Examples

			a(5) = (5-1)^3 - a(4) - a(3) = 4^3 - 20 - 5 = 64 - 20 - 5 = 39.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[2] = 2; a[n_] := a[n] = (n - 1)^3 - a[n - 1] - a[n - 2]; Array[a, 45] (* Amiram Eldar, Mar 03 2023 *)
  • PARI
    lista(nn) = my(va = vector(nn)); va[1] = 1; va[2] = 2; for (n=3, nn, va[n] = (n-1)^3 - va[n-1] - va[n-2];); va; \\ Michel Marcus, Mar 03 2023

Formula

G.f.: x*(2*x^5 - 7*x^4 + 9*x^3 + 2*x^2 - x + 1)/((x^2 + x + 1)*(x - 1)^4).
a(n) = (A242135(n) - 6*cos(2*n*Pi/3) + 2*sin(2*n*Pi/3)/sqrt(3))/3. - Stefano Spezia, Mar 04 2023
Showing 1-6 of 6 results.