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.

Previous Showing 21-30 of 123 results. Next

A171897 Numbers in the van Eck sequence A181391 in order of first appearance.

Original entry on oeis.org

0, 1, 2, 6, 5, 4, 3, 9, 14, 15, 17, 11, 8, 42, 20, 32, 18, 7, 31, 33, 56, 19, 37, 46, 23, 21, 25, 52, 13, 62, 40, 36, 16, 27, 10, 92, 51, 131, 39, 12, 44, 34, 97, 82, 43, 98, 152, 170, 24, 29, 45, 84, 70, 58, 144, 94, 78, 26, 38, 76, 166, 111, 145, 206, 194
Offset: 1

Views

Author

N. J. A. Sloane, Oct 19 2010

Keywords

Crossrefs

Cf. A181391.

A171915 Van Eck sequence (cf. A181391) starting with a(1) = 5.

Original entry on oeis.org

5, 0, 0, 1, 0, 2, 0, 2, 2, 1, 6, 0, 5, 12, 0, 3, 0, 2, 9, 0, 3, 5, 9, 4, 0, 5, 4, 3, 7, 0, 5, 5, 1, 23, 0, 5, 4, 10, 0, 4, 3, 13, 0, 4, 4, 1, 13, 5, 12, 35, 0, 8, 0, 2, 36, 0, 3, 16, 0, 3, 3, 1, 16, 5, 16, 2, 12, 18, 0, 10, 32, 0, 3, 12, 7, 46, 0, 5, 14, 0, 3, 8, 30, 0, 4, 40, 0, 3, 7
Offset: 1

Views

Author

N. J. A. Sloane, Oct 22 2010

Keywords

Comments

A van Eck sequence is defined recursively by a(n+1) = min { k > 0 | a(n-k) = a(n) } or 0 if this set is empty, i.e., a(n) does not appear earlier in the sequence. - M. F. Hasler, Jun 15 2019

Crossrefs

Cf. A181391, A171911, ..., A171918 (same but starting with 0, 1, ..., 8).

Programs

  • PARI
    A171915_vec(N, a=5, i=Map())={vector(N, n, a=if(n>1, iferr(n-mapget(i, a), E, 0)+mapput(i, a, n), a))} \\ M. F. Hasler, Jun 15 2019
  • Python
    A171915_list, l = [5, 0], 0
    for n in range(1, 10**4):
        for m in range(n-1, -1, -1):
            if A171915_list[m] == l:
                l = n-m
                break
        else:
            l = 0
        A171915_list.append(l) # Chai Wah Wu, Jan 02 2015
    

Extensions

Name and other sections edited by M. F. Hasler, Jun 15 2019

A171917 Van Eck sequence (cf. A181391) starting with a(1) = 7.

Original entry on oeis.org

7, 0, 0, 1, 0, 2, 0, 2, 2, 1, 6, 0, 5, 0, 2, 6, 5, 4, 0, 5, 3, 0, 3, 2, 9, 0, 4, 9, 3, 6, 14, 0, 6, 3, 5, 15, 0, 5, 3, 5, 2, 17, 0, 6, 11, 0, 3, 8, 0, 3, 3, 1, 42, 0, 5, 15, 20, 0, 4, 32, 0, 3, 11, 18, 0, 4, 7, 66, 0, 4, 4, 1, 20, 16, 0, 6, 32, 17, 36, 0, 5, 26, 0, 3, 22, 0, 3, 3, 1, 17
Offset: 1

Views

Author

N. J. A. Sloane, Oct 22 2010

Keywords

Comments

A van Eck sequence is defined recursively by a(n+1) = min { k > 0 | a(n-k) = a(n) } or 0 if this set is empty. - M. F. Hasler, Jun 15 2019

Crossrefs

Cf. A181391, A171911, ..., A171918 (same but starting with 0, 1, ..., 8).

