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!)
A098371 a(1) = 1; for n > 1, a(n) is the number of i in range 1..n-1 for which gcd(n, a(i)) = Max_{k=1..n-1} gcd(n, a(k))}. 4
1, 1, 2, 1, 4, 2, 6, 1, 1, 4, 10, 1, 12, 7, 1, 3, 16, 2, 18, 1, 1, 10, 22, 1, 2, 13, 1, 1, 28, 2, 30, 1, 1, 16, 2, 1, 36, 19, 1, 3, 40, 1, 42, 1, 1, 21, 46, 2, 4, 4, 9, 1, 52, 2, 1, 1, 1, 27, 58, 1, 60, 29, 2, 2, 2, 1, 66, 12, 1, 2, 70, 1, 72, 37, 2, 1, 2, 1, 78, 1, 1, 40, 82, 1, 7, 42, 2, 2, 88, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

a(n) = n-1 iff n = 1 or n is prime;

a(A098373(n)) = n and a(m) <> n for m < A098373(n);

a(A098374(n)) = 1;

a(n) = #{m: gcd(n,a(m)) = A098372(n)}.

Notes from Antti Karttunen, Mar 30 2021: (Start)

The original definition was: #{m: gcd(n, a(m)) = Max_{k=1..n-1} gcd(n, a(k))}, but it hardly seems well-defined unless the range of m is somehow restricted.

Informally the definition could be expressed as: Number of k in range 1..n-1 for which gcd(n, a(k)) attains the maximal such gcd-value that occurs in the same range.

(End)

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..8192

Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537

PROG

(PARI) A098371list(up_to) = { my(v=vector(up_to)); v[1] = 1; for(n=2, #v, my(m=1); for(k=1, n-1, m = max(m, gcd(n, v[k]))); v[n] = sum(k=1, n-1, m == gcd(n, v[k]))); (v); }; \\ Antti Karttunen, Mar 30 2021

CROSSREFS

Cf. A096216, A000010, A098372, A098373, A098374.

Sequence in context: A057923 A147763 A342415 * A300234 A070777 A173614

Adjacent sequences:  A098368 A098369 A098370 * A098372 A098373 A098374

KEYWORD

nonn,look

AUTHOR

Reinhard Zumkeller, Sep 05 2004

EXTENSIONS

Definition clarified by Antti Karttunen, Mar 30 2021

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 21 00:46 EST 2022. Contains 350473 sequences. (Running on oeis4.)