The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A348016 Record the number of terms with no proper divisors, then the number with one proper divisor, then two, three, etc., until reaching a zero term. After each zero term, repeat the count as before. 2
0, 1, 0, 3, 1, 0, 5, 2, 0, 6, 3, 0, 7, 5, 0, 8, 6, 0, 9, 6, 1, 4, 0, 11, 7, 2, 4, 0, 12, 9, 4, 4, 0, 13, 10, 6, 6, 0, 14, 10, 6, 10, 0, 15, 10, 6, 14, 0, 16, 10, 6, 17, 1, 1, 0, 19, 12, 6, 18, 1, 3, 0, 21, 13, 6, 20, 1, 4, 0, 23, 15, 7, 21, 1, 4, 0, 25, 16, 9, 22, 2, 4, 0, 26, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
An inventory sequence counting the proper divisors of existing terms, where zero is taken to have no proper divisors (see A032741). After every occurrence of a zero term the incremental count of terms with 0,1,2,... proper divisors is repeated until another zero term is encountered.
LINKS
EXAMPLE
a(0) = 0 because at first there are no terms, therefore there are no terms with no proper divisors.
a(1) = 1 because now there is one term (a(0)) which has no proper divisors.
a(2) = 0 since there are no terms with one proper divisor.
a(3) = 3 since there are now three terms having just one proper divisor (0,1,0).
As an irregular triangle the sequence begins:
0, 1, 0;
3, 1, 0;
5, 2, 0;
6, 3, 0;
7, 5, 0;
8, 6, 0;
9, 6, 4, 1, 0;
11, 7, 2, 4, 0;
etc.
PROG
(PARI) first(n) = { t = 0; res = vector(n); l = List([1]); for(i = 2, n, for(i = #l + 1, t+1, listput(l, 0) ); res[i] = l[t + 1]; q = if(l[t + 1] == 0, 0, numdiv(l[t + 1]) - 1); for(i = #l + 1, q + 1, listput(l, 0) ); l[q + 1]++; if(res[i] == 0, t = 0 , t++ ) ); res } \\ David A. Corneth, Sep 25 2021
(Python)
from sympy import divisor_count
from collections import Counter
def f(n): return 0 if n == 0 else divisor_count(n) - 1
def aupton(nn):
num, alst, inventory = 0, [0], Counter([0])
for n in range(1, nn+1):
c = inventory[num]
num = 0 if c == 0 else num + 1
alst.append(c)
inventory.update([f(c)])
return alst
print(aupton(84)) # Michael S. Branicky, May 07 2023
CROSSREFS
Sequence in context: A245095 A154791 A121440 * A353092 A362564 A324664
KEYWORD
nonn,tabf
AUTHOR
EXTENSIONS
Data corrected and extended by David A. Corneth, Sep 25 2021
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 June 5 13:00 EDT 2024. Contains 373105 sequences. (Running on oeis4.)