[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of differences (not all necessarily distinct) between consecutive divisors of 2n which are also divisors of 2n.
2

%I #20 Feb 20 2023 21:49:44

%S 1,2,3,3,2,5,2,4,5,5,2,7,2,4,6,5,2,8,2,6,7,4,2,9,3,4,7,5,2,11,2,6,6,4,

%T 3,11,2,4,6,7,2,10,2,6,10,4,2,11,3,8,6,6,2,11,5,6,6,4,2,15,2,4,9,7,4,

%U 9,2,6,6,8,2,14,2,4,9,6,2,11,2,8,9,4,2,15,4,4,6,6,2,17,3,6,6,4,4,13,2,6,9

%N Number of differences (not all necessarily distinct) between consecutive divisors of 2n which are also divisors of 2n.

%C For n = any odd positive integer, there are no differences (between consecutive divisors of n) that divide n.

%H Antti Karttunen, <a href="/A138652/b138652.txt">Table of n, a(n) for n = 1..20000</a>

%F a(n) + A360118(2n) = A000005(2n)-1, i.e., a(n) = A066660(n) - A360118(2*n). - Reference to a wrong A-number replaced with A360118 by _Antti Karttunen_, Feb 20 2023

%e From _Antti Karttunen_, Feb 20 2023: (Start)

%e Divisors of 2*12 = 24 are: [1, 2, 3, 4, 6, 8, 12, 24]. Their first differences are: [1, 1, 1, 2, 2, 4, 12], all 7 which are divisors of 24, thus a(12) = 7.

%e Divisors of 2*35 = 70 are: [1, 2, 5, 7, 10, 14, 35, 70]. Their first differences are: 1, 3, 2, 3, 4, 21, 35, of which 1, 2 and 35 are divisors of 70, thus a(35) = 3.

%e Divisors of 2*65 = 130 are: [1, 2, 5, 10, 13, 26, 65, 130]. Their first differences are: 1, 3, 5, 3, 13, 39, 65, of which 1, 5, 13 and 65 are divisors of 130, thus a(65) = 4.

%e (End)

%p A138652 := proc(n) local a,dvs,i ; a := 0 ; dvs := sort(convert(numtheory[divisors](2*n),list)) ; for i from 2 to nops(dvs) do if (2*n) mod ( op(i,dvs)-op(i-1,dvs) ) = 0 then a := a+1 ; fi ; od: a ; end: seq(A138652(n),n=1..120) ; # _R. J. Mathar_, May 20 2008

%t a = {}; For[n = 2, n < 200, n = n + 2, b = Table[Divisors[n][[i + 1]] - Divisors[n][[i]], {i, 1, Length[Divisors[n]] - 1}]; AppendTo[a, Length[Select[b, Mod[n, # ] == 0 &]]]]; a (* _Stefan Steinerberger_, May 18 2008 *)

%o (PARI) A138652(n) = { n = 2*n; my(d=divisors(n), erot = vector(#d-1, k, d[k+1] - d[k])); sum(i=1,#erot,!(n%erot[i])); }; \\ _Antti Karttunen_, Feb 20 2023

%Y Cf. A060741, A060763, A066660, A360118.

%K nonn

%O 1,2

%A _Leroy Quet_, May 15 2008

%E More terms from _Stefan Steinerberger_ and _R. J. Mathar_, May 18 2008

%E Definition edited and clarified by _Antti Karttunen_, Feb 20 2023