Programs

  • PARI
    A171917_vec(N, a=7, i=Map())={vector(N, n, a=if(n>1, iferr(n-mapget(i, a), E, 0)+mapput(i, a, n), a))} \\ M. F. Hasler, Jun 15 2019
    
  • Python
    from itertools import count, islice
    def A171917gen(): # generator of terms
        b, bdict = 7, {7:(1,)}
        for n in count(2):
            yield b
            if len(l := bdict[b]) > 1:
                b = n-1-l[-2]
            else:
                b = 0
            if b in bdict:
                bdict[b] = (bdict[b][-1],n)
            else:
                bdict[b] = (n,)
    A171917_list = list(islice(A171917gen(),20)) # Chai Wah Wu, Dec 21 2021

Formula

a(n+1) = A181391(n) until the first occurrence of a(1) = 7 in A181391. - M. F. Hasler, Jun 15 2019

Extensions

Name edited and cross-references added by M. F. Hasler, Jun 15 2019

A171957 Partial sums of A181391.

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 5, 7, 8, 14, 14, 19, 19, 21, 27, 32, 36, 36, 41, 44, 44, 47, 49, 58, 58, 62, 71, 74, 80, 94, 94, 100, 103, 108, 123, 123, 128, 131, 136, 138, 155, 155, 161, 172, 172, 175, 183, 183, 186, 189, 190, 232, 232, 237, 252, 272, 272, 276, 308, 308, 311, 322, 340, 340
Offset: 1

Views

Author

N. J. A. Sloane, Nov 02 2010

Keywords

A171958 First differences of A181391.

Original entry on oeis.org

0, 1, -1, 2, -2, 2, 0, -1, 5, -6, 5, -5, 2, 4, -1, -1, -4, 5, -2, -3, 3, -1, 7, -9, 4, 5, -6, 3, 8, -14, 6, -3, 2, 10, -15, 5, -2, 2, -3, 15, -17, 6, 5, -11, 3, 5, -8, 3, 0, -2, 41, -42, 5, 10, 5, -20, 4, 28, -32, 3, 8, 7, -18, 4, 3, -7, 3, 4, -4, -1, 29, -31, 6, 25, -28, 3, -3, -1, 6, 25, -33, 9, 47, -56, 3, 5, -1, 12, -19, 5, 32, -37, 3
Offset: 1

Views

Author

N. J. A. Sloane, Nov 02 2010

Keywords

Crossrefs

Cf. A181391.

A175041 Length of longest A181391-suffix other than 11...1 with entries (0 <= a(n) <= d).

Original entry on oeis.org

2, 4, 9, 12, 15, 19, 24, 28, 33, 41, 45, 49, 54, 61
Offset: 0

Views

Author

N. J. A. Sloane, Dec 02 2010

Keywords

Comments

A sequence is an "A181391-suffix" if it satisfies the following definition, which is less stringent than that of A181391. For n>=1, if there exists an m < n such that a(m) = a(n), take the largest such m and set a(n+1) = n-m; otherwise set a(n+1) either to 0 or to a number >= n.
The motivation for calling this an "A181391-suffix" is that we treat n <= 0 as a kind of unknown prefix - each entry has to be consistent with some prefix, but we don't require the same prefix for all values.
This sequence arises when searching for possible cycles in sequences generated by the rule in A181391.
For example, 1 2 2 1 3 5 is an A181391-suffix, since the sample prefixes below justify the *'d entries:
....0.0.|.1*.2.2.1.3.5
....1.x.|.1.2*.2.1.3.5
......2.|.1.2.2*.1.3.5
......3.|.1.2.2.1.3.5*
Clearly, any continuation, including any cycle, from any starting point, is an A181391-suffix.

Examples

			d  length  lex-min seq
