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.

Showing 1-5 of 5 results.

A126212 a(n) = sum of the divisors of n which equal any d(k) for 1<=k<=n, where d(k) is the number of positive divisors of k.

Original entry on oeis.org

1, 3, 1, 3, 1, 6, 1, 7, 4, 3, 1, 16, 1, 3, 4, 7, 1, 12, 1, 12, 4, 3, 1, 24, 6, 3, 4, 7, 1, 17, 1, 15, 4, 3, 6, 25, 1, 3, 4, 20, 1, 12, 1, 7, 18, 3, 1, 24, 1, 18, 4, 7, 1, 21, 6, 15, 4, 3, 1, 43, 1, 3, 13, 15, 6, 12, 1, 7, 4, 25, 1, 45, 1, 3, 9, 7, 8, 12, 1, 30, 13, 3, 1, 35, 6, 3, 4, 15, 1, 36, 8
Offset: 1

Views

Author

Leroy Quet, Dec 20 2006

Keywords

Examples

			The number of divisors of the integers 1 through 10 form the sequence 1,2,2,3,2,4,2,4,3,4. The divisors of 10 are 1,2,5,10. The divisors of 10 which occur in the sequence of d(k)'s, 1<=k<=10, are 1 and 2. So a(10) = 1+2 = 3.
		

Crossrefs

Cf. also A126131.

