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.

User: K. G. Stier

K. G. Stier's wiki page.

K. G. Stier has authored 6 sequences.

A254027 Table T(n,k) = 3^n - 2^k read by antidiagonals.

Original entry on oeis.org

0, 2, -1, 8, 1, -3, 26, 7, -1, -7, 80, 25, 5, -5, -15, 242, 79, 23, 1, -13, -31, 728, 241, 77, 19, -7, -29, -63, 2186, 727, 239, 73, 11, -23, -61, -127, 6560, 2185, 725, 235, 65, -5, -55, -125, -255, 19682, 6559, 2183, 721, 227, 49, -37, -119, -253, -511, 59048, 19681, 6557, 2179, 713, 211, 17, -101, -247, -509, -1023
Offset: 0

Author

K. G. Stier, Jan 22 2015

Keywords

Comments

Table shows differences of a given power of 3 to the powers of 2 (columns), and differences of the powers of 3 to a given power of 2 (rows), respectively.
Note that positive terms (table's upper right area) and negative terms (lower left area) are separated by an imaginary line with slope -log(3)/log(2) = -1.5849625.. (see A020857). This "border zone" of the table is of interest in terms of how close powers of 3 and powers of 2 can get: i.e., those T(n,k) where k/n is a good rational approximation to log(3)/log(2), see A254351 for numerators k and respective A060528 for denominators n.

Examples

			Table begins
   0    2   8  26  80..
  -1    1   7  25  79..
  -3   -1   5  23  73..
  -7   -5   1  19  65..
  -15 -13  -7  11  49..
  ..   ..  ..  ..  ..
		

Crossrefs

Row 0 (=3^n-1) is A024023.
Row 1 (=3^n-2) is A058481.
Row 2 (=3^n-4) is A168611.
Column 0 (=1-2^n) is (-1)A000225.
Column 1 (=3-2^n) is (-1)A036563.
Column 2 (=9-2^n) is (-1)A185346.
Column 3 (=27-2^n) is (-1)A220087.
0,0-Diagonal (=3^n-2^n) is A001047.
1,0-Diagonal (=3^n-2^(n-1)) for n>0 is A083313 or A064686.
0,1-Diagonal (=3^n-2^(n+1)) is A003063.
0,2-Diagonal (=3^n-2^(n+2)) is A214091.

Programs

  • Mathematica
    Table[3^(n-k) - 2^k, {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 18 2017 *)
  • PARI
    for(i=0, 10, {
         for(j=0, i, print1((3^(i-j)-2^j),", "))
    });

A254351 Numerators of increasingly better rational approximations to log(3)/log(2) with increasing denominators.

Original entry on oeis.org

2, 3, 5, 8, 11, 19, 46, 65, 84, 317, 401, 485, 569, 1054, 13133, 14187, 15241, 16295, 17349, 18403, 19457, 20511, 21565, 22619, 23673, 24727, 50508, 125743, 176251, 301994, 8632083, 8934077, 9236071, 9538065, 9840059, 10142053, 10444047, 10746041, 11048035
Offset: 1

Author

K. G. Stier, Jan 29 2015

Keywords

Comments

log(3)/log(2) = 1.5849625... (see A020857) is an irrational number. The fractions (2/1, 3/2, 5/3, 8/5, 11/7, 19/12, 46/29, 65/41, 84/53, 317/200, 401/253, 485/306, 569/359, 1054/665, ...) are a sequence of approximations to log(3)/log(2), where each is an improvement on its predecessors.
Numerators are shown here, the respective denominators are A060528 (and can also be found among the terms of A206788), both of which refer to equal divisions of the octave and good approximations to musical harmonics.

Crossrefs

Cf. A060528 (denominators), A020857, A206788.

Programs

  • Maxima
    x:bfloat(log(3)/log(2)),fpprec:100, errold:2,for denominator:1 thru 10000 do (numerator:round(x*denominator), errnew:abs(x-numerator/denominator), if errnew < errold then (errold:errnew, print(numerator)));

A246425 In the Collatz 3x+1 problem: start at an odd number 2n+1 and find the next odd number 2m+1 in the trajectory; then a(n) = m-n.

Original entry on oeis.org

0, 1, -2, 2, -1, 3, -4, 4, -2, 5, -10, 6, -3, 7, -9, 8, -4, 9, -15, 10, -5, 11, -14, 12, -6, 13, -24, 14, -7, 15, -19, 16, -8, 17, -28, 18, -9, 19, -24, 20, -10, 21, -42, 22, -11, 23, -29, 24, -12, 25, -41, 26, -13, 27, -34, 28, -14, 29, -53, 30, -15, 31, -39, 32, -16, 33, -54, 34, -17, 35, -44, 36, -18, 37, -71, 38, -19, 39, -49, 40, -20, 41, -67, 42, -21, 43, -54, 44, -22, 45, -82, 46, -23, 47, -59, 48, -24, 49, -80, 50
Offset: 0

Author

K. G. Stier, Aug 26 2014

Keywords

Comments

Positive terms indicate the next odd number 2m+1 in the trajectory is greater than 2n+1 which is the case every second time giving a(n) = m-n = (n+1)/2.
Negative terms indicate the next odd number 2m+1 in the trajectory is smaller than 2n+1. For behavior of this part refer to A087230.

Examples

			a(14)=-9 because 2*14 + 1 = 29 and the Collatz trajectory to reach the next odd number goes: 29, 88, 44, 22, 11. Thus, m=5 and 5 - 14 = -9.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local m;
       m:= 6*n+4;
       m/2^(1+padic:-ordp(m,2))-n-1/2
    end proc:
    map(f, [$0..100]); # Robert Israel, Mar 22 2020
  • Mathematica
    a[n_] := ((6n+4)/2^IntegerExponent[6n+4, 2] - (2n+1))/2;
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 15 2023 *)
  • PARI
    forstep(n=0, 1000, 1, m=6*n+4; print1(((m/2^valuation(m, 2)-(2*n+1))/2),", "))

Formula

a(n) = ((6*n+4)/2^A087230(n) - (2*n+1))/2.

A239114 Exponent of 2 in prime factorization (i.e., 2-adic valuation) of odd nonprimes A014076(n) + 1.

Original entry on oeis.org

1, 1, 4, 1, 1, 2, 1, 2, 3, 1, 1, 2, 3, 1, 6, 1, 1, 2, 1, 1, 1, 3, 2, 1, 5, 2, 1, 4, 2, 1, 3, 1, 2, 1, 1, 1, 3, 1, 4, 1, 2, 1, 2, 5, 1, 1, 1, 2, 4, 1, 3, 1, 2, 1, 2, 1, 2, 1, 4, 1, 1, 3, 1, 2, 1, 1, 3, 2, 1, 2, 1, 3, 1, 1, 8, 2, 1, 1, 2, 1, 2, 3, 1, 5, 1, 2, 3, 1, 2, 1, 4, 1, 1, 2, 6, 1, 2, 1, 3, 1
Offset: 1

Author

K. G. Stier, Mar 10 2014

Keywords

Comments

Sequence is counterpart to A023512, i.e., merging these two sequences gives the ruler function A001511.

Examples

			a(13) = 3, because the 13th odd nonprime is 55, and the largest power of 2 dividing 55+1 is 3.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {forstep(n=1, nn, 2, if (! isprime(n), print1(valuation(n+1, 2), ", ")););} \\ Michel Marcus, Mar 13 2014

Formula

a(n) = A001511((A014076(n)+1)/2)

A231100 Even legs of primitive Pythagorean triples (with multiplicity) sorted with respect to increasing hypotenuse.

Original entry on oeis.org

4, 12, 8, 24, 20, 12, 40, 28, 60, 16, 56, 48, 36, 84, 80, 72, 20, 60, 112, 44, 88, 24, 144, 140, 132, 120, 52, 180, 104, 176, 168, 28, 84, 156, 140, 220, 60, 208, 120, 32, 96, 264, 260, 252, 160, 240, 68, 136, 224, 312, 308, 36, 204, 288, 180, 272, 76, 364, 252, 152, 352, 340, 228
Offset: 1

Author

K. G. Stier, Nov 03 2013

Keywords

Comments

The primary key is the increasing length of the hypotenuse, A020882. If there is more than one solution with that hypotenuse, the (secondary) sorting key is the (increasing) even leg - that is, the terms go in the increasing order. [Corrected by Andrey Zabolotskiy, Oct 31 2019]
Only the even legs 'b' of reduced triangles with gcd(a,b,c)=1, a^2+b^2=c^2, a=q^2-p^2, b=2*p*q, c=q^2+p^2, gcd(p,q)=1 are listed.

Examples

			a(13) = sqrt(A020882(13)^2-A180620(13)^2) = sqrt(85^2-77^2) = sqrt(1296) = 36.
		

Crossrefs

Formula

a(n) = sqrt(A020882(n)^2-A180620(n)^2).

A220249 Numbers of rows R of the Wythoff array such that R is the n-th multiple of a tail of the Lucas sequence.

Original entry on oeis.org

2, 9, 13, 45, 56, 67, 78, 89, 262, 291, 320, 349, 378, 407, 436, 465, 494, 523, 552, 581, 610, 1673, 1749, 1825, 1901, 1977, 2053, 2129, 2205, 2281, 2357, 2433, 2509, 2585, 2661, 2737, 2813, 2889, 2965, 3041, 3117, 3193, 3269, 3345, 3421, 3497, 3573, 3649
Offset: 1

Author

K. G. Stier, Dec 08 2012

Keywords

Comments

This sequence is corresponding to A173027. Also Row 2 of the array A173028.
It appears that the numbers of this sequence form groups of m members respectively with same distance d of two consecutive values a(n) such that d is equal to odd-indexed Lucas numbers (A002878) while m is equal to odd-indexed Fibonacci numbers (A001519). Example: from n=988 to 2584 d=3571 and m=1597;
Also of interest are the gaps between two consecutive groups which appear to be sums of one Lucas number L(2n+1) plus one Fibonacci number F(4n). Example: gap 5 after a(55) is 6964 = L(11) + F(20) = 199 + 6765
Likewise, the tail (as mentioned in this sequence's name) of the Lucas sequence is chopped off by two initial terms at each of the gap positions.

Examples

			Referring to rows of the Wythoff array (A035513),
Row 2: (4,7,11,18,...) = 1*(4,7,11,18,29,47,76,...)
Row 9: (22,36,58,...) = 2*(11,18,29,47,76...)
Row 13: (33,54,87,...) = 3*(11,18,29,47,76...)
Row 45: (116,188,304,...) = 4*(29,47,76...)
		

Crossrefs