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
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, 25, 14, 29, 15, 29, 24, 25, 26, 35, 20, 27, 27, 38, 24, 39, 26, 40, 41, 30, 29, 47, 45, 45, 35, 46, 33, 49, 36, 51, 37, 38, 38, 59, 39, 39, 57, 63, 40, 60, 45, 60, 44, 64, 49, 69, 51, 47 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
A118177(n) is the number of divisors of a(n).
LINKS
Michel Marcus, Table of n, a(n) for n = 1..10000 (terms 1 to 100 from M. F. Hasler)
EXAMPLE
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.
MAPLE
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
MATHEMATICA
a[n_] := a[n] = If[n == 1, 1, Count[Array[a, n-1], t_ /; DivisorSigma[0, n] != DivisorSigma[0, t]]];
Array[a, 100] (* Jean-François Alcover, Oct 01 2020 *)
PROG
(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
CROSSREFS
Sequence in context: A346703 A271774 A331602 * A005731 A132962 A046145
KEYWORD
nonn
AUTHOR
Leroy Quet, Apr 13 2006
EXTENSIONS
More terms from M. F. Hasler, Nov 06 2006
STATUS
approved

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 May 7 20:13 EDT 2024. Contains 372317 sequences. (Running on oeis4.)