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-3 of 3 results.

A179070 a(1)=a(2)=a(3)=1, a(4)=3; thereafter a(n) = a(n-1) + a(n-3).

Original entry on oeis.org

1, 1, 1, 3, 4, 5, 8, 12, 17, 25, 37, 54, 79, 116, 170, 249, 365, 535, 784, 1149, 1684, 2468, 3617, 5301, 7769, 11386, 16687, 24456, 35842, 52529, 76985, 112827, 165356, 242341, 355168, 520524, 762865, 1118033, 1638557, 2401422, 3519455, 5158012, 7559434
Offset: 1

Views

Author

Mark Dols, Jun 27 2010

Keywords

Comments

Also (essentially), coordination sequence for (2,4,infinity) tiling of hyperbolic plane. - N. J. A. Sloane, Dec 29 2015
Column sums of shifted (1,2) Pascal array:
1 1 1 1 1 1 1 1 1
......2 3 4 5 6 7
............2 5 9
.................
----------------- +
1 1 1 3 4 5 8 ...
a(n+1) is the number of multus bitstrings of length n with no runs of 2 0's. - Steven Finch, Mar 25 2020
From Areebah Mahdia and Greg Dresden, Jun 13 2020: (Start)
For n >= 5, a(n) gives the number of ways to tile the following board of length n-3 with squares and trominos:
.
|||
|||_ _ _
|||_|||_|_| ... . (End)

Crossrefs

Programs

Formula

a(n) = A000930(n-1) + A000930(n-4).
G.f.: x - x^2*(1+2*x^2) / ( -1+x+x^3 ). - R. J. Mathar, Oct 30 2011
a(n) = A000930(n-2)+2*A000930(n-4) for n>3. - R. J. Mathar, May 19 2024

Extensions

Simpler definition from N. J. A. Sloane, Aug 29 2013

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

A214809 A214330 prefixed by a 0 consists of a concatenation of strings 0111010(01)^n, each such string ending with n >= 0 copies of 10; sequence gives successive values of n.

Original entry on oeis.org

2, 1, 0, 4, 0, 3, 0, 0, 1, 1, 3, 1, 6, 4, 0, 0, 0, 4, 2, 0, 1, 2, 4, 2, 1, 1, 0, 0, 7, 0, 0, 3, 0, 1, 0, 8, 1, 5, 0, 0, 3, 1, 0, 1, 0, 0, 1, 1, 4, 0, 0, 1, 1, 0, 0, 0, 0, 3, 1, 1, 2, 0, 2, 2, 0, 1, 5, 1, 3, 2, 0, 0, 4, 0, 0, 1, 2, 5, 8, 6, 4, 11, 3, 8, 0, 0, 1, 0, 6, 4, 2, 1, 0, 0, 2, 9, 5, 1, 0, 0, 2, 0, 0, 3, 3, 1, 5, 3, 2, 7, 5, 0, 4, 0, 5, 0, 1, 1, 2, 0
Offset: 1

Views

Author

N. J. A. Sloane, Jul 30 2012

Keywords

Comments

If we change the three initial terms of A214551 (as in A214331 and A214626), again read the sequence mod 2, and decompose the result into strings 0111010(01)^n, will the sequence of values of n have anything in common with the current sequence? Is A214809 in any way characteristic of this family of sequences?

Examples

			Let s = 0111010. Then 0, A214330 starts
s1010s10ss10101010ss101010sss10s10s101010s10s101010101010s10101010ssss101\
01010s1010ss10s1010s10101010s1010s10s10sss10101010101010sss101010ss10ss10\
10101010101010s10s1010101010sss101010s10ss10sss10s10s10101010sss10s10ssss\
s101010s10s10s1010ss1010s1010ss10s1010101010s10s101010s1010sss10101010sss\
..., in which the successive numbers of 10's are 2, 1, 0, 4, 0, 3, 0, 0, ...
		

Crossrefs

Programs

  • Shell
    # Using b-file for A214330, condense 10000 terms into one long string; prefix with 0.
    # Using vi, s/0111010/s/g; then s/10/a/g;
    # Using tr, break up so that there is one s per line.
    # Using awk, count the a's per line.
Showing 1-3 of 3 results.