0   2      0 0
1   4      0 0 1 0
2   9      0 0 1 0 2 0 2 2 1
3  12      1 0 0 1 3 0 3 2 0 3 3 1
4  15      0 2 3 0 3 2 4 0 4 2 4 2 2 1 0
5  19      0 1 3 5 4 0 5 3 5 2 0 5 3 5 2 5 2 2 1
6  24      2 1 0 3 0 2 5 0 3 5 3 2 6 0 6 2 4 0 4 2 4 2 2 1
7  28      0 0 1 0 2 7 0 3 0 2 5 0 3 5 3 2 6 0 6 2 4 0 4 2 4 2 2 1
8  33      3 7 2 5 6 7 4 7 2 6 5 7 4 6 4 2 7 5 7 2 4 6 8 0 0 1 0 2 8 6 8 2 4
9  41      2 0 2 2 1 5 0 5 2 5 2 2 1 8 0 8 2 5 8 3 0 6 0 2 7 0 3 7 3 2 6 9 0 7 6 4 0 4 2 9 8
10 45      9 5 0 7 6 6 1 0 5 7 6 5 3 0 6 4 0 3 5 7 10 0 5 4 8 0 4 3 10 8 5 8 2 0 8 3 8 2 5 8 3 5 3 2 6
11 49      7 4 6 7 3 5 0 7 4 7 2 11 0 6 11 3 11 2 7 9 0 8 0 2 6 11 9 7 9 2 6 6 1 0 11 9 7 9 2 9 2 2 1 10 0 11 11 1 5
12 54      7 4 6 7 3 12 0 7 4 7 2 11 0 6 11 3 11 2 7 9 0 8 0 2 6 11 9 7 9 2 6 6 1 0 11 9 7 9 2 9 2 2 1 10 0 11 11 1 5 0 5 2 10 9
13 61      4 5 2 0 12 5 4 6 10 12 5 5 1 0 10 6 8 0 4 12 10 6 6 1 11 0 8 10 7 0 4 12 12 1 10 7 7 1 4 8 13 0 12 10 9 0 4 8 8 1 12 8 3 0 8 3 3 1 8 4 13
		

References

Crossrefs

A200780 a(n) = number of i in the range 1 <= i <= n such that b(i)=b(n), where b is the sequence A181391 taken with offset 1.

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 2, 3, 2, 1, 5, 1, 6, 4, 2, 2, 1, 7, 3, 1, 8, 2, 5, 1, 9, 2, 2, 3, 3, 1, 10, 4, 4, 4, 1, 11, 5, 5, 6, 6, 1, 12, 5, 1, 13, 6, 1, 14, 7, 8, 3, 1, 15, 7, 2, 1, 16, 3, 1, 17, 9, 2, 1, 18, 4, 1, 19, 10, 2, 11, 7, 1, 20, 6, 2, 12, 7, 13, 8, 2, 1, 21, 3, 1, 22, 14, 3, 3, 1, 23, 8, 1, 24, 15, 4, 5, 4
Offset: 1

Views

Author

N. J. A. Sloane, Nov 22 2011

Keywords

Comments

Equivalently, this is the ORDINAL transform of Van Eck's sequence A181391. - N. J. A. Sloane, Apr 09 2020

Crossrefs

Cf. A181391.

Programs

  • Maple
    # The ORDINAL transform of a sequence a[0], a[1], a[2], ... is the sequence b[0], b[1], b[2], ... where b[n] is the number of times a[n] has occurred in [a[0], ..., a[n]].
    ORDINAL:=proc(a)  local b,t1,tlist,clist,n,t,nt;
    if whattype(a) <> list then RETURN([]); fi:
    t1:=nops(a);
    tlist:=[];
    clist:=Array(1..t1,0);
    b:=[]; nt:=0;
    for n from 1 to t1 do t:=a[n];
    if member(t,tlist,'p') then clist[p] := clist[p]+1; b:=[op(b),clist[p]];
    else nt:=nt+1; tlist:=[op(tlist),t]; clist[nt]:=1; b:=[op(b),1]; fi;
    od: b; end: # N. J. A. Sloane, Apr 09 2020
    See also A200779.

A308721 Locations of the first occurrence of pair (0,n) in the van Eck sequence (A181391).

Original entry on oeis.org

0, 1, 3, 20, 24, 10, 30, 276, 388, 81, 225, 726, 2935, 1408, 7718, 5624, 5680, 85998, 26706, 546290, 1112929, 702575, 3425417, 10537360, 21301906, 217230900, 108698091, 32381774, 846522986, 851764846, 11692311325, 46163898987
Offset: 0

Views

Author

Tomas Rokicki, Jun 19 2019

Keywords

Comments

a(33) = 118456929919 and a(34) = 250327022558 but we do not yet know a(32).

Examples

			For a(5)=10, the pair (0,5) first occurs in A181391 at element 10.
		

Crossrefs

Cf. A181391.

Programs

  • Mathematica
    With[{s = Nest[# /. {{Longest[p___], a_, q___, a_} :> {p, a, q, a, Length[{a, q}]}, {a___} :> {a, 0}} &, {}, 10^3]}, TakeWhile[#, # > -1 &] &@ Array[If[Length@ # == 0, -1, #[[1, 1]] - 1 ] &@ SequencePosition[s, {0, #}] &, Max@ s, 0]] (* Michael De Vlieger, Jul 08 2019, after JungHwan Min at A181391 *)

A309363 Van Eck's sequence (cf. A181391), but outputting 2 for a new number, not 0.

Original entry on oeis.org

0, 2, 2, 1, 2, 2, 1, 3, 2, 3, 2, 2, 1, 6, 2, 3, 6, 3, 2, 4, 2, 2, 1, 10, 2, 3, 8, 2, 3, 3, 1, 8, 5, 2, 6, 18, 2, 3, 8, 7, 2, 4, 22, 2, 3, 7, 6, 12, 2, 5, 17, 2, 3, 8, 15, 2, 4, 15, 3, 6, 13, 2, 6, 3, 5, 15, 8, 13, 7, 23, 2, 9, 2, 2, 1, 44
Offset: 1

Views

Author

Nicholas FitzGerald, Jul 25 2019

Keywords

Comments

After the initial value, the sequence is extended by a(n+1) = min { k > 0: a(n-k) = a(n) } or 2 if no such k exists, i.e., if a(n) did not appear earlier.
Although the sequence has properties that are superficially similar to the original A181391, there is an important difference. Using a positive number m instead of 0 to mark a new value means there is no 1-to-1 correspondence between the occurrence of a new value and the occurrence of m. - Jan Ritsema van Eck, Aug 14 2019

Crossrefs

Cf. A181391, A171911, ..., A171918 (same but starting with 0, 1, 2, ..., 8 and returning 0 when a new term appears).

Programs

  • Python
    from itertools import count, islice
    def A309363gen(): # generator of terms
        b, bdict = 0, {0:(1,)}
        for n in count(2):
            yield b
            if len(l := bdict[b]) > 1:
                b = n-1-l[-2]
            else:
                b = 2
            if b in bdict:
                bdict[b] = (bdict[b][-1],n)
            else:
                bdict[b] = (n,)
    A309363_list = list(islice(A309363gen(),20)) # Chai Wah Wu, Dec 21 2021

A333211 Variation of Van Eck's sequence A181391: a(n+1) = the minimum positive offset m from a(n) such that a(n-m-1)*a(n-m) = a(n-1)*a(n); a(n+1)=0 if no such m exists. Start with a(1) = a(2) = 0.

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 2, 1, 0, 2, 1, 3, 0, 3, 1, 3, 1, 1, 13, 0, 6, 1, 0, 2, 1, 14, 0, 3, 1, 12, 0, 3, 1, 4, 0, 3, 1, 4, 4, 0, 4, 1, 4, 1, 1, 27, 0, 6, 1, 27, 4, 0, 4, 1, 10, 0, 3, 1, 21, 0, 3, 1, 4, 9, 0, 4, 1, 4, 1, 1, 25, 0, 6, 1, 25, 4, 0, 4, 1, 10, 25
Offset: 1

Views

Author

Scott R. Shannon, Mar 11 2020

Keywords

Comments

After 100 million terms the smallest number not appearing is 179549, while the smallest product of adjacent terms not appearing is 2969.

Examples

			a(3) = 0 as a(1)*a(2) = 0*0 = 0, which has not previously appeared as the product of two adjacent terms.
a(4) = 1 as a(2)*a(3) = 0*0 = 0, which equals the product a(1)*a(2), one term back from a(3).
a(5) = 1 as a(3)*a(4) = 0*1 = 0, which equals the product a(2)*a(3), one term back from a(3).
a(6) = 0 as a(4)*a(5) = 1*1 = 1, which has not previously appeared as the product of two adjacent terms.
a(19) = 13 as a(17)*a(18) = 1*1 = 1, which equals the product a(4)*a(5), thirteen terms back from a(18).
		

Crossrefs

Previous Showing 21-30 of 123 results. Next