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!)
A118176 a(1) = 1. a(n) is the number of earlier terms of the sequence which have a different number of divisors than n. 2

%I #23 Oct 01 2020 20:32:42

%S 1,1,2,3,2,5,2,7,8,8,4,11,5,11,12,15,7,16,8,18,16,17,11,23,23,21,21,

%T 25,14,29,15,29,24,25,26,35,20,27,27,38,24,39,26,40,41,30,29,47,45,45,

%U 35,46,33,49,36,51,37,38,38,59,39,39,57,63,40,60,45,60,44,64,49,69,51,47

%N a(1) = 1. a(n) is the number of earlier terms of the sequence which have a different number of divisors than n.

%C A118177(n) is the number of divisors of a(n).

%H Michel Marcus, <a href="/A118176/b118176.txt">Table of n, a(n) for n = 1..10000</a> (terms 1 to 100 from M. F. Hasler)

%e 11 has 2 divisors. So a(11) = the number of terms among the first 10 terms of the sequence which do not have 2 divisors. Only the four terms a(1) = 1, a(2) = 1, a(9) = 8 and a(10) = 8 each do not have 2 divisors. So a(11) = 4.

%p a:=proc(n)option remember; if n=1 then 1 else nops( subs( numtheory[tau](n)=NULL, [ 'numtheory[tau](a(i))', $i=1..n-1 ] )) fi end; # _M. F. Hasler_, Nov 06 2006

%t a[n_] := a[n] = If[n == 1, 1, Count[Array[a, n-1], t_ /; DivisorSigma[0, n] != DivisorSigma[0, t]]];

%t Array[a, 100] (* _Jean-François Alcover_, Oct 01 2020 *)

%o (PARI) lista(nn) = {my(va = vector(nn), vd = vector(nn)); va[1] = 1; vd[1] = numdiv(1); for (n=2, nn, va[n] = sum(k=1, n-1, vd[k] != numdiv(n)); vd[n] = numdiv(va[n]);); va;} \\ _Michel Marcus_, Oct 01 2020

%Y Cf. A000005, A118177.

%K nonn

%O 1,3

%A _Leroy Quet_, Apr 13 2006

%E More terms from _M. F. Hasler_, Nov 06 2006

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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)