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!)
A362698 For n > 1, if n appears in the sequence, a(n) = a(n-1) - n if nonnegative and not already in the sequence, otherwise a(n) = a(n-1) + n. Otherwise a(n+1) = a(n)/(n+1) if (n+1)|a(n), otherwise a(n)*(n+1), a(1) = 1 and a(2) = 1*2. 1
1, 2, 6, 24, 120, 114, 798, 6384, 57456, 574560, 6320160, 526680, 6846840, 489060, 32604, 521664, 8868288, 159629184, 8401536, 168030720, 3528645120, 160392960, 3689038080, 3689038056, 92225951400, 2397874736400, 64742617882800, 1812793300718400, 52571005720833600 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Michael De Vlieger, Log log scatterplot of log_10 a(n), n = 2..2^18.
EXAMPLE
a(2) = 2, as a(1) = 1 and 1 times 2 is 2.
a(6) = 114, as a(3) = 6 = n, thus a(6) = a(5) - 6 = 114.
a(7) = 798, as a(6) = 114 and 7 times 114 is 798.
MATHEMATICA
nn = 120; c[_] := False; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; j = 2; Do[k = If[c[n], If[And[! c[#], # >= 0], #, j + n] &[j - n], If[Divisible[j, n], j/n, j n]]; Set[{a[n], c[k], j}, {k, True, k}], {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Aug 30 2023 *)
CROSSREFS
Sequence in context: A263713 A242427 A319545 * A066616 A340516 A340515
KEYWORD
nonn
AUTHOR
Kelvin Voskuijl, Jul 07 2023
EXTENSIONS
More terms from Michael De Vlieger, Aug 30 2023
STATUS
approved

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 15 08:34 EDT 2024. Contains 372538 sequences. (Running on oeis4.)