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!)
A354721 Absolute values of first differences of A354687. 4
1, 2, 4, 6, 8, 3, 9, 10, 12, 5, 15, 14, 18, 16, 20, 39, 13, 22, 33, 21, 27, 24, 11, 26, 28, 23, 46, 48, 7, 30, 34, 32, 49, 35, 36, 51, 45, 42, 25, 44, 55, 38, 66, 19, 57, 40, 87, 58, 54, 102, 52, 56, 50, 68, 85, 62, 60, 75, 65, 63, 108, 69, 64, 70, 72, 141, 17, 74, 88, 76, 78, 148, 80, 91, 77, 81 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
See A354687 for further details.
LINKS
Michael De Vlieger, Annotated log log scatterplot of a(n), n = 1..2^14, showing records in red and local minima in blue, highlighting primes in green and fixed points in gold.
Scott R. Shannon, Image of the first 100000 terms. The green line is y = n.
EXAMPLE
a(5) = 8 as | A354687(6) - A354687(5) | = | 6 - 14 | = 8.
MATHEMATICA
nn = 120; c[_] = d[_] = 0; a[1] = c[1] = 1; a[2] = c[2] = j = 2; u = 3; {1}~Join~Reap[Do[Set[k, u]; While[Nand[c[k] == 0, d[Abs[k - j]] == 0, ! CoprimeQ[j, k]], k++]; Set[{a[i], c[k], d[Abs[k - j]]}, {k, i, i}]; Sow[Abs[k - j]]; j = k; If[k == u, While[c[u] > 0, u++]], {i, 3, nn}]][[-1, -1]] (* Michael De Vlieger, Jun 04 2022 *)
PROG
(Python)
from math import gcd
from sympy import isprime, nextprime
from itertools import count, islice
def agen(): # generator of terms
aset, diffset, an, mink = {1, 2}, {1}, 2, 3
yield from [1]
for n in count(3):
k = mink
while k in aset or abs(an-k) in diffset or gcd(an, k) == 1: k += 1
aset.add(k); diffset.add(abs(k-an)); yield abs(an-k); an = k
while mink in aset: mink += 1
print(list(islice(agen(), 76))) # Michael S. Branicky, Jun 04 2022
CROSSREFS
Sequence in context: A308080 A179657 A239887 * A355506 A241012 A355213
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Jun 04 2022
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 July 4 12:27 EDT 2024. Contains 373990 sequences. (Running on oeis4.)