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

%I #20 Jan 03 2024 07:08:56

%S 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,

%T 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,

%U 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

%N 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)).

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

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

%C a(A098374(n)) = 1;

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

%C Notes from _Antti Karttunen_, Mar 30 2021: (Start)

%C 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.

%C 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.

%C (End)

%H Antti Karttunen, <a href="/A098371/b098371.txt">Table of n, a(n) for n = 1..8192</a>

%H Antti Karttunen, <a href="/A098371/a098371.txt">Data supplement: n, a(n) computed for n = 1..65537</a>

%o (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

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

%K nonn,look

%O 1,3

%A _Reinhard Zumkeller_, Sep 05 2004

%E Definition clarified by _Antti Karttunen_, Mar 30 2021

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 April 23 05:20 EDT 2024. Contains 371906 sequences. (Running on oeis4.)