Programs

  • Mathematica
    f[n_] :=Plus @@ Select[Divisors[n], MemberQ[Table[Length@Divisors[k], {k, n}], # ] &];Table[f[n], {n, 91}] (* Ray Chandler, Dec 21 2006 *)
  • PARI
    A126212(n) = sumdiv(n,d,my(s=0); for(k=1,n,if(numdiv(k)==d,s++;break)); (d*s)); \\ Antti Karttunen, Apr 01 2021

Extensions

Extended by Ray Chandler, Dec 21 2006

A129139 a(n) = number of positive integers which are coprime to n and are <= d(n), where d(n) = A000005(n).

Original entry on oeis.org

1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 3, 2, 2, 2, 3, 3, 2, 4, 3, 2, 2, 3, 3, 2, 2, 2, 3, 3, 2, 2, 3, 3, 2, 3, 3, 2, 3, 4, 3, 3, 2, 2, 3, 2, 2, 4, 4, 4, 3, 2, 3, 3, 2, 2, 4, 2, 2, 3, 3, 4, 3, 2, 4, 4, 2, 2, 3, 4, 2, 3, 4, 2, 3, 4, 3, 3, 2, 4, 4, 2, 3, 4, 4, 2, 3, 2, 4, 4
Offset: 1

Views

Author

Leroy Quet, Mar 30 2007

Keywords

Examples

			d(16) = 5. So a(16) is the number of integers coprime to 16 which are <= 5. There are 3 such integers: 1, 3, 5; so a(16) = 3.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local ct,j: ct:=0: for j from 1 to tau(n) do if gcd(j,n)=1 then ct:=ct+1 else fi od: ct; end: seq(a(n),n=1..140); # Emeric Deutsch, Apr 02 2007
  • Mathematica
    A129139[n_] := Count[CoprimeQ[Range[DivisorSigma[0, n]], n], True];
    Array[A129139, 100] (* Paolo Xausa, Mar 27 2025 *)
  • PARI
    A129139(n) = sum(k=1,numdiv(n),(1==gcd(k,n))); \\ Antti Karttunen, Apr 01 2021

Formula

a(n) = Sum_{d|n} mu(d)*floor(tau(n)/d). - Ridouane Oudra, Mar 26 2025

Extensions

More terms from Emeric Deutsch, Apr 02 2007

A126132 a(n) = number of k's, 1<=k<=n, where d(k) is equal to any divisor of n, where d(k) is the number of positive divisors of k.

Original entry on oeis.org

1, 2, 1, 3, 1, 5, 1, 7, 3, 5, 1, 12, 1, 7, 3, 12, 1, 12, 1, 15, 3, 9, 1, 23, 2, 10, 4, 19, 1, 19, 1, 23, 4, 12, 2, 33, 1, 13, 4, 31, 1, 22, 1, 29, 6, 15, 1, 45, 1, 18, 5, 32, 1, 31, 2, 40, 5, 17, 1, 53, 1, 19, 6, 45, 2, 33, 1, 41, 5, 23, 1, 69, 1, 22, 6, 45, 2, 39, 1, 59, 6, 23, 1, 70, 3, 24, 5
Offset: 1

Views

Author

Leroy Quet, Dec 18 2006

Keywords

Examples

			The number of divisors of the integers 1 through 10 form the sequence 1, 2, 2, 3, 2, 4, 2, 4, 3, 4. The divisors of 10 are 1, 2, 5, 10. The terms of the sequence of the first ten d(k)'s which equal any divisor of 10 are the five terms 1, 2, 2, 2, 2. So a(10) = 5.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@Select[Table[Length@Divisors[k], {k, n}], MemberQ[Divisors[n], # ] &];Table[f[n], {n, 87}] (* Ray Chandler, Dec 20 2006 *)
  • PARI
    A126132(n) = sum(k=1,n,!(n%numdiv(k))); \\ Antti Karttunen, Apr 01 2021
    
  • PARI
    first(n) = { n = min(n, 245044799); qdivs = vector(960); res = vector(n); for(i = 1, n, nd = numdiv(i); qdivs[nd]++; d = select(x -> x <= #qdivs, divisors(i)); res[i] = sum(j = 1, #d, qdivs[d[j]]) ); res } \\ David A. Corneth, Apr 01 2021

Formula

a(n) = Sum_{k=1..n} (1 - ceiling(n/d(k)) + floor(n/d(k))). - Wesley Ivan Hurt, Apr 21 2023

Extensions

Extended by Ray Chandler, Dec 20 2006

A129138 a(n) = number of positive divisors of n that are <= phi(n), where phi(n) = A000010(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 3, 4, 1, 4, 1, 4, 3, 2, 1, 6, 2, 2, 3, 4, 1, 5, 1, 5, 3, 2, 3, 7, 1, 2, 3, 6, 1, 5, 1, 4, 5, 2, 1, 8, 2, 4, 3, 4, 1, 6, 3, 6, 3, 2, 1, 9, 1, 2, 5, 6, 3, 5, 1, 4, 3, 6, 1, 10, 1, 2, 5, 4, 3, 5, 1, 8, 4, 2, 1, 9, 3, 2, 3, 6, 1, 9, 3, 4, 3, 2, 3, 10, 1, 4, 5, 7, 1, 5, 1, 6
Offset: 1

Views

Author

Leroy Quet, Mar 30 2007

Keywords

Examples

			phi(16) = 8. So a(16) is the number of divisors of 16 which are <= 8. There are 4 such divisors: 1, 2, 4, 8; so a(16) = 4.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local div, ct, j: div:=divisors(n): ct:=0: for j from 1 to tau(n) do if div[j]<=phi(n) then ct:=ct+1 else ct:=ct: fi od: ct; end: seq(a(n),n=1..135); # Emeric Deutsch, Mar 31 2007
  • Mathematica
    Table[Length[Select[Divisors[n], # <= EulerPhi[n] &]], {n, 104}] (* Jayanta Basu, May 23 2013 *)
  • PARI
    a(n)=my(p=eulerphi(n));#select(k->k<=p,divisors(n)) \\ Charles R Greathouse IV, Mar 05 2013

Extensions

More terms from Emeric Deutsch, Mar 31 2007

A366979 Number of divisors of n less than or equal to d(n).

Original entry on oeis.org

1, 2, 1, 2, 1, 3, 1, 3, 2, 2, 1, 5, 1, 2, 2, 3, 1, 4, 1, 4, 2, 2, 1, 6, 1, 2, 2, 3, 1, 5, 1, 3, 2, 2, 1, 6, 1, 2, 2, 5, 1, 5, 1, 3, 3, 2, 1, 6, 1, 3, 2, 3, 1, 4, 1, 5, 2, 2, 1, 8, 1, 2, 2, 3, 1, 4, 1, 3, 2, 4, 1, 8, 1, 2, 3, 3, 1, 4, 1, 6, 2, 2, 1, 7, 1, 2, 2, 4, 1, 7
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 30 2023

Keywords

Comments

First differs from A126131 at a(25) = 1.

Examples

			a(8) = 3; There are 3 divisors of 8 that are <= d(8) = 4.  They are: {1,2,4}.
a(25) = 1; 1 is the only divisor of 25 that is <= d(25) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[1 + Sum[Sum[(Sign[Floor[i/k]] - Sign[Floor[(i - 1)/k]]), {i, 2, DivisorSigma[0, n]}] (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
  • PARI
    a(n) = my(nd=numdiv(n)); sumdiv(n, d, d <= nd); \\ Michel Marcus, Oct 30 2023

Formula

a(n) = Sum_{d|n, d <= d(n)} 1.
a(n) = 1 + Sum_{d|n} (Sum_{i=2..d(n)} ( sign(floor(i/d)) - sign(floor((i-1)/d)) )), where d(n) is the number of divisors of n (A000005).
Showing 1-5 of 5 results.