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

A268129 If a(n) is a multiple of 3, then a(n+1) = a(n) + a(n-1). Lexicographic first permutation of the positive integers with this property.

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 10, 7, 8, 9, 17, 11, 12, 23, 13, 14, 15, 29, 16, 18, 34, 19, 20, 21, 41, 22, 24, 46, 25, 26, 27, 53, 28, 30, 58, 31, 32, 33, 65, 35, 36, 71, 37, 38, 39, 77, 40, 42, 82, 43, 44, 45, 89, 47, 48, 95, 49, 50, 51, 101, 52, 54, 106, 55, 56, 57, 113, 59, 60, 119, 61, 62, 63, 125, 64, 66, 130, 67, 68, 69, 137, 70, 72, 142, 73, 74, 75
Offset: 1

Views

Author

Keywords

Comments

A variant of the sequence A267758 where the relation has to hold for prime numbers rather than for multiples of 3. In contrast to that sequence we only have two "bands" or lines here. L. Blomberg has studies several properties of this sequence (private communication).

Programs

  • PARI
    {a(n,show=1,a=[1],L=0/*up to L all numbers are used*/,U=[]/*numbers > L already used*/)=while(#aL+1,U=setunion(U,[a[#a]]),/*else increase L and remove terms from U if possible*/ L++;while(#U&&U[1]<=L+1,U=U[^1];L++));a=concat(a,if(a[#a]%3,L+1,a[#a]+a[#a-1])));a}

A268131 If a(n) is not squarefree, then a(n+1) = a(n) + a(n-1), else a(n+1) is the smallest positive integer not occurring earlier.

Original entry on oeis.org

1, 2, 3, 4, 7, 5, 6, 8, 14, 9, 23, 10, 11, 12, 23, 13, 15, 16, 31, 17, 18, 35, 19, 20, 39, 21, 22, 24, 46, 25, 71, 26, 27, 53, 28, 81, 109, 29, 30, 32, 62, 33, 34, 36, 70, 37, 38, 40, 78, 41, 42, 43, 44, 87, 45, 132, 177, 47, 48, 95, 49, 144, 193, 50, 243
Offset: 1

Views

Author

M. F. Hasler, Jan 26 2016

Keywords

Comments

A variant of the sequence A267758 where the relation has to hold for prime numbers rather than for squarefree numbers. In contrast to that sequence we have many "lines" here (when the property occurs for consecutive terms), roughly proportional to n, 2n, 3n, ... Here we also have duplicate terms (which we could exclude explicitly), for n <= 1000 this happens 19 times.

Programs

  • PARI
    {a(n,show=0,is=x->issquarefree(x),a=[1],L=0,U=[])->while(#aL+1,U=setunion(U,[a[#a]]),L++;while(#U&&U[1]<=L+1,U=U[^1];L++));a=concat(a,if(is(a[#a]),L+1,a[#a]+a[#a-1])));if(type(show)=="t_VEC",a,a[#a])}

A268132 If a(n) is a square (and n > 1), then a(n+1) = a(n) + a(n-1), else a(n+1) is the smallest positive integer not occurring earlier.

Original entry on oeis.org

1, 2, 3, 4, 7, 5, 6, 8, 9, 17, 10, 11, 12, 13, 14, 15, 16, 31, 18, 19, 20, 21, 22, 23, 24, 25, 49, 74, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 71, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 127, 65, 66, 67, 68, 69, 70, 72, 73, 75, 76, 77, 78, 79, 80, 81, 161
Offset: 1

Views

Author

M. F. Hasler, Jan 26 2016

Keywords

Comments

A variant of the sequence A267758 where the relation has to hold for prime numbers rather than for squares.
Conjectured to be a permutation of the positive integers (which could be enforced by definition). In case there would occur a duplicate, it must be of the form a(n+1) = a(n) + a(n-1) and equal to an earlier term a(m+1) of the same form, where furthermore the predecessor a(m-1) also is of that form, since otherwise a(m+1) would be smaller than this a(n+1). This seems extremely unlikely to happen, and maybe provably impossible.

Examples

			a(26) = 25 is a square, thus followed by a(26) + a(25) = 25 + 24 = 49 which is again a square, thus followed by 49 + 25 = 74. Where is the next occurrence of two subsequent squares?
		

Programs

  • PARI
    a(n,show=0,is=x->issquare(x),a=[1],L=0,U=[])={while(#aL+1,U=setunion(U,[a[#a]]),L++;while(#U&&U[1]<=L+1,U=U[^1];L++));a=concat(a,if(!is(a[#a])||#a<2,L+1,a[#a]+a[#a-1])));if(type(show)=="t_VEC",a,a[#a])}

A268133 If a(n) is not a square, then a(n+1) = a(n) + a(n-1), else a(n+1) is the smallest positive integer not occurring earlier.

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 4, 6, 10, 16, 7, 23, 30, 53, 83, 136, 219, 355, 574, 929, 1503, 2432, 3935, 6367, 10302, 16669, 26971, 43640, 70611, 114251, 184862, 299113, 483975, 783088, 1267063, 2050151, 3317214, 5367365, 8684579, 14051944, 22736523, 36788467, 59524990, 96313457, 155838447, 252151904
Offset: 1

Views

Author

M. F. Hasler, Jan 26 2016

Keywords

Comments

A variant of the sequence A267758 where the relation has to hold for prime numbers rather than for nonsquares. The sequence starts like the Fibonacci sequence up to 144, then restarts with 4 up to 16, then it restarts from 7 and grows very large.

Programs

  • PARI
    {a(n,show=0,is=x->issquare(x),a=[1],L=0,U=[])->while(#aL+1,U=setunion(U,[a[#a]]),L++;while(#U&&U[1]<=L+1,U=U[^1];L++));a=concat(a,if(is(a[#a])||#a<2,L+1,a[#a]+a[#a-1])));if(type(show)=="t_VEC",a,a[#a])}

Formula

Empirical g.f.: (1+x-229*x^11-142*x^12-19*x^15) / (1-x-x^2). - Colin Barker, Jan 27 2016

A268134 If a(n) is squarefree (and n > 1), then a(n+1) = a(n) + a(n-1), else a(n+1) is the smallest positive integer not occurring earlier.

Original entry on oeis.org

1, 2, 3, 5, 8, 4, 6, 10, 16, 7, 23, 30, 53, 83, 136, 9, 11, 20, 12, 13, 25, 14, 39, 53, 92, 15, 107, 122, 229, 351, 17, 368, 18, 19, 37, 56, 21, 77, 98, 22, 120, 24, 26, 50, 27, 28, 29, 57, 86, 143, 229, 372, 31, 403, 434, 837, 32, 33, 65, 98, 34, 132, 35, 167, 202, 369, 36, 38, 74, 112, 40, 41, 81, 42, 123, 165
Offset: 1

Views

Author

M. F. Hasler, Jan 26 2016

Keywords

Comments

A variant of the sequence A267758 where the relation has to hold for prime numbers rather than for squarefree numbers. In contrast to that sequence we have many duplicate terms here (which we could exclude explicitely in order to get a permutation of the positive integers).

Programs

  • PARI
    {a(n,show=0,is=x->issquarefree(x),a=[1],L=0,U=[])=while(#aL+1,U=setunion(U,[a[#a]]),L++;while(#U&&U[1]<=L+1,U=U[^1];L++));a=concat(a,if(!is(a[#a])||#a<2,L+1,a[#a]+a[#a-1])));if(type(show)=="t_VEC",a,a[#a])}
Showing 1-5 of 5 results.