The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A335299 a(0) = 0; for n > 0, a(n) = abs(a(n-1) - n) if not already in the sequence, otherwise a(n) = a(n-1) + n. 4

%I #29 Jan 19 2021 21:57:18

%S 0,1,3,6,2,7,13,20,12,21,11,22,10,23,9,24,8,25,43,62,42,63,41,18,42,

%T 17,43,16,44,15,45,14,46,79,113,78,114,77,39,78,38,79,37,80,36,81,35,

%U 82,34,83,33,84,32,85,31,86,30,27,85,26,86,147,209,146,210

%N a(0) = 0; for n > 0, a(n) = abs(a(n-1) - n) if not already in the sequence, otherwise a(n) = a(n-1) + n.

%C This sequence is a variant of Recamán's sequence (A005132).

%C This sequence first differ from A005132 for n = 57: a(57) = 27 whereas A005132(57) = 87.

%C Up to about 1.7 million terms the sequence values are concentrated along lines of integer gradient - see the image of the first 100000 terms. However beyond that each of these lines splits into two which subsequently cross and form a pattern reminiscent of a Cat's Cradle figure. See the linked images of the first 2 million and 20 million terms. - _Scott R. Shannon_, Jan 18 2021

%H Rémy Sigrist, <a href="/A335299/b335299.txt">Table of n, a(n) for n = 0..10000</a>

%H Scott R. Shannon, <a href="/A335299/a335299_1.png">Image of the first 2 million terms</a>. Note the splitting lines beyond about 1.7 million terms.

%H Scott R. Shannon, <a href="/A335299/a335299_2.png">Image of the first 20 million terms</a>.

%H Rémy Sigrist, <a href="/A335299/a335299.png">Colored scatterplot of the sequence for n = 0..100000</a> (where the color is function of round(a(n)/n) for n > 0)

%H Rémy Sigrist, <a href="/A335299/a335299_3.png">Scatterplot of the first 500000000 terms</a> (the plot alternates phases with losanges (Cat's Cradle figures) and phases with lines that radiate from the origin)

%H Rémy Sigrist, <a href="/A335299/a335299_4.png">Colored scatterplot of the first 2000000 terms</a> (the color changes in one direction or the other according to whether one passes from a(n) to abs(a(n)-n) or to a(n)+n, with an inversion with each bounce on the X axis)

%H <a href="/index/Rea#Recaman">Index entries for sequences related to Recamán's sequence</a>

%o (PARI) { rr = 0; r = 0; for (n=0, 64, if (!bittest(rr, m=abs(r-n)), r = m, r = r+n;); rr = bitor(rr, 2^r); print1 (r", ")) }

%Y Cf. A005132, A335300.

%K nonn

%O 0,3

%A _Rémy Sigrist_, May 31 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 10:20 EDT 2024. Contains 372594 sequences. (Running on oeis4.)