|
|
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
|
|
|
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]]];
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|