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

A309813 Records in A171898.

Original entry on oeis.org

1, 2, 6, 42, 56, 131, 170, 307, 650, 1302, 2021, 2028, 2238, 2944, 3151, 4466, 7365, 7936, 9344, 17384, 23470, 28328, 30318, 31806, 36385, 37283, 40245, 48934, 89509, 108985, 113677, 123092, 173614, 295701, 300255, 311221, 363758
Offset: 1

Views

Author

Jan Ritsema van Eck, Aug 18 2019

Keywords

Comments

This is a subset of A171866 (records in A181391). Proof: each positive term m in A171866 also occurs in A181391, and the other way around, with a shift of m+1 positions. Consider a record r in A171866, which occurs in that sequence at position i; it occurs in A181391 at position i+r+1. Any larger term s>r must occur in A171866 at a position j>i (or r would not be a record), so its position in A181391, j+s+1, is larger than i+r+1. Therefore, r is also a record in A181391.

Crossrefs

Cf. A309814 (positions), A171898, A181391, A171866.

A309814 Where records occur in A171898.

Original entry on oeis.org

1, 2, 3, 9, 27, 30, 41, 56, 75, 92, 152, 187, 212, 276, 309, 442, 561, 578, 632, 746, 893, 1276, 1834, 1894, 1929, 1938, 2216, 2562, 2714, 2807, 3573, 3767, 4124, 4534, 9371, 9581, 9875
Offset: 1

Views

Author

Jan Ritsema van Eck, Aug 18 2019

Keywords

Comments

Records in A171898 (the forward van Eck transform of A181391) are a subset of A171866 (records in A181391).

Crossrefs

Formula

a(i) + A309813(i) + 1 gives the position of the corresponding record in A181391.

A181391 Van Eck's sequence: 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 a(n+1) = 0. Start with a(1)=0.

Original entry on oeis.org

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, 0, 3, 7, 3, 2, 31, 0, 6, 31, 3, 6, 3, 2, 8, 33, 0, 9, 56, 0, 3, 8, 7, 19, 0, 5, 37, 0, 3, 8, 8, 1
Offset: 1

Views

Author

Jan Ritsema van Eck, Oct 17 2010, Oct 19 2010

Keywords

Comments

