A095162 Index of first occurrence of n in A095161.
1, 2, 3, 6, 8, 15, 17, 26, 31, 42, 49, 62
Offset: 1
Crossrefs
Cf. A095161.
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
For n = 12 we have divisors 1, 2, 3, 4, 6, 12; 1 occurs earlier once, 2 occurs earlier twice, 3 occurs earlier 3 times, but 4 occurs earlier only once, hence a(12) = 4.
nn = 120; c[] = 0; Do[k = SelectFirst[Divisors[n], c[#] < # &]; a[n] = k; c[k]++, {n, nn}]; Array[a, nn] (* _Michael De Vlieger, Oct 14 2022 *)
{m=83;v=vector(m);for(n=1,m,d=divisors(n);j=1;while(v[d[j]]>=d[j],j++);print1(d[j],",");v[d[j]]=v[d[j]]+1)}
from sympy import divisors from collections import Counter from itertools import count, islice def agen(): c = Counter() for n in count(1): an = next(d for d in divisors(n) if c[d] < d) c[an] += 1 yield an print(list(islice(agen(), 83))) # Michael S. Branicky, Oct 14 2022
A095163 := proc(nmax) local a,dvs,d,n; a := [1,2,3] ; for n from 4 to nmax do dvs := sort(convert(numtheory[divisors](n),list)) ; for d in dvs do if ListTools[Occurrences](d,a) < d then a := [op(a),d] ; break; fi; od: od: a ; end: A095164 := proc(n,a095163) local i ; for i from 1 to nops(a095163) do if op(i,a095163) = n then RETURN(i) ; fi; od: RETURN(-1) ; end: a095163 := A095163(3700) ; for n from 1 do a095 := A095164(n,a095163) ; if a095 < 0 then break; else printf("%d,",a095) ; fi; od: # R. J. Mathar, Oct 28 2008
nn = 102; c[] = 0; Do[k = SelectFirst[Divisors[n], c[#] < # &]; a[n] = k; c[k]++, {n, nn}]; Array[#/a[#] &, nn] (* _Michael De Vlieger, Oct 14 2022 *)
{ for (n=1, #nb=vector(102), fordiv (n, d, if (nb[d]Rémy Sigrist, Oct 14 2022
Comments