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: Patrick McKinley

Patrick McKinley's wiki page.

Patrick McKinley has authored 5 sequences.

A369346 Continued fraction expansion of the real root of x^3 - x^2 - 1 = 0.

Original entry on oeis.org

1, 2, 6, 1, 3, 5, 4, 22, 1, 1, 4, 1, 2, 84, 1, 3, 1, 6, 1, 3, 1, 9, 1, 1, 1, 1, 19, 3, 1, 2, 1, 5, 1, 5, 2, 2, 1, 1, 1, 1, 76, 6, 8, 1, 1, 5, 1, 5, 1, 1, 25, 1, 2, 1, 116, 2, 1, 8, 1, 1, 3, 1, 53, 5, 276, 2, 1, 1, 1, 3, 3, 2, 1, 1, 4, 13, 1, 1, 1, 4, 1, 1, 1, 9, 9, 1, 1, 9, 6, 1, 2, 32
Offset: 0

Author

Patrick McKinley, Jan 20 2024

Keywords

Crossrefs

Cf. A092526 (decimal expansion), A381124, A381125 (convergents).

Programs

  • Mathematica
    ContinuedFraction[x/.First[Solve[x^3-x^2-1==0,x]],92] (* Stefano Spezia, Jan 21 2024 *)
  • PARI
    \p100 \\ realprecision
    contfrac(solve(x = 1, 2, x^3 - x^2 - 1),, 80) \\ Hugo Pfoertner, Jan 21 2024
  • bc
    /* The "test" calculation evaluates the cubic to confirm the calculation of the root. */
    define iter(frac)
    {j = 0
     while(frac > 1){
       frac -= 1;
       j+=1}
     j
     return 1/frac}
    scale=12578
    f=(1+(e(l(((29+3*sqrt(93))/2))/3))+(e(l(((29-3*sqrt(93))/2))/3)))/3
    psi=f
    test=(psi-1)*psi*psi-1
    for(i=0;i<12175;i++)f=iter(f)
    

Extensions

Offset changed by Andrew Howroyd, Feb 14 2025

A257092 Square array read by antidiagonals: Nimsum function for "Take-or-Break" Nim where a legal move is defined as: 1) Remove a nonzero number of counters from any pile up to the size of the selected pile OR 2) Split any pile of size greater than one into two nonzero piles (removing no counters from the board).

Original entry on oeis.org

0, 1, 1, 2, 0, 2, 3, 4, 4, 3, 4, 5, 0, 5, 4, 5, 2, 6, 6, 2, 5, 6, 3, 1, 0, 1, 3, 6, 7, 8, 8, 8, 8, 8, 8, 7, 8, 9, 3, 1, 0, 1, 3, 9, 8, 9, 6, 10, 2, 6, 6, 2, 10, 6, 9, 10, 7, 5, 11, 5, 0, 5, 11, 5, 7, 10, 11, 12, 12, 4, 12, 4, 4, 12, 4, 12, 12, 11, 12, 13, 7, 13, 3, 13, 0, 13, 3, 13, 7, 13, 12, 13, 10, 14, 14, 10, 2, 14, 14, 2, 10, 14, 14, 10, 13, 14, 11, 9, 7, 9, 11, 1, 0, 1, 11, 9, 7, 9, 11, 14
Offset: 0

Author

Patrick McKinley, Apr 19 2015

Keywords

Comments

Observe that many "safe" three-pile positions in Nim (1-2-3, 1-4-5, 2-4-6, etc.) consist of one pile whose size is the sum of the sizes of the other two. The "Break" move is designed to trivially defeat these positions by breaking the large pile into copies of the other two. This leaves a clear winning position where every pile has a "twin".
Like the standard Nimsum function defined in A003987, this relation constitutes an Abelian group over nonnegative integers where every element is its own inverse.

Examples

			The square table defining the relation begins:
0  1  2  3  4  5  6  7  8  9   ...
1  0  4  5  2  3  8  9  6  7   ...
2  4  0  6  1  8  3 10  5 12   ...
3  5  6  0  8  1  2 11  4 13   ...
4  2  1  8  0  6  5 12  3 10   ...
5  3  8  1  6  0  4 13  2 11   ...
6  8  3  2  5  4  0 14  1 16   ...
7  9 10 11 12 13 14  0 16  1   ...
8  6  5  4  3  2  1 16  0 14   ...
9  7 12 13 10 11 16  1 14  0   ...
.  .  .  .  .  .  .  .  .  .
Reading from the table, 1-2-4, 1-3-5 and 2-3-6 are safe positions in Take-or-Break Nim.
		

Crossrefs

Cf. A003987.

Programs

  • PARI
    flip(x) = if (x==0, 0, if (x % 2, x+1, x-1));
    tabl(nn) = {for (n=0, nn, for (k=0, nn, print1(flip(bitxor(flip(n), flip(k))), ", ");); print(););} \\ Michel Marcus, Apr 23 2015

Formula

NSum(x,y) = Flip(Flip(x) XOR Flip(y))
Where XOR is the bitwise exclusive OR characteristic of A003987.
Flip(n) = 0 if n == 0.
= n+1 if n is odd.
= n-1 if n is even.

A215508 Smallest m such that the period of the continued fraction of sqrt(m) is A215485(n); records of A013646.

Original entry on oeis.org

1, 2, 3, 41, 58, 106, 193, 337, 586, 949, 1061, 1117, 1153, 1249, 1669, 2381, 3733, 5857, 6577, 6781, 8389, 11173, 14293, 15817, 17137, 17209, 23017, 37921, 38377, 46261, 47293, 56929, 82561, 90121, 113173, 122401, 148957, 151057, 161149, 163729, 193873, 206209, 225769, 322513, 497473, 576529, 676129, 686893, 706621, 862921, 946489, 992281, 1032649, 1198081, 1597033, 1655677, 1779409, 1930021, 2299489, 2367481, 2584081, 3209281, 3528409, 3933073, 4068241, 4160521, 4283689, 4726009, 4833901
Offset: 0

Author

Patrick McKinley, Aug 13 2012

Keywords

Comments

The continued fractions of these numbers have the "hard to get" lengths listed in sequence A215485. They fill the last gaps in the table when computing A013646.

Examples

			The lengths of the continued fractions of sqrt(1), sqrt(2), sqrt(3) and sqrt(41) are 0, 1, 2 and 3 respectively. The rest of the sequence follows A215485 similarly.
		

Crossrefs

Formula

a(n) = A013646(A215485(n)). - Pontus von Brömssen, Nov 24 2024

A215485 Periods of square root continued fractions at which A013646 sets a new record.

Original entry on oeis.org

0, 1, 2, 3, 7, 9, 13, 19, 23, 27, 35, 41, 43, 45, 53, 55, 71, 77, 101, 127, 129, 135, 147, 163, 169, 189, 199, 201, 247, 283, 335, 353, 367, 459, 465, 503, 537, 587, 625, 637, 643, 739, 767, 827, 1009, 1135, 1325, 1423, 1433, 1543, 1561, 1775, 1781, 1951, 2011
Offset: 0

Author

Patrick McKinley, Aug 12 2012

Keywords

Comments

Each term of this sequence takes a turn at being the smallest unknown period for a square root continued fraction. Periods 1 and 2 are seen as the periods of sqrt(2) and sqrt(3) respectively, but a period of 3 is not seen until sqrt(41).
By convention, the period for perfect squares (e.g., 1) is 0.
Open question: Are there any more even terms after the 2?

Examples

			When a square root continued fraction with a period of 3 is first seen (at sqrt(41)), the lowest period not yet seen is 7, which first occurs as the period of sqrt(58).
		

Crossrefs

Cf. A013646.

A215160 Odd numbers n with the property that the binary representation of n is the same as the decimal representation of the smallest multiple of n that can be represented with only 1's and 0's.

Original entry on oeis.org

1, 21, 2231, 28261, 611123, 1200341, 3427673, 2202416417, 11102657671
Offset: 1

Author

Patrick McKinley, Aug 05 2012

Keywords

Comments

All numbers that are a power of 2 times a member of the sequence share the property that the binary representation is the same as the decimal representation of the first 1's and 0's multiple.
Of the values listed, only 1200341 and 3427673 are primes. - Jonathan Vos Post, Aug 09 2012

Examples

			For example 21*481=10101 (the first multiple of 21 containing only 1's and 0's) and the binary representation of 21 is 10101.
		

Crossrefs

Cf. A079339.

Programs

  • Maple
    rebase := proc(n,bin,bout)
        local a,c,i;
        a := 0 ;
        c := convert(n,base,bin) ;
        add( op(i,c)*bout^(i-1),i=1..nops(c)) ;
    end proc:
    isA079339 := proc(n,c)
        local c2,b;
        if modp(c,n) > 0 then
            return false;
        end if;
        c2 := rebase(c,10,2) ;
        for b from 1 to c2-1 do
            if modp( rebase(b,2,10),n) = 0 then
                return false;
            end if;
        end do:
        return true ;
    end proc:
    for n from 1 by 2 do
        sb := rebase(n,2,10) ;
        if isA079339(n,sb) then
            print(n);
        end if;
    end do: # R. J. Mathar, Aug 09 2012

Formula

{odd n: n*A079339(n) = A007088(n)} . - R. J. Mathar, Aug 09 2012