The name "Van Eck's sequence" is due to N. J. A. Sloane, not the author!
Note that it is obvious from the definition that a(n) < n for all n. - N. J. A. Sloane, Jun 20 2019. Even stronger, a(n)+a(n+1) < n for all n, since the a(n+1) implies that a(n-a(n+1)) = a(n). - Jan Ritsema van Eck, Jun 30 2019
Starting with a number different from 0, for instance with 1, gives a different but similar sequence. See A171911-A171918 for examples.
Examination of the first 10^6 terms suggests that lim sup a(n)/n = 1. Cf. A171866/A171867. - David Applegate and N. J. A. Sloane, Oct 18 2010
From Jan Ritsema van Eck, Oct 25 2010: (Start)
Theorem: There are infinitely many zeros.
Proof: Suppose not. Then from a certain point on, no new terms appear, so the sequence is bounded and nonzero. Let M be the maximal term. Any block of length M determines the rest of the sequence.
But there are only M^M different blocks of length M containing the numbers 1 through M.
So a block must repeat, and so the sequence eventually becomes periodic. The periodic part does not contain any zeros.
Suppose the period has length p, and starts at term r, with a(r)=x, ..., a(r+p-1)=z, a(r+p)=x, ... There is another z after q <= p steps, which is immediately followed by q.
But this q implies that a(r-1)=z. Therefore the periodic part really began at step r-1.
Repeating this shows that the periodic part starts at a(1). But a(1)=0, and the periodic part cannot contain a 0. Contradiction. (End)
An alternative wording of the definition: For n>=1, if there exists an m < n such that a(m) = a(n), take the largest such m, otherwise take m = n; set a(n+1) = n-m. Start with a(1)=0. - Arie Bos, Dec 10 2010
Conjectures: (i) lim sup a(n)/n = 1; (ii) gaps between 0's are about log_10 n; (iii) every number eventually appears. - N. J. A. Sloane, in lecture "The OEIS: The Major Problems", Conference for 50th Anniversary of the OEIS, Rutgers University, Oct 10 2014. (Added Jun 16 2019.)
Conjecture: every pair of nonnegative integers (x,y) other than (1,1) and (x,x+1) for x>0 appear as consecutive entries (that is, a(i) = x, a(i+1) = y, for some i). - László Kozma, Aug 09 2016. Correction from Tomas Rokicki, Jun 19 2019: The pair (x,x+1) only occurs at (0,1), as it would imply distinct values x positions previously.
As mentioned in an earlier comment, for any k >= 0 there is a "van Eck" sequence E(k) starting with k and extended using the same rule (cf. A171911-A171918). The initial E(k)(1) = k is followed by at least k initial terms from this sequence A181391 = E(0): E(k)(n+1) = E(0)(n) for all n <= k and beyond, as long as E(0)(n) != k. - M. F. Hasler, Jun 11 2019
Comment from Jordan Linus, circa Jun 16 2019, from an online comment added to the Haran-Sloane video: (Start)
Theorem: limsup a(n)/sqrt(n) >= 1.
Proof: Whenever a(n)=0, either there have been sqrt(n) zeros in the sequence, thus sqrt(n) new distinct numbers (and at least one bigger than sqrt(n)), or there have been fewer than sqrt(n) zeros in the sequence, and thus there is a gap of at least sqrt(n) between two zeros (and the term after the second zero is at least sqrt(n)). So either way there is a term >= sqrt(n). (End)
The long-term behavior of the sequence E(k) appears to be the same for all k, although the individual numbers differ. Empirically modeled up to 2^25 terms of E(k) for k between 0 and 9. - Po-chia Chen, Jun 18 2019
After searching the first 318 billion entries, the smallest number not appearing is 645315850; the smallest pair not of the form (1,1), (0,a), or (x,x+1) not appearing is (268,5). - Tomas Rokicki, Jun 19 2019
Theorem: i-a(i) is unique for all i, a(i)>0. Put differently: i-a(i)<>j-a(j) for all i,j, a(i)>0 and j>i. Proof: if a(i-1)=a(j-1)=x, a(j) can be at most j-i because there is by definition not another x between a(j-1) and a(j-a(j)-1). If a(i-1)<>a(j-1), it follows that a(i-a(i)-1)<>a(j-a(j)-1). Either way i-a(i)<>j-a(j). A special case of this is that pairs (x,x+1) cannot occur for x>0 (as remarked above); similarly, triples (x,y,x+2) cannot occur and so on. Also, since a(i-a(i+1))=a(i) by definition, i-a(i+1)-a(i) is unique for all i, a(i+1) and a(i)>0. A simple example is that triples (x,y,x+1) cannot occur for y>0. Many other "impossible patterns" can be derived. - Jan Ritsema van Eck, Jul 22 2019
After 10^12 terms, the smallest number not appearing is 1732029957; the smallest pair not of the form (1,1), (0,a), or (x,x+1) not appearing is (528,5); there have been 90689534032 zeros. - Benjamin Chaffin, Sep 11 2019
Similar to E(k) above, the sequence E(k,l,...,m) could be defined as the sequence starting with k,l,...,m and continuing using Van Eck's rule. For example, E(1,1) is 1,1,1,... and has period 1. The smallest possible period greater than 1 is 42, attained by E(37, 42, 7, 42, 2, 5, 22, 42, 4, 11, 42, 3, 21, 42, 3, 3, 1, 25, 38, 42, 6, 25, 4, 14, 42, 5, 20, 42, 3, 13, 42, 3, 3, 1, 17, 36, 42, 6, 17, 4, 17, 2). More info: https://redd.it/dbdhpj - Michiel De Muynck, Sep 30 2019
If the rule a(n+1)=0 (when a(n) has not been seen before) is replaced by a(n+1)=a(a(n)) and a(0) is set to 0, then the resulting sequence is A025480. - David James Sycamore, Nov 01 2019

