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.

A214324 Records in A214323.

Original entry on oeis.org

1, 2, 3, 7, 8, 11, 36, 415, 1229, 2545, 16721, 82940, 85992, 128925
Offset: 1

Views

Author

N. J. A. Sloane, Jul 23 2012

Keywords

Crossrefs

Extensions

a(12) from Reinhard Zumkeller, Jul 24 2012
a(13)-a(14) from Jinyuan Wang, Jul 25 2021

A214325 Where records occur in A214323.

Original entry on oeis.org

0, 6, 7, 15, 33, 47, 48, 133, 469, 1859, 2957, 15885, 113697, 403185
Offset: 1

Views

Author

N. J. A. Sloane, Jul 23 2012

Keywords

Crossrefs

Extensions

a(12) from Reinhard Zumkeller, Jul 24 2012
a(13)-a(14) from Jinyuan Wang, Jul 25 2021

A339861 Lengths of runs of ones in A214323.

Original entry on oeis.org

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

Views

Author

Alex Hall, Apr 24 2021

Keywords

Comments

0 means two consecutive terms greater than 1 in A214323, so that every 'run' is separated by exactly one number greater than one.
Equivalently, this gives the lengths of runs of consecutive numbers in A214653 (ignoring the zeros in this sequence), indicating consecutive coprime pairs (A214551(n-1), A214551(n-2)), which lead to A214551 increasing (although it can also increase after a non-coprime pair).
Empirically, the most common term is 1, then 0, then 6, but provably there is no term higher than 6. This can be understood by looking at A214330 and the state diagram. The state 010 (a pair of even numbers in A214551) is always separated by exactly 1 or 6 other states, i.e., even divisors in A214323 are always separated by exactly 1 or 6 odd divisors.
If instead you consider runs of ones in gcd( A000930(n-1), A000930(n-3) ) (i.e., don't divide by the gcd but still observe it) then the maximum run length of ones is still provably 6, but empirically longer runs appear consistently less often than shorter runs as you'd expect.
All of this applies regardless of the three starting terms used in A214551 or A000930, unless they all share a common divisor.

Examples

			The runs of ones in A214323 are:
(1, 1, 1, 1, 1, 1), 2,() 3,() 2,() 3,() 2, (1, 1, 1, 1), 7,() 3,() 2,() 3,() 4, (1, 1, 1, 1, 1, 1), 4, (1), 5, (1, 1, 1, 1), 8, (1), 2, (1), 6, (1), 4,() 5,() 4, ...
Giving the terms:
6, 0, 0, 0, 0, 4, 0, 0, 0, 0, 6, 1, 4, 1, 1, 1, 0, 0, ...
Similarly the runs of consecutive numbers in A214653 are:
(0, 1, 2, 3, 4, 5), (11, 12, 13, 14), (20, 21, 22, 23, 24, 25), (27), (29, 30, 31, 32), (34), (36), (38), ...
		

Crossrefs

Programs

  • Python
    import math
    a3 = a2 = a1 = 1
    last_position = 0
    run_lengths = []
    for position in range(4, 20000):
        gcd = math.gcd(a1, a3)
        if gcd > 1:
            run_length = position - last_position - 1
            run_lengths.append(run_length)
            last_position = position
        a3, a2, a1 = a2, a1, (a1 + a3) // gcd
    print(run_lengths)

A214551 Reed Kelly's sequence: a(n) = (a(n-1) + a(n-3))/gcd(a(n-1), a(n-3)) with a(0) = a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 3, 2, 3, 2, 2, 5, 7, 9, 14, 3, 4, 9, 4, 2, 11, 15, 17, 28, 43, 60, 22, 65, 25, 47, 112, 137, 184, 37, 174, 179, 216, 65, 244, 115, 36, 70, 37, 73, 143, 180, 253, 36, 6, 259, 295, 301, 80, 75, 376, 57, 44, 105, 54, 49, 22, 38, 87, 109, 147
Offset: 0

Views

Author

Reed Kelly, Jul 20 2012

Keywords

Comments

Like Narayana's Cows sequence A000930, except that the sums are divided by the greatest common divisor (gcd) of the prior terms.
It is a strong conjecture that 8 and 10 are missing from this sequence, but it would be nice to have a proof! See A214321 for the conjectured values. [I have often referred to this as "Reed Kelly's sequence" in talks.] - N. J. A. Sloane, Feb 18 2017

Examples

			a(14)=9, a(16)=3, therefore a(17)=(9+3)/gcd(9,3) = 12/3 = 4.
a(24)=28, a(26)=60, therefore a(27)=(28+60)/gcd(28,60) = 88/4 = 22.
		

Crossrefs

Similar to A000930. Cf. A341312, A341313, which are also similar.
Starting with a(2) = 3 gives A214626. - Reinhard Zumkeller, Jul 23 2012

Programs

  • Haskell
    a214551 n = a214551_list !! n
    a214551_list = 1 : 1 : 1 : zipWith f a214551_list (drop 2 a214551_list)
       where f u v = (u + v) `div` gcd u v
    -- Reinhard Zumkeller, Jul 23 2012
    
  • Maple
    a:= proc(n) a(n):= `if`(n<3, 1, (a(n-1)+a(n-3))/igcd(a(n-1), a(n-3))) end:
    seq(a(n), n=0..100); # Alois P. Heinz, Oct 18 2012
  • Mathematica
    t = {1, 1, 1}; Do[AppendTo[t, (t[[-1]] + t[[-3]])/GCD[t[[-1]], t[[-3]]]], {100}]
    f[l_List] := Append[l, (l[[-1]] + l[[-3]])/GCD[l[[-1]], l[[-3]]]]; Nest[f, {1, 1, 1}, 62] (* Robert G. Wilson v, Jul 23 2012 *)
    RecurrenceTable[{a[0]==a[1]==a[2]==1,a[n]==(a[n-1]+a[n-3])/GCD[ a[n-1], a[n-3]]},a,{n,70}] (* Harvey P. Dale, May 06 2014 *)
  • PARI
    first(n)=my(v=vector(n+1)); for(i=1,min(n,3),v[i]=1); for(i=4,#v, v[i]=(v[i-1]+v[i-3])/gcd(v[n-1],v[i-3])); v \\ Charles R Greathouse IV, Jun 21 2017
    
  • Perl
    use bignum;
    my @seq = (1, 1, 1);
    print "1 1\n2 1\n3 1\n";
    for ( my $i = 3; $i < 400; $i++ )
    {
        my $next = ( $seq[$i-1] + $seq[$i-3] ) /
            gcd( $seq[$i-1], $seq[$i-3] );
        my $ind = $i+1;
        print "$ind $next\n";
        push( @seq, $next );
    }
    sub gcd {
        my ($x, $y) = @_;
        ($x, $y) = ($y, $x % $y) while $y;
        return $x;
    }
    
  • Python
    from math import gcd
    def aupton(nn):
        alst = [1, 1, 1]
        for n in range(3, nn+1):
            alst.append((alst[n-1] + alst[n-3])//gcd(alst[n-1], alst[n-3]))
        return alst
    print(aupton(64)) # Michael S. Branicky, Mar 28 2022
  • Sage
    def A214551Rec():
        x, y, z = 1, 1, 1
        yield x
        while True:
            x, y, z =  y, z, (z + x)//gcd(z, x)
            yield x
    A214551 = A214551Rec();
    print([next(A214551) for  in range(65)])  # _Peter Luschny, Oct 18 2012
    

Formula

It appears that, very roughly, a(n) ~ constant*exp(0.123...*n). - N. J. A. Sloane, Sep 07 2012. See next comment for more precise estimate.
If a(n)^(1/n) converges the limit should be near 1.126 (see link). - Benoit Cloitre, Nov 08 2015
Robert G. Wilson v reports that at around 10^7 terms a(n)^(1/n) is about exp(1/8.4). - N. J. A. Sloane, May 05 2021

A214322 a(n) = A214551(n-1) + A214551(n-3), with a(0) = a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 6, 6, 6, 4, 5, 7, 9, 14, 21, 12, 18, 12, 8, 11, 15, 17, 28, 43, 60, 88, 65, 125, 47, 112, 137, 184, 296, 174, 358, 216, 390, 244, 460, 180, 280, 185, 73, 143, 180, 253, 396, 216, 259, 295, 301, 560, 375, 376, 456, 132, 420, 162, 98, 154, 76, 87, 109, 147, 234, 187, 334, 412, 393, 727, 933, 1326, 1169, 2102, 2544, 2441, 4543, 5815, 8256, 12799
Offset: 0

Views

Author

N. J. A. Sloane, Jul 23 2012

Keywords

Comments

A214551(n) = A214322(n)/A214323(n).

Crossrefs

Programs

  • Haskell
    a214322 n = a214322_list !! n
    a214322_list = 1 : 1 : 1 : zipWith (+) a214551_list (drop 2 a214551_list)
    -- Reinhard Zumkeller, Jul 24 2012

A214653 Where A214551(n) and A214551(n+2) are coprime.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 11, 12, 13, 14, 20, 21, 22, 23, 24, 25, 27, 29, 30, 31, 32, 34, 36, 38, 43, 44, 45, 46, 49, 50, 51, 54, 62, 63, 64, 66, 67, 69, 70, 71, 73, 74, 76, 77, 78, 79, 80, 81, 83, 85, 86, 87, 88, 89, 90, 92, 94, 95, 96, 99, 101, 103, 105, 107, 108
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 24 2012

Keywords

Comments

A214323(a(n)) = 1.

Programs

  • Haskell
    import Data.List (elemIndices)
    a214653 n = a214653_list !! (n-1)
    a214653_list = elemIndices 1 a214323_list
Showing 1-6 of 6 results.