cp's OEIS Frontend

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.

A095163 a(n) = smallest divisor d of n that occurs earlier in the sequence fewer than d times.

This page as a plain text file.
%I A095163 #14 Oct 14 2022 16:25:57
%S A095163 1,2,3,2,5,3,7,4,3,5,11,4,13,7,5,4,17,6,19,4,7,11,23,6,5,13,9,7,29,5,
%T A095163 31,8,11,17,7,6,37,19,13,8,41,6,43,11,9,23,47,6,7,10,17,13,53,6,11,7,
%U A095163 19,29,59,10,61,31,9,8,13,11,67,17,23,10,71,8,73,37,15,19,11,13,79,8,9,41,83
%N A095163 a(n) = smallest divisor d of n that occurs earlier in the sequence fewer than d times.
%C A095163 Agrees with A033677 for the first 19 and many further terms; A095787 gives those n for which A033677 and the present sequence disagree.
%H A095163 Rémy Sigrist, <a href="/A095163/b095163.txt">Table of n, a(n) for n = 1..10000</a>
%F A095163 a(n) >= n^(1/3). - _Charles R Greathouse IV_, Oct 14 2022
%e A095163 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.
%t A095163 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 *)
%o A095163 (PARI) {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)}
%o A095163 (Python)
%o A095163 from sympy import divisors
%o A095163 from collections import Counter
%o A095163 from itertools import count, islice
%o A095163 def agen():
%o A095163     c = Counter()
%o A095163     for n in count(1):
%o A095163         an = next(d for d in divisors(n) if c[d] < d)
%o A095163         c[an] += 1
%o A095163         yield an
%o A095163 print(list(islice(agen(), 83))) # _Michael S. Branicky_, Oct 14 2022
%Y A095163 Cf. A033677, A095787, A095161, A095162, A095164, A095165.
%K A095163 nonn
%O A095163 1,2
%A A095163 _Amarnath Murthy_, Jun 01 2004
%E A095163 Edited and extended by _Klaus Brockhaus_ Jun 05 2004 and Jun 09 2004