Examples

			We start with a(1) = 0. 0 has not appeared before, so the rule says a(2) = 0. Now 0 HAS occurred before, at a(1), which is 1 term before, so a(3) = 1. 1 has not occurred before, so a(4) = 0. 0 appeared most recently at term a(2), which is 2 terms earlier, so a(5) = 2. 2 has not occurred before, so a(6) = 0. And so on.
		

Crossrefs

Cf. A171862, A171863, A171864, A171865, A171866, A171867, A171887, A171888, A171889, A171896, A171897 (numbers in order of appearance), A171898, A171899.
Cf. also A171911-A171918 (starting with other numbers than 0), A171951-A171956, A171957, A171958, A175041, A175100, A268755, A274425, A309363 (using 2 instead of 0 to mark a new value).
A276457 and A337980 are of the same type.
Cf. A025480.

Programs

  • Haskell
    import Data.List (findIndex, unfoldr)
    import Data.Maybe (fromMaybe)
    a181391 n = a181391_list !! (n-1)
    a181391_list = 0 : (unfoldr g [0]) where
       g xs = Just (m, m : xs) where
            m = 1 + fromMaybe (-1) (findIndex (== head xs) $ tail xs)
    -- Reinhard Zumkeller, Oct 31 2011
    
  • J
    NB. see www.Jsoftware.com
    (,  # <:@- }:  i: {:)^:({.`}.) 100 0 NB. Arie Bos, Dec 10 2010
    
  • Julia
    function A181391(len)
        L = [0, 0]
        for n in 2:len
            k = findlast(m -> L[n] == L[m], 1:n-1)
            push!(L, k == nothing ? 0 : n - k)
        end
    L end
    println(A181391(96)) # Peter Luschny, May 19 2019
    
  • Maple
    M:=10000;
    a:=Array(1..M);
    last:=Array(0..M,-1);
    a[1]:=0;
    a[2]:=0;
    last[0]:=2;
    nxt:=1;
    for n from 3 to M do
    hist:=last[nxt];
    a[n]:=nxt;
    last[nxt]:=n;
    nxt:=0;
    if hist>0 then nxt:=n-hist; fi;
    od:
    [seq(a[n],n=1..M)];
    # N. J. A. Sloane, Oct 18 2010
  • Mathematica
    m = 100; ClearAll[a, last]; a[] = 0; last[] = -1; last[0] = 2; nxt = 1; Do[ hist = last[nxt]; a[n] = nxt; last[nxt] = n; nxt = 0; If[ hist > 0 , nxt = n - hist], {n, 3, m}]; Table[a[n], {n, 1, m}] (* Jean-François Alcover, Dec 01 2011, after Maple program by N. J. A. Sloane *)
    A181391L = Nest[# /. {{Longest[p___], a_, q___, a_} :> {p, a, q, a, Length[{a, q}]}, {a___} :> {a, 0}} &, {}, #] &; A181391L[97] (* JungHwan Min, Jan 14 2017 *)
  • PARI
    A181391_vec(N,a=0,i=Map())={vector(N,n,a=if(n>1,iferr(n-mapget(i,a),E,0)+mapput(i,a,n)))} \\ M. F. Hasler, Jun 11 2019
    
  • Python
    A181391 = [0,0]
    for n in range(1,10**4):
        for m in range(n-1,-1,-1):
            if A181391[m] == A181391[n]:
                A181391.append(n-m)
                break
        else:
            A181391.append(0) # Chai Wah Wu, Aug 14 2014
    
  • Python
    A181391 = [0]
    last_pos = {}
    for i in range(10**4):
        new_value = i - last_pos.get(A181391[i], i)
        A181391.append(new_value)
        last_pos[A181391[i]] = i
    # Ehsan Kia, Jun 12 2019
    
  • R
    vaneckw <-function(howmany = 100){
    howmany = round(howmany[1])
    ve = c(0,0)
    for (jj in 2:(howmany)) {
    thefind <- which(ve[1:(jj-1)] == ve[jj])
    if (length(thefind)){
    ve <- c(ve,jj-thefind[length(thefind)])
    } else ve <- c(ve,0)
    }
    return(invisible(ve))
    } #Carl Witthoft, Jun 14 2019

A159619 Slowest increasing sequence beginning with 4 such that n and a(n) are either both evil or both odious.

Original entry on oeis.org

4, 7, 9, 11, 12, 15, 16, 19, 20, 23, 25, 27, 28, 31, 33, 35, 36, 39, 41, 43, 44, 47, 48, 51, 52, 55, 57, 59, 60, 63, 64, 67, 68, 71, 73, 75, 76, 79, 80, 83, 84, 87, 89, 91, 92, 95, 97, 99, 100, 103, 105, 107, 108, 111, 112, 115, 116, 119, 121, 123, 124, 127, 129, 131, 132, 135, 137
Offset: 1

Views

Author

Vladimir Shevelev, Apr 17 2009, Apr 27 2009, May 04 2009

Keywords

Comments

(i) Theorem: For every initial value a(1) > 4, a minimum index n exists such that the a(n) obtained from that initial value coincides with this sequence here. Thus there exist essentially two slowest increasing sequences with this type of evil/odious congruence: A159615 and this one here.
(ii) In connection with this theorem, one can generalize to slowest increasing sequences a_m(n), a_m(1)=m, which let n and a(n) be at the same time in or not in some increasing sequence c(n). (This sequence here is c = A000069, m=4.)
We define a rank r of c as the minimum value a_r(1) such that for sufficiently large n (n depending on m) all sequences a_m(n), m>r, coincide with a_r(n).
In particular, c(n)=A004760(n+1) has rank r=2, and A000069 has rank r=3.
The problems are: 1) to find a sequence of rank r >= 4; 2) to find the rank of primes or to prove that it does not exist (in case of which it could be defined as infinity).
There is a conjecture arising in Sequence Machine that a(n) = A026491(2+n)-1. This appears to be true: Here we start from on odious or evil number and apply a minimum number of van-Eck-Transforms (of A171898) to reach a value larger than a(n-1). The Dekking formula in A026491 says that A026491 is essentially a partial sum of the backward van-Eck-Transforms, and in a (vague) manner this seems to match.
- R. J. Mathar, Jun 24 2021

Crossrefs

Programs

  • Maple
    read("transforms") ; isA000069 := proc(n) option remember ; RETURN( type(wt(n), 'odd') ) ; end:
    A159619 := proc(n) option remember; if n = 1 then 4; else for a from procname(n-1)+1 do if isA000069(a) = isA000069(n) then RETURN(a) ; fi; od: fi; end:
    seq(A159619(n), n=1..120) ; # R. J. Mathar, Mar 25 2010
  • Mathematica
    a[n_] := 2 * n + If[EvenQ[n] || EvenQ[IntegerExponent[n+1, 2]], 3, 2]; Array[a, 100] (* Amiram Eldar, Aug 30 2024 *)
  • PARI
    a(n) = 2 * n + if(!(n % 2) || !(valuation(n+1, 2) % 2), 3, 2); \\ Amiram Eldar, Aug 30 2024

Formula

a(n) = 2n+3 if n*A007814(n+1) is even, and a(n) = 2n+2 otherwise.

Extensions

Edited and extended by R. J. Mathar, Mar 25 2010

A171922 For definition see Comments lines.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 6, 4, 2, 11, 6, 11, 2, 4, 12, 4, 16, 11, 12, 14, 16, 6, 24, 2, 29, 9, 29, 4, 24, 12, 32, 14, 24, 11, 16, 29, 23, 6, 38, 8, 41, 26, 32, 40, 38, 16, 24, 2, 41, 43, 41, 29, 42, 12, 9, 71, 4, 11, 35, 53, 6, 11, 24, 14, 71, 23, 9, 11, 32, 35, 47, 2, 58, 24, 58
Offset: 1

Views

Author

Hugo van der Sanden and N. J. A. Sloane, Oct 23 2010, Oct 24 2010

Keywords

Comments

Constructed in an attempt to find the lexicographically earliest sequence of positive integers, not all 1's, with the property that for n >= 2, if a(n-1) = k, then min(m : a(n+m) = a(n), m > 0) = k.
However, the sequence is well-defined, even if should fail to satisfy that property.
The sequence is constructed as follows:
1) Given a(n-1) = k, we require min(m : a(n+m) = a(n), m > 0) = k.
2) If a(1) = a(2) = 1, we find by induction that a(n) = 1 for all n, so this is forbidden.
3) For n > 1, if a(n) = k then a(n+b_n(i)) = k for all i, with b_n(0) = 0 and b_n(i+1) = b_n(i) + a(n+b_n(i)-1). Hence every such k appears infinitely often.
4) Hence any a(n) not forced to be equal to a previous a(m) must have some new, never-seen-before value (or violate (1)). Whether such force exists is completely determined by the a(m): 1 <= m < n.
5) We can fully characterize a valid sequence by C = [ c_i ], the distinct values that it takes in order of first appearance. We can then generate the original sequence using (1) and (4). The desired sequence is that generated by the lexically earliest C.
6) Given a(n) = k, we must avoid a(n+m) = k-m for all m > 0, else we would have a(n+1) = a(n+1+k) = a(n+m+1), violating (1).
7) Given known a(n-1) = x, a(n+1) = y and trying to find a(n) = k, we have a(n+1) = a(n+k+1) = y. So by (6) and (3) we must avoid b_n(i) = y+1 for all i.
We make the (unproved) assumption that defending against both (6) and (7) is sufficient to avoid backtracking. That appears to work, and produces the current sequence. The associated sequence C is A171921.
The sequence has the property that its forwards van Eck transform (see A171898) is the same sequence prefixed with 0. - N. J. A. Sloane, Oct 23 2010

Crossrefs

A171899 Backwards van Eck transform of A000002.

Original entry on oeis.org

0, 0, 1, 3, 1, 3, 2, 2, 1, 3, 2, 1, 3, 1, 3, 2, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 1, 3, 2, 1, 3, 2, 2, 1, 3, 2, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 1, 3, 1, 3, 2, 1, 3, 1, 3, 2, 2, 1, 3, 2, 1, 3, 1, 3, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 1, 3, 2, 1, 3, 1, 3, 2, 2, 1, 3, 2, 1, 3, 1, 3, 2, 1, 3, 1, 3, 2, 2, 1, 3
Offset: 1

Views

Author

N. J. A. Sloane, Oct 22 2010

Keywords

Comments

Given a sequence a, the backwards van Eck transform b is defined as follows: If a(n) has already appeared in a, let a(m) be the most recent occurrence, and set b(n)=n-m; otherwise b(n)=0.
The forwards van Eck transform of A000002 is A078929.

Crossrefs

Programs

  • Maple
    ECKb:=proc(a) local b,i,m,n;
    if whattype(a) <> list then RETURN([]); fi:
    b:=[0];
    for n from 2 to nops(a) do
    # has a(n) appeared before?
    m:=0;
    for i from n-1 by -1 to 1 do
    if (a[i]=a[n]) then m:=n-i; break; fi
    od:
    b:=[op(b),m];
    od:
    RETURN(b);
    end:

A171900 Backwards van Eck transform of A010060.

Original entry on oeis.org

0, 0, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 1
Offset: 1

Views

Author

N. J. A. Sloane, Oct 22 2010

Keywords

Comments

See A171898 for definition. This assumes the offset of A010060 is taken to be 1.
A161916 gives the forwards van Eck transform of A010060.
Since A001285(n) = 1+A010060(n) differ only by a constant, this is also the Backwards van Eck Transform of A001285. - R. J. Mathar, Jun 24 2021

Crossrefs

Cf. A010060, A161916, A171898. See also A026491.

Formula

A026491(n-1)-A026491(n-2) = a(n) for n>=3. - Michel Dekking, Apr 11 2019

A171942 Forward van Eck transform of A000120.

Original entry on oeis.org

0, 1, 2, 2, 4, 1, 3, 4, 8, 1, 2, 2, 5, 1, 5, 8, 16, 1, 2, 2, 4, 1, 3, 4, 9, 1, 2, 2, 7, 1, 9, 16, 32, 1, 2, 2, 4, 1, 3, 4, 8, 1, 2, 2, 5, 1, 5, 8, 17, 1, 2, 2, 4, 1, 3, 4, 11, 1, 2, 2, 11, 1, 17, 32, 64, 1, 2, 2, 4, 1, 3, 4, 8, 1, 2, 2, 5, 1, 5, 8, 16, 1, 2, 2, 4, 1, 3, 4, 9, 1, 2, 2, 7, 1, 9, 16, 33, 1, 2, 2
Offset: 1

Views

Author

N. J. A. Sloane, Oct 25 2010

Keywords

Comments

Assumes that the offset of A000120 has been changed to 1.
Comment from Marc LeBrun, Jan 01 2014: A057168(n) - n (the difference between n and the next number with the same binary weight) matches A171942, "Forward van Eck transform of A000120" (the weight of n). Response from M. F. Hasler, Jan 01 2014: The "forward van Eck transform" is the sequence of gaps to the next term with equal value: FVE(a) = n -> min { m>0 | a(n+m)=a(n) } with the (exceptional) convention that : min {} = 0. (See A171898.) So your observation is exactly the definition.

Crossrefs

Programs

  • Haskell
    a171942 1 = 0
    a171942 n = head [m | m <- [1..], a000120 (m + n - 1) == a000120 (n - 1)]
    -- Reinhard Zumkeller, Jan 01 2014
    
  • Python
    def A171942(n): return (((n-1&~(b:=n-1+(a:=n-1&-n+1)))>>a.bit_length())^b)-n+1 # Chai Wah Wu, Mar 06 2025

A333210 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, 0, 1, 1, 0, 2, 2, 0, 2, 1, 0, 6, 0, 1, 3, 8, 0, 0, 18, 0, 1, 7, 5, 0, 0, 7, 0, 1, 7, 7, 0, 4, 17, 0, 0, 10, 0, 1, 10, 23, 0, 0, 7, 12, 0, 22, 0, 1, 10, 10, 0, 14, 22, 0, 7, 12, 12, 0, 13, 0, 1, 13, 10, 22, 0, 11, 17, 0, 34, 0, 1, 10, 6, 0, 61, 0, 1, 6, 23, 0, 17, 13, 0, 23, 4, 0, 54, 0, 1, 12
Offset: 1

Views

Author

Scott R. Shannon, Mar 11 2020

Keywords

Comments

After 100 million terms the smallest number not appearing is 381884, while the smallest sum of adjacent terms not appearing is 487833.

Examples

			a(3) = 0 as a(1)+a(2) = 0+0 = 0, which has not previously appeared as the sum of two adjacent terms.
a(4) = 1 as a(2)+a(3) = 0+0 = 0, which equals the sum a(1)+a(2), one term back from a(3).
a(5) = 0 as a(3)+a(4) = 0+1 = 1, which has not previously appeared as the sum of two adjacent terms.
a(6) = 1 as a(4)+a(5) = 1+0 = 1, which equals the sum a(3)+a(4), one term back from a(5).
a(19) = 8 as a(17)+a(18) = 1+3 = 4, which equals the sum a(9)+a(10), eight terms back from a(18).
		

Crossrefs

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

Showing 1-10 of 10 results.