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-10 of 11 results. Next

A328969 Irregular table T(n,k), n >= 2, k=1..pi(n). arising in expressing the sequence A006022 as the coefficients depending on the maximal k-th prime factor pk of the formula for A006022(n) of its unique prime factor equation.

Original entry on oeis.org

1, 0, 1, 3, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 4, 0, 0, 5, 0, 1, 0, 0, 0, 0, 0, 1, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 0, 0, 1, 0, 0, 0, 5, 1, 0, 0, 0, 15, 0, 0, 0, 0, 0
Offset: 2

Views

Author

Jonathan Blanchette, Nov 01 2019

Keywords

Comments

The length of the n-th row is pi(n) (A000720), i.e., 1,2,2,3,... for n>2.
The sum of the rows equals the sequence A006022.
When n is prime the entire row is 0 except at p=n where T(p,p)=1.

Examples

			First few rows are:
  1;
  0, 1;
  3, 0;
  0, 0, 1;
  3, 1, 0;
  0, 0, 0, 1;
  7, 0, 0, 0;
  0, 4, 0, 0;
  5, 0, 1, 0;
  0, 0, 0, 0, 1;
  ...
Examples (see the p_k formulas)
T(2^3,1) = (2^3-1) / (2-1) = 7
T(3^2,1) = (3^2-1) / (3-1) = 4
T(3*2,2) = (6/(2*3)) * (3^2-1) / (3-1) = 4
T(12,1) = (12/(2^2)) * (2^2-1) / (2-1) = 9
T(12,2) = (12/(2^2*3)) * (3-1) / (3-1) = 1
T(15,2) = (15/3) * (3-1) / (3-1) = 5
T(15,3) = (15/(2^2*3)) * (3-1) / (3-1) = 1
T(2*3*5^2*7,3) = (2*3*5^2*7/(2*3*5^2)) * (5^2-1) / (5-1) = 42
		

Crossrefs

The rows sum to A006022. Cf. A129527 (first column).

Formula

Let p_k be the k-th prime, where k is the column index, p_k <= n, and n >= 2, and m_k is the multiplicity of p_k occurring in n:
T(n,p_k) = n * 1/(p_1^m_1*p_2^m_2*...*p_k^m_k) * (p_k^m_k-1)/(p_k-1), if p_k divides n;
T(n,p_k) = 0; if p_k does not divide n.
T(2*n,2) = A129527(n); T(2*n+1,2) = 0.

A332993 a(1) = 1, for n > 1, a(n) = n + a(A032742(n)).

Original entry on oeis.org

1, 3, 4, 7, 6, 10, 8, 15, 13, 16, 12, 22, 14, 22, 21, 31, 18, 31, 20, 36, 29, 34, 24, 46, 31, 40, 40, 50, 30, 51, 32, 63, 45, 52, 43, 67, 38, 58, 53, 76, 42, 71, 44, 78, 66, 70, 48, 94, 57, 81, 69, 92, 54, 94, 67, 106, 77, 88, 60, 111, 62, 94, 92, 127, 79, 111, 68, 120, 93, 113, 72, 139, 74, 112, 106, 134, 89, 131, 80, 156, 121
Offset: 1

Views

Author

Antti Karttunen, Apr 04 2020

Keywords

Comments

Sum of those divisors of n that can be obtained by repeatedly taking the largest proper divisor (of previous such divisor, starting from n, which is included in the sum), up to and including the terminal 1.

Examples

			a(18) = 18 + 18/2 + 9/3 + 3/3 = 18 + 9 + 3 + 1 = 31.
		

Crossrefs

Programs

Formula

a(1) = 1; and for n > 1, a(n) = n + a(A032742(n)).
a(n) = n + A006022(n).
a(n) = A332994(n) + A333791(n).
a(n) = A000203(n) - A333783(n).
It seems that for all n >= 1, a(n) <= A073934(n) <= A333794(n).

A333783 a(n) = sigma(n) - A332993(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 6, 0, 2, 3, 0, 0, 8, 0, 6, 3, 2, 0, 14, 0, 2, 0, 6, 0, 21, 0, 0, 3, 2, 5, 24, 0, 2, 3, 14, 0, 25, 0, 6, 12, 2, 0, 30, 0, 12, 3, 6, 0, 26, 5, 14, 3, 2, 0, 57, 0, 2, 12, 0, 5, 33, 0, 6, 3, 31, 0, 56, 0, 2, 18, 6, 7, 37, 0, 30, 0, 2, 0, 69, 5, 2, 3, 14, 0, 78, 7, 6, 3, 2, 5, 62, 0, 16, 12
Offset: 1

Views

Author

Antti Karttunen, Apr 05 2020

Keywords

Comments

Sum of all other divisors of n, except those divisors that can be obtained by repeatedly taking the largest proper divisor (of previous such divisor, starting from n), up to and including the terminal 1.

Crossrefs

Cf. A000203, A000961 (positions of zeros), A001065, A006022, A032742, A332993, A333784, A333791.

Programs

Formula

a(n) = A000203(n) - A332993(n).
a(n) = A001065(n) - A006022(n).
a(n) = A333784(n) - A333791(n).

A333791 Difference of sums of two subsets of divisors of n, those obtained by repeatedly dividing with the smallest remaining prime factor (A332993) and those obtained by repeatedly dividing with the largest remaining prime factor (A332994).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 3, 0, 5, 2, 0, 0, 4, 0, 9, 4, 9, 0, 7, 0, 11, 0, 15, 0, 12, 0, 0, 8, 15, 2, 12, 0, 17, 10, 21, 0, 20, 0, 27, 8, 21, 0, 15, 0, 18, 14, 33, 0, 13, 6, 35, 16, 27, 0, 32, 0, 29, 16, 0, 8, 36, 0, 45, 20, 30, 0, 28, 0, 35, 12, 51, 4, 44, 0, 45, 0, 39, 0, 52, 12, 41, 26, 63, 0, 39, 6, 63, 28, 45, 14, 31
Offset: 1

Views

Author

Antti Karttunen, Apr 05 2020

Keywords

Examples

			For n = 12 = 2*2*3, we obtain the A332993(12) = 22 as 12 + 12/2 + 6/2 + 3/3 = 12+6+3+1, and A332994(12) = 19 as 12 + 12/3 + 4/2 + 2/2 = 12+4+2+1, thus a(12) = 22 - 19 = 3.
		

Crossrefs

Cf. A000961 (positions of zeros), A006022, A032742, A052126, A322382, A332993, A332994, A333783, A333784.

Programs

Formula

a(n) = A332993(n) - A332994(n).
a(n) = A333784(n) - A333783(n).
a(n) = A006022(n) - A322382(n).
a(p^k) = 0, for all primes p and exponents k >= 0.

A322034 Let p1 <= p2 <= ... <= pk be the prime factors of n, with repetition; let s = 1/p1 + 1/(p1*p2) + 1/(p1*p2*p3) + ... + 1/(p1*p2*...*pk); a(n) = numerator of s. a(1)=0 by convention.

Original entry on oeis.org

0, 1, 1, 3, 1, 2, 1, 7, 4, 3, 1, 5, 1, 4, 2, 15, 1, 13, 1, 4, 8, 6, 1, 11, 6, 7, 13, 11, 1, 7, 1, 31, 4, 9, 8, 31, 1, 10, 14, 9, 1, 29, 1, 17, 7, 12, 1, 23, 8, 31, 6, 10, 1, 20, 12, 25, 20, 15, 1, 17, 1, 16, 29, 63, 14, 15, 1, 13, 8, 43, 1, 67
Offset: 1

Views

Author

Keywords

Comments

Note that s < 1 for all n (compare A322036). This follows easily by induction, since when we increase n by multiplying it by a new (not-smaller) prime, we increase s by less than 1-s.

Examples

			If n=12 we get the prime factors 2,2,3, and s = 1/2 + 1/4 + 1/12 = 5/6. So a(12) = 5.
The fractions s for n >= 2 are 1/2, 1/3, 3/4, 1/5, 2/3, 1/7, 7/8, 4/9, 3/5, 1/11, 5/6, 1/13, 4/7, 2/5, 15/16, 1/17, 13/18, 1/19, 4/5, 8/21, ...
		

Crossrefs

A017665/A017666 = sum of reciprocals of all divisors of n.

Programs

  • Maple
    # This generates the terms starting at n=2:
    P:=proc(n) local FM: FM:=ifactors(n)[2]: seq(seq(FM[j][1], k=1..FM[j][2]), j=1..nops(FM)) end: # A027746
    f0:=[]; f1:=[]; f2:=[];
    for n from 2 to 120 do
    a:=0; b:=1; t1:=[P(n)];
    for i from 1 to nops(t1) do b:=b/t1[i]; a:=a+b; od;
    f0:=[op(f0),a]; f1:=[op(f1), numer(a)]; f2:=[op(f2),denom(a)]; od:
    f0;    # s
    f1;    # A322034
    f2;    # A322035
    f2-f1; # A322036
  • Mathematica
    f[x_] := Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[x]]; {0}~Join~Table[Numerator@ Total@ Table[1/Times @@ #[[;; i]], {i, Length[#]}] &@ f[n], {n, 2, 72}] (* Michael De Vlieger, Jun 20 2025 *)
  • PARI
    A322034(n) = if(1==n,0,my(f=factor(n),pm=1,s=0); for(i=1,#f~,while(f[i,2],pm *= f[i,1]; f[i,2]--; s += 1/pm)); numerator(s)); \\ Antti Karttunen, Feb 28 2019

A322035 Let p1 <= p2 <= ... <= pk be the prime factors of n, with repetition; let s = 1/p1 + 1/(p1*p2) + 1/(p1*p2*p3) + ... + 1/(p1*p2*...*pk); a(n) = denominator of s. a(1)=1 by convention.

Original entry on oeis.org

1, 2, 3, 4, 5, 3, 7, 8, 9, 5, 11, 6, 13, 7, 5, 16, 17, 18, 19, 5, 21, 11, 23, 12, 25, 13, 27, 14, 29, 10, 31, 32, 11, 17, 35, 36, 37, 19, 39, 10, 41, 42, 43, 22, 15, 23, 47, 24, 49, 50, 17, 13, 53, 27, 55, 28, 57, 29, 59, 20, 61, 31, 63, 64, 65, 22
Offset: 1

Views

Author

Keywords

Examples

			If n=12 we get the prime factors 2,2,3, and s = 1/2 + 1/4 + 1/12 = 5/6. So a(12) = 6.
The fractions s for n >= 2 are 1/2, 1/3, 3/4, 1/5, 2/3, 1/7, 7/8, 4/9, 3/5, 1/11, 5/6, 1/13, 4/7, 2/5, 15/16, 1/17, 13/18, 1/19, 4/5, 8/21, ...
		

Crossrefs

A017665/A017666 = sum of reciprocals of all divisors of n.

Programs

  • Maple
    # This generates the terms starting at n=2:
    P:=proc(n) local FM: FM:=ifactors(n)[2]: seq(seq(FM[j][1], k=1..FM[j][2]), j=1..nops(FM)) end: # A027746
    f0:=[]; f1:=[]; f2:=[];
    for n from 2 to 120 do
    a:=0; b:=1; t1:=[P(n)];
    for i from 1 to nops(t1) do b:=b/t1[i]; a:=a+b; od;
    f0:=[op(f0),a]; f1:=[op(f1), numer(a)]; f2:=[op(f2),denom(a)]; od:
    f0;    # s
    f1;    # A322034
    f2;    # A322035
    f2-f1; # A322036
  • Mathematica
    f[x_] := Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[x]]; Table[Denominator@ Total@ Table[1/Times @@ #[[;; i]], {i, Length[#]}] &@ f[n], {n, 120}] (* Michael De Vlieger, Jun 20 2025 *)

A322382 a(n) = p*a(n/p) + 1, where p is the smallest prime divisor of n; a(1)=0.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 1, 7, 4, 3, 1, 7, 1, 3, 4, 15, 1, 9, 1, 7, 4, 3, 1, 15, 6, 3, 13, 7, 1, 9, 1, 31, 4, 3, 6, 19, 1, 3, 4, 15, 1, 9, 1, 7, 13, 3, 1, 31, 8, 13, 4, 7, 1, 27, 6, 15, 4, 3, 1, 19, 1, 3, 13, 63, 6, 9, 1, 7, 4, 13, 1, 39, 1, 3, 19, 7, 8, 9, 1, 31, 40, 3, 1, 19, 6
Offset: 1

Views

Author

David James Sycamore, Dec 05 2018

Keywords

Comments

An equivalent definition of this sequence is: a(1) = 0; and for n > 1, a(n) = n*w(n), where if p1, ..., pk are the prime divisors of n (with repetition) and p1 <= p2 <= ... <= pk, then w(n) = 1/pk + 1/(pk-1*pk) + ... + 1/(p2*p3*...*pk) + ... + 1/(p1*p2*...*pk). Since 2 is smallest prime w(n) <= 1/2 + 1/(2^2) + ... + 1/(2^k), a partial sum of a series which -->1 as n-->oo. Therefore w(n) < 1 and n-a(n) is a sequence of positive numbers (1,1,2,1,4,3,6,...). For n=p^k, p a prime and n >= 1, a(n) = a(p^k) = p^(n-1) + p^(n-2) + ... + p^2 + p + 1 = (p^k-1)/(p-1); e.g., a(2^k) = 2^k - 1.

Examples

			For any prime p, a(p) = p*a(p/p)+1 = p*a(1)+1 = 1, because a(1) = 0.
For n = 6, the least prime divisor is 2, so a(6) = 2*a(6/2)+1 = 2*a(3)+1 = 3.
Using the equivalent definition we get w(6) = 1/3 + 1/6 = 1/2, so a(6) = 6*w(6) = 6*1/2 = 3. For n=32, a(32) = a(2^5) = 2^5 - 1 = 32 - 1 = 31.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := #*a[n/#] + 1 &[FactorInteger[n][[1, 1]] ]; a[1] = 0; Array[a, 1000] (* Michael De Vlieger, Jun 20 2025 *)
  • PARI
    a(n) = if (n==1, 0, my(p = vecmin(factor(n)[,1])); p*a(n/p)+1); \\ Michel Marcus, Jan 25 2019

Formula

From Antti Karttunen, Feb 28 2019 , Mar 04 2019: (Start)
a(1) = 0; for n > 1, a(n) = 1 + A020639(n)*a(A032742(n)).
If n is of the form p^k, k >= 1, then a(n) = A000203(A003557(n)). [Based on author's comments above] (End)
a(n) = Sum_{k=1..bigomega(n)} F^k(n), where F^k(n) is the k-th iterate of F(n) = A052126(n). - Ridouane Oudra, Aug 17 2024

Extensions

More terms from Michel Marcus, Jan 25 2019

A322036 a(n) = A322035(n) - A322034(n).

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 5, 2, 10, 1, 12, 3, 3, 1, 16, 5, 18, 1, 13, 5, 22, 1, 19, 6, 14, 3, 28, 3, 30, 1, 7, 8, 27, 5, 36, 9, 25, 1, 40, 13, 42, 5, 8, 11, 46, 1, 41, 19, 11, 3, 52, 7, 43, 3, 37, 14, 58, 3, 60, 15, 34, 1, 51, 7, 66, 4, 15, 27, 70
Offset: 1

Views

Author

Keywords

Comments

Let s be the fraction defined in A322034 and A322035. Then for n >= 2, 1-s is a(n)/A322035(n).
Note that a(n) >= 1, see A322034.

Examples

			Let s be the fraction defined in A322034 and A322035. The fractions 1-s for n >= 2 are 1/2, 2/3, 1/4, 4/5, 1/3, 6/7, 1/8, 5/9, 2/5, 10/11, 1/6, 12/13, 3/7, 3/5, 1/16, 16/17, 5/18, 18/19, 1/5, 13/21, 5/11, 22/23, 1/12, 19/25, 6/13, 14/27, ...
		

Crossrefs

Programs

  • Maple
    # This generates the terms starting at n=2:
    P:=proc(n) local FM: FM:=ifactors(n)[2]: seq(seq(FM[j][1], k=1..FM[j][2]), j=1..nops(FM)) end: # A027746
    f0:=[]; f1:=[]; f2:=[];
    for n from 2 to 120 do
    a:=0; b:=1; t1:=[P(n)];
    for i from 1 to nops(t1) do b:=b/t1[i]; a:=a+b; od;
    f0:=[op(f0),a]; f1:=[op(f1), numer(a)]; f2:=[op(f2),denom(a)]; od:
    f0;    # s
    f1;    # A322034
    f2;    # A322035
    f2-f1; # A322036
  • Mathematica
    f[x_] := Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[x]]; {1}~Join~Table[Denominator[#] - Numerator[#] &@ Total@ Table[1/Times @@ #[[;; i]], {i, Length[#]}] &@ f[n], {n, 2, 120}] (* Michael De Vlieger, Jun 20 2025 *)

A306264 a(n) = 1 + d*a(n/d); a(1)=0. If n has only one prime divisor, then d=n, otherwise d is the greatest proper unitary divisor of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 4, 1, 1, 1, 6, 1, 5, 1, 8, 6, 1, 1, 10, 1, 6, 8, 12, 1, 9, 1, 14, 1, 8, 1, 16, 1, 1, 12, 18, 8, 10, 1, 20, 14, 9, 1, 22, 1, 12, 10, 24, 1, 17, 1, 26, 18, 14, 1, 28, 12, 9, 20, 30, 1, 21, 1, 32, 10, 1, 14, 34, 1, 18, 24, 36, 1, 10, 1, 38, 26, 20, 12, 40, 1, 17
Offset: 1

Views

Author

David James Sycamore, Feb 01 2019

Keywords

Comments

Name related to recursive formula of A006022.
a(n) = 1 if and only if n is a prime power; p^t; t >= 1.
The sequence of indices k on which a(k) is a record (1,2,6,10,14,18,22,26,30,...), appears to be A111284.

Examples

			a(8) = a(25) = 1 because 8 and 25 are prime powers.
a(30) = 16 because 15 is the greatest proper unitary divisor of 30, so a(30) = 1 + 15*a(2) = 1 + 15 = 16.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := If[PrimePowerQ[n], n,
      SelectFirst[Transpose@
        {Reverse@ #[[-Ceiling[Length[#]/2] ;; -2]],
          #[[2 ;; Ceiling[Length[#]/2]]]} &@ Divisors[n],
        CoprimeQ @@ # &][[1]] ]; f[1] = 1;
    a[n_] := 1 + #*a[n/#] &[f[n]]; a[1] = 0;
    Array[a, 120] (* Michael De Vlieger, Jun 24 2025 *)
  • PARI
    d(n) = if (omega(n) == 1, n, my(v=select(x->(gcd(x, n/x)==1), divisors(n))); v[#v-1]);
    lista(nn) = {va = vector(nn); va[1] = 0; for (n=2, nn, dn = d(n); va[n] = 1 + dn*va[n/dn];); va;} \\ Michel Marcus, Feb 10 2019
    
  • PARI
    A324388(n) = if(1>=omega(n),n,fordiv(n,d,if((d>1)&&(1==gcd(d,n/d)),return(n/d))));
    A306264(n) = if(1==n,0,my(d=A324388(n)); 1+(d*A306264(n/d))); \\ Antti Karttunen, Feb 28 2019

Formula

a(1) = 0; for n > 1, a(n) = 1 + (A324388(n) * a(n/A324388(n))). - Antti Karttunen, Feb 28 2019

A306363 For n > 1 having omega(n) = k and canonical prime factorization n = d_1*d_2*...*d_k, a(n) = Sum_{i=1..k} (d_i*a(n/d_i) + (n/d_i)); a(1)=0.

Original entry on oeis.org

0, 1, 1, 1, 1, 10, 1, 1, 1, 14, 1, 14, 1, 18, 16, 1, 1, 22, 1, 18, 20, 26, 1, 22, 1, 30, 1, 22, 1, 155, 1, 1, 28, 38, 24, 26, 1, 42, 32, 26, 1, 205, 1, 30, 28, 50, 1, 38, 1, 54, 40, 34, 1, 58, 32, 30, 44, 62, 1, 235, 1, 66, 32, 1, 36, 305, 1, 42, 52, 295, 1, 34, 1, 78
Offset: 1

Views

Author

David James Sycamore, Feb 10 2019

Keywords

Comments

Recursion similar to that of A006022. k=1 => a(n)=1; k=2 => a(n) = 2*(d_1 + d_2); claim: a(n)=A000522(k-1)*A066504(n); k = omega(n). Inductive proof on k (sketch): Let A=A000522 and B=A066504 = Sum_{i=1..k} (n/d_i). True for k=1,2 so assume true for arbitrary k. Then for n with omega(n)=k+1, a(n) = (Sum_{i=1..k+1} d_i*(n/d_i)) + B(n) = A(k-1)*k*B(n) + B(n) = ((A(k-1)*k) + 1)*B(n). But (A(k-1)k)+1) = A(k) by recursive formula for A000522, so a(n) = A(k)*B(n); hence true for k+1.

Examples

			n=6 = 2*3, a(n) = 2*a(3) + 3*a(2) + 3 + 2 = 2*(2+3) = 10.
n=210=2*3*5*7; k=4, a(n)=A000522(3)*(2*3*5 + 2*3*7 + 2*5*7 + 3*5*7) = 16*247 = 3952.
		

Crossrefs

Programs

  • PARI
    a(n) = if (n==1, 0, my(f=factor(n)); sum(k=1, #f~, my(dk=f[k,1]^f[k,2]); dk*a(n/dk) + (n/dk))); \\ Michel Marcus, Feb 19 2019

Formula

a(n) = A000522(k-1)*A066504(n); k = omega(n) = A001221(n).
Showing 1-10 of 11 results. Next