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

A210607 Vertex number of an L-toothpick structure which give Recamán's sequence A005132.

Original entry on oeis.org

0, 1, 4, 9, 12, 16, 20, 25, 36
Offset: 1

Views

Author

Omar E. Pol, Mar 24 2012

Keywords

Comments

For more information see A210606.

Crossrefs

A065056 Partial sums of Recamán's sequence A005132.

Original entry on oeis.org

0, 1, 4, 10, 12, 19, 32, 52, 64, 85, 96, 118, 128, 151, 160, 184, 192, 217, 260, 322, 364, 427, 468, 486, 528, 545, 588, 604, 648, 663, 708, 722, 768, 847, 960, 1038, 1152, 1229, 1268, 1346, 1384, 1463, 1500, 1580, 1616, 1697, 1732, 1814, 1848
Offset: 0

Views

Author

N. J. A. Sloane, Nov 07 2001

Keywords

Comments

Conjecture: lim n-->oo a(n)/n^2 exists and is about 0.8... - Benoit Cloitre, May 04 2020

Crossrefs

Cf. A005132.

Programs

  • Mathematica
    rr = {0}; r[0] = 0;
    r[n_] := r[n] = Module[{r1, rn}, r1 = r[n-1]; rn = If[r1-n >= 0 && FreeQ[rr, r1-n], r1-n, r1+n]; AppendTo[rr, rn]; rn];
    Table[r[n], {n, 0, 100}] // Accumulate (* Jean-François Alcover, Aug 31 2022 *)

A274647 A variation on Recamán's sequence (A005132): to get a(n), we first try to subtract n from a(n-1): a(n) = a(n-1)-n if positive and not already in the sequence; if not then we try to add n: a(n) = a(n-1)+n if not already in the sequence; if this fails we try to subtract 2n from a(n-1), or to add 2n to a(n-1), or to subtract 3n, or to add 3n, etc., until one of these produces a positive number not already in the sequence.

Original entry on oeis.org

0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 18, 66, 91, 65, 38, 94, 123, 93, 124, 92, 59, 127, 162, 126, 89, 51, 90, 50, 132, 174, 131, 87, 177, 223, 176, 128, 79, 29, 80, 28, 81, 27, 82, 26, 83, 141, 200, 140, 201, 139
Offset: 0

Views

Author

Max Barrentine, Aug 12 2016

Keywords

Comments

Is this a permutation of the natural numbers?
After 5.4*10^11 terms, the smallest number which has not appeared is 212. There are 177 numbers under 10000 which have not appeared. - Benjamin Chaffin, Sep 29 2016

Crossrefs

Left inverse: A276342 (also right inverse, if this sequence is a permutation of nonnegative integers).
Cf. A276438 (gives k that was used when computing a(n), with sign).
Cf. A274648 (another variant).

Programs

  • Mathematica
    f[s_List] := Block[{a = b = 0, k = 1, l = s[[-1]], n = Length@ s}, While[ If[l > k*n && !MemberQ[s, l - k*n], a = l - k*n]; If[ !MemberQ[s, l + k*n], b = l + k*n; Break[]]; a == b == 0, k++]; Append[s, If[a > 0, a, b]]]; Nest[f, {0}, 70]
    (* Robert G. Wilson v, Sep 09 2016 *)
  • Python
    l=[0]
    for n in range(1, 101):
        i=1
        while True:
            a=l[n - 1]
            x=a - i*n
            if x>0 and x not in l:
                l.append(x)
                break
            y=a + i*n
            if y>0 and not y in l:
                l.append(y)
                break
            else : i+=1
    print(l) # Indranil Ghosh, Jun 03 2017

Formula

A276342(a(n)) = n for all n.

A333548 Numbers k such that A005132(k-1) = k.

Original entry on oeis.org

3, 11, 39, 248, 844, 2752, 57071, 58056875
Offset: 1

Views

Author

N. J. A. Sloane, May 01 2020

Keywords

Comments

Subtracting 1 from k gives the index of a term A005132(k-1) = k in Recamán's sequence A005132 such that subtracting k would reach 0. This is not permitted, so we must add k instead, obtaining A005132(k) = 2*k.
If A005132(k-1) = k, A005132(k) = 2*k. The converse is not always true. For example, A005132(75) = 228 and A005132(76) = 228 - 76 = 152. - Seiichi Manyama, May 02 2020

Examples

			A005132(10)=11, so 11 is a term (and A005132(11)=22).
		

Crossrefs

Programs

Extensions

a(8) from Chai Wah Wu, May 02 2020

A333549 Consider the list (A333552) of numbers m defined by property that when the Recamán term A005132(m) is being computed, we are unable to subtract m from A005132(m-1) because, although A003132(m-1) >= m, the result of the subtraction, A005132(m-1)-m, is already in A005132; sequence gives the successive values of A005132(m-1)-m.

Original entry on oeis.org

0, 1, 6, 3, 0, 7, 24, 21, 13, 45, 42, 0, 25, 90, 87, 84, 81, 78, 63, 163, 160, 157, 154, 39, 151, 264, 261, 17, 14, 11, 8, 3, 135, 114, 285, 282, 279, 276, 273, 270, 81, 78, 265, 453, 63, 46, 269, 266, 263, 260, 257, 18, 15, 12, 9, 6, 3, 0, 228, 514, 511, 508, 505, 502, 499, 496, 493, 490, 164, 502, 499, 496
Offset: 1

Views

Author

N. J. A. Sloane, May 02 2020

Keywords

Comments

These are the collisions that are avoided when A005132 is being constructed.

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. So 6 gets added to the current sequence.
		

Crossrefs

For records see A333550, A333551.

A333552 List of numbers k defined by property that when the Recamán term A005132(k) is being computed, we are unable to subtract k from A005132(k-1) because, although A003132(k-1) >= k, the result of the subtraction, A005132(k-1)-k, is already in A005132.

Original entry on oeis.org

3, 6, 7, 9, 11, 18, 19, 21, 33, 34, 36, 39, 66, 67, 69, 71, 73, 75, 101, 102, 104, 106, 108, 113, 114, 115, 117, 121, 123, 125, 127, 133, 134, 172, 173, 175, 177, 179, 181, 183, 186, 188, 189, 190, 194, 224, 225, 227, 229, 231, 233, 236, 238, 240, 242, 244, 246, 248, 287, 288, 290, 292, 294, 296, 298, 300, 302, 304
Offset: 1

Views

Author

N. J. A. Sloane, May 03 2020

Keywords

Comments

Positions k of addition steps in Recamán's sequence where A005132(k-1)-k = A005132(m) for some 0 <= m < k.
This is A187922 together with the terms in A333548. (The difference between A187922 and the present sequence is explained by the fact that originally A005132 began at 1 rather than 0.)

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. So 7 gets added to the current sequence.
		

Crossrefs

A334219 a(n) is the number of terms beyond the starting value n before a repeated number first appears when following the same rules as Recamán's sequence A005132 but starting at n instead of 0.

Original entry on oeis.org

24, 13, 21, 3, 3, 3, 15, 6, 6, 6, 15, 12, 9, 9, 9, 16, 20, 15, 12, 12, 12, 8, 10, 12, 20, 15, 15, 15, 10, 15, 24, 22, 26, 18, 18, 18, 11, 13, 18, 29, 28, 27, 21, 21, 21, 15, 13, 19, 17, 25, 31, 23, 24, 24, 24, 16, 18, 20, 21, 44, 28, 34, 34, 27, 27, 27, 17, 19, 27, 25, 24
Offset: 0

Views

Author

Scott R. Shannon, Apr 19 2020

Keywords

Comments

The first repeated number in each sequence starting from n is given in A334148.
The number of terms in each sequence starting from n required to reach a value greater than n given in A334149.
Essentially the same as A308419. - R. J. Mathar, May 06 2020

Examples

			a(0) = 24 as a(0) corresponds to the standard Recamán's sequence A005132 in which the term 42 appears at A005132(20) and then again at A005132(24), taking twenty-four terms before the first repeated number appears.
a(4) = 3 as starting from 4 the sequence of visited numbers is 4,3,1,4 and it takes three steps beyond the start value for the first repeated number 4 to appear.
a(6) = 15 as starting from 6 the sequence of visited numbers is 6,5,3,0,4,9,15,8,16,7,17,28,40,27,13,28 and it takes fifteen steps beyond the start value for the first repeated number 28 to appear.
		

Crossrefs

A064291 Record high values in Recamán's sequence A005132.

Original entry on oeis.org

0, 1, 3, 6, 7, 13, 20, 21, 22, 23, 24, 25, 43, 62, 63, 79, 113, 114, 157, 224, 225, 226, 227, 228, 265, 367, 368, 369, 370, 379, 494, 495, 631, 632, 633, 634, 635, 636, 643, 833, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1182, 1183
Offset: 0

Views

Author

N. J. A. Sloane, Sep 25 2001

Keywords

Crossrefs

Extensions

a(0)=0 added by N. J. A. Sloane, May 01 2020

A064568 n-th term in Recamán's sequence A005132 is divisible by n.

Original entry on oeis.org

1, 3, 11, 21, 39, 76, 248, 844, 1520, 2752, 9317, 17223, 31221, 57071, 99741, 589932, 58056875, 101769229, 302890748, 511561220, 904036924, 39488697700, 325374626148, 535755688021, 1404720439053, 3883018238329, 6283167591179, 16166305650060, 25735985498861, 40806937801472
Offset: 1

Views

Author

N. J. A. Sloane, Oct 16 2001

Keywords

Comments

No more terms < 4.61*10^11. - Jud McCranie, Dec 29 2019
No more terms < 6.46*10^13. - James Ewens, Sep 27 2024

Examples

			A005132(21) = 63, 63 is divisible by 21, so 21 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    With[{s = Nest[Append[#1, If[And[#3 > 0, FreeQ[#1, #3]], #3, #1[[-1]] + #2]] & @@ {#1, #2, #1[[-1]] - #2} & @@ {#, Length@ #} &, {0}, 10^5]}, Reap[Do[If[Mod[s[[i]], i] == 0, Sow[i]], {i, Length@ s - 1}]][[-1, -1]]] (* Michael De Vlieger, Dec 29 2019 *)

Extensions

Offset changed, a(1), a(22)-a(23) from Jud McCranie, Dec 29 2019
a(24)-a(30) from James Ewens, Sep 27 2024

A324784 Indices of low points in Recamán's sequence A005132 (see Comments in A309226 for definition).

Original entry on oeis.org

0, 4, 16, 31, 64, 99, 111, 131, 170, 187, 222, 285, 337, 403, 450, 508, 674, 754, 770, 843, 983, 1227, 1302, 1345, 1409, 1712, 1974, 2063, 2087, 2142, 2336, 2418, 2492, 2622, 2652, 2867, 3083, 3867, 4135, 4493, 4596, 4645, 4791, 4825, 5024, 5240, 5896, 6528, 7072, 7564, 7673, 8102
Offset: 1

Views

Author

N. J. A. Sloane, Sep 01 2019

Keywords

Crossrefs

Previous Showing 21-30 of 230 results. Next