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 81-90 of 230 results. Next

A331670 First step in Recamán's sequence (A005132) at which there are n consecutive addition steps in a row.

Original entry on oeis.org

1, 1, 1, 112, 30049, 5026070, 101309269018
Offset: 1

Views

Author

Jud McCranie, Jan 24 2020

Keywords

Examples

			A005132(111)=40, A005132(112)=152, A005132(113)=265, A005132(114)=379, A005132(115)=494 - four increasing terms starting from #111, so a(4) = 111.
		

Crossrefs

A333553 a(n) = A333552(A333551(n)): indices of terms in Recamán's sequence A005132 where the construction avoided a record-sized collision.

Original entry on oeis.org

3, 6, 7, 18, 19, 34, 67, 102, 115, 173, 190, 288, 453, 511, 677, 846, 986, 1230, 1305, 1349, 1715, 2066, 2422, 2870, 3870, 4139, 4599, 4649, 5027, 5899, 7676, 8220, 8742, 9558, 11542, 13144, 13511, 15541, 16001, 16281, 16685, 17199, 18279, 19463, 21267, 23375, 23976, 24260, 24381, 24398, 24399, 55506, 68108, 75688
Offset: 1

Views

Author

N. J. A. Sloane, May 03 2020, following a suggestion from Paul Zimmermann

Keywords

Examples

			After we have found A005132(6)=13, we attempt to subtract 7 from 13 to get a(7). However, this would give 6, which is a collision, since we already have A005132(3)=6. Furthermore, 6 is larger than any collision we have so far avoided. So 7 (the index of the term of A005132 that we were constructing), gets added to the current sequence (it is a(3)).
		

Crossrefs

A335923 A variation on Recamán's sequence (A005132): a(0) = 0, a(n) = a(n-1) - n if a(n) is nonnegative and not already in the sequence, otherwise a(n) = a(n-1) + ceiling(n/2).

Original entry on oeis.org

0, 1, 2, 4, 6, 9, 3, 7, 11, 16, 21, 10, 16, 23, 30, 15, 23, 32, 14, 24, 34, 13, 24, 36, 12, 25, 38, 52, 66, 37, 52, 68, 84, 51, 17, 35, 53, 72, 91, 111, 71, 92, 50, 72, 28, 51, 5, 29, 53, 78, 103, 129, 77, 104, 131, 76, 20, 49, 78, 19, 49, 80, 18, 50, 82, 115
Offset: 0

Views

Author

Ya-Ping Lu, Jun 29 2020

Keywords

Comments

In this sequence the forward step is reduced from n to ceiling(n/2). As a result, the number of distinct numbers in the sequence as a percentage of the biggest number in the sequence (called "coverage") is increased. For example, for n<=1000000, the number of distinct numbers in this sequence is 694811 and the biggest number is 4350902, giving a coverage of about 15.97% (694811/4350902), higher than that of A005132 (736749/5946126, or about 12.39%).
The smallest missing numbers, h1, from the first m terms of the sequence, given as h1(m), are: 3(6), 5(46), 8(74), 22(646), 33(2551), 114(6009), 166(95445), 331(591310), ... In other words, all integers less than or equal to h1 can be found in the first m+1 terms of the sequence.

Crossrefs

Programs

  • Python
    import math
    n_max = 1000000
    a_last = 0
    list1 = [a_last]
    print(0)
    for n in range(1, n_max+1):
        m = a_last - n
        if m >= 0 and m not in list1:
            a = m
        else:
            a = a_last + math.ceil(n/2)
        list1.append(a)
        print(a)
        a_last = a

A356870 a(n) = (A005132(2*n-1) + A005132(2*n))/4.

Original entry on oeis.org

1, 2, 5, 8, 8, 8, 8, 8, 17, 26, 26, 15, 15, 15, 15, 15, 48, 48, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 62, 95, 95, 95, 95, 95, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 158, 158, 158, 158, 103, 48, 161, 218, 218, 99, 99, 99, 99, 99, 35, 35, 168, 100, 100, 100
Offset: 1

Views

Author

Paul Curtz, Sep 02 2022

Keywords

Crossrefs

Programs

  • Mathematica
    r[-1] = r[0] = 0; r[n_] := r[n] = If[(d = r[n - 1] - n) >= 0 && FreeQ[Array[r, n, 0], d], d, r[n - 1] + n]; a[n_] := (r[2*n - 1] + r[2*n])/4; Array[a, 100] (* Amiram Eldar, Sep 02 2022 *)
  • PARI
    recaman(N)={ my(s, t, v=vector(N)); for(n=1, N, s=bitor(s, 1<A005132
    lista(nn) = my(v=recaman(2*nn+2)); vector(nn, k, v[2*k-1] + v[2*k])/4; \\ Michel Marcus, Sep 13 2022
    
  • Python
    from itertools import count, islice
    def A356870_gen(): # generator of terms
        b, aset = 0, set()
        for n in count(1):
            aset.add(b)
            a, b = b, c if (c:=b-n)>=0 and c not in aset else b+n
            if not n&1:
                yield a+b>>2
    A356870_list = list(islice(A356870_gen(),30)) # Chai Wah Wu, Sep 15 2022

Extensions

New name, data and offset from Michel Marcus, Sep 13 2022

A377748 a(n) = (A000217(n) - A005132(n))/2.

Original entry on oeis.org

0, 0, 0, 0, 4, 4, 4, 4, 12, 12, 22, 22, 34, 34, 48, 48, 64, 64, 64, 64, 84, 84, 106, 129, 129, 154, 154, 181, 181, 210, 210, 241, 241, 241, 241, 276, 276, 313, 351, 351, 391, 391, 433, 433, 477, 477, 523, 523, 571, 571, 621, 621, 673, 673, 727, 727, 783, 783, 841, 841
Offset: 0

Views

Author

Paul Curtz, Nov 06 2024

Keywords

Comments

a(n) is the sum of the down steps in the first n terms of Recamán's sequence A005132.

Examples

			a(0) = (0-0)/2, a(1) = (1-1)/2, a(2) = (3-3)/2, a(3) = (6-6)/2, a(4) = (10-2)/2, a(5) = (15-7)/2 ... .
		

Crossrefs

Formula

a(n) = Sum_{k=1..n} max(0, -A160356(k)).

A064970 a(1)=1; thereafter, values of n for which r(n)-r(n-1) and r(n-1)-r(n-2) have the same sign, where r(n) = A005132(n).

Original entry on oeis.org

1, 2, 3, 6, 7, 18, 19, 23, 33, 34, 38, 66, 67, 77, 101, 102, 110, 111, 113, 114, 115, 119, 120, 129, 133, 134, 136, 172, 173, 185, 189, 190, 192, 193, 196, 224, 225, 235, 287, 288, 306, 307, 339, 340, 352, 367, 405, 406, 420, 452, 453, 465, 466
Offset: 1

Views

Author

Allan Wilks, Oct 30 2001

Keywords

Examples

			E.g., going from r(4)=2 to r(5)=7 to r(6)=13 we increase twice in a row, so 6 is a member. Going from r(21)=63 to r(22)=41 to r(23)=18 we decrease twice in a row, so 23 is a member.
		

Crossrefs

Cf. A005132.

Extensions

Better description from Dean Hickerson, Feb 15 2006

A065054 Value of remainder r (see A065052) at start of n-th interval between special points in Recamán's sequence A005132.

Original entry on oeis.org

0, 1, 2, 6, 10, 19, 38, 75, 133, 247, 453, 843, 1520, 2751, 5043, 9317, 17220, 31221, 57070, 99737, 181693, 328254, 589930
Offset: 1

Views

Author

N. J. A. Sloane, Nov 06 2001

Keywords

A065055 Number of subtraction steps in n-th interval between special points in Recamán's sequence A005132.

Original entry on oeis.org

0, 0, 1, 2, 4, 9, 18, 28, 57, 101, 196, 338, 615, 1145, 2137, 3951, 7000, 12924, 21333, 40977, 73280, 130838, 222453, 376848, 718691, 1279333, 2213812, 4093786, 6874504, 12954041, 21856176, 35813344, 64747414, 104335236, 196237851, 353075057
Offset: 1

Views

Author

N. J. A. Sloane, Nov 06 2001

Keywords

Extensions

More terms from Sean A. Irvine, Aug 10 2023

A076266 Largest k such that A005132(n+2*i) = A005132(n) - i for any 0<=i<=k.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Nov 05 2002

Keywords

A169631 Recamán's sequence (A005132) written in binary.

Original entry on oeis.org

0, 1, 11, 110, 10, 111, 1101, 10100, 1100, 10101, 1011, 10110, 1010, 10111, 1001, 11000, 1000, 11001, 101011, 111110, 101010, 111111, 101001, 10010, 101010, 10001, 101011, 10000, 101100, 1111, 101101, 1110, 101110, 1001111, 1110001
Offset: 0

Views

Author

Eric Desbiaux, Mar 15 2010

Keywords

Previous Showing 81-90 of 230 results. Next