[go: up one dir, main page]

login
a(n) = gcd(A000005(n+1), A000005(n)).
6

%I #15 Aug 13 2023 02:19:12

%S 1,2,1,1,2,2,2,1,1,2,2,2,2,4,1,1,2,2,2,2,4,2,2,1,1,4,2,2,2,2,2,2,4,4,

%T 1,1,2,4,4,2,2,2,2,6,2,2,2,1,3,2,2,2,2,4,4,4,4,2,2,2,2,2,1,1,4,2,2,2,

%U 4,2,2,2,2,2,6,2,4,2,2,5,1,2,2,4,4,4,4,2,2,4,2,2,4,4,4,2,2,6,3,1,2,2,2,8,4

%N a(n) = gcd(A000005(n+1), A000005(n)).

%H Harry J. Smith, <a href="/A060778/b060778.txt">Table of n, a(n) for n=1..1000</a>

%t GCD@@@Partition[DivisorSigma[0,Range[110]],2,1] (* _Harvey P. Dale_, May 27 2014 *)

%o (PARI) { t=1; for (n=1, 1000, d=numdiv(n+1); write("b060778.txt", n, " ", gcd(d, t)); t=d; ) } \\ _Harry J. Smith_, Jul 11 2009

%o (PARI) a(n) = gcd(numdiv(n), numdiv(n+1)); \\ _Michel Marcus_, Jan 12 2018

%o (Python)

%o from math import gcd

%o from sympy import divisor_count

%o def A060778(n): return gcd(divisor_count(n+1),divisor_count(n)) # _Chai Wah Wu_, Aug 12 2023

%Y Cf. A000005, A057921, A058074.

%K nonn

%O 1,2

%A _Labos Elemer_, Apr 26 2001