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 23 results. Next

A326144 a(n) = gcd(A066503(n), A326143(n)) = gcd(n - A007947(n), sigma(n) - A007947(n) - n).

Original entry on oeis.org

1, 1, 2, 1, 4, 0, 6, 1, 1, 2, 10, 2, 12, 4, 6, 1, 16, 3, 18, 2, 10, 8, 22, 6, 1, 10, 2, 14, 28, 12, 30, 1, 18, 14, 22, 1, 36, 16, 22, 10, 40, 12, 42, 2, 6, 20, 46, 14, 1, 1, 30, 2, 52, 12, 38, 2, 34, 26, 58, 6, 60, 28, 2, 1, 46, 12, 66, 2, 42, 4, 70, 3, 72, 34, 2, 2, 58, 12, 78, 2, 1, 38, 82, 14, 62, 40, 54, 2, 88, 6, 70, 2
Offset: 1

Views

Author

Antti Karttunen, Jun 09 2019

Keywords

Crossrefs

Programs

Formula

a(n) = gcd(A066503(n), A326143(n)) = gcd(n-A007947(n), A000203(n)-A007947(n)-n).

A325970 a(n) is the largest k <= A066503(n) such that k and (2n-sigma(n)) [= A033879(n)] are relatively prime.

Original entry on oeis.org

0, 0, -1, 2, -1, -1, -1, 6, 6, -1, -1, 5, -1, -1, -1, 14, -1, 11, -1, 9, -1, -1, -1, 17, 20, -1, 23, 1, -1, -1, -1, 30, -1, -1, -1, 30, -1, -1, -1, 29, -1, -1, -1, 21, 29, -1, -1, 41, 42, 40, -1, 25, -1, 47, -1, 41, -1, -1, -1, 29, -1, -1, 41, 62, -1, -1, -1, 33, -1, -1, -1, 65, -1, -1, 59, 37, -1, -1, -1, 69, 78
Offset: 1

Views

Author

Antti Karttunen, May 31 2019

Keywords

Comments

a(n) = n-k for the least k >= A007947(n) such that n-k and n-(sigma(n)-k) are relatively prime.

Crossrefs

Programs

  • PARI
    A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
    A325970(n) = { my(s=sigma(n)); forstep(k=n-A007947(n), -oo, -1, if(1==gcd(k, n+n-sigma(n)), return(k))); };
    \\ Or alternatively:
    A325970(n) = { my(s=sigma(n)); for(i=A007947(n), s, if(1==gcd(n-i, n-(s-i)), return(n-i))); };

Formula

a(n) = n - A325971(n).
For n >= 3, a(A005117(n)) = -1.

A381076 Sorted positions of first appearances in A066503 (n minus squarefree kernel of n).

Original entry on oeis.org

1, 4, 8, 16, 18, 20, 24, 25, 27, 32, 44, 48, 50, 52, 54, 64, 68, 72, 75, 76, 80, 81, 92, 96, 98, 108, 112, 116, 121, 125, 128, 144, 148, 152, 160, 162, 164, 172, 175, 176, 188, 189, 192, 196, 198, 200, 212, 216, 232, 236, 242, 243, 244, 256, 260, 264, 268, 272
Offset: 1

Views

Author

Gus Wiseman, Feb 18 2025

Keywords

Comments

In A066503, each value appears for the first time at one of these positions.

Crossrefs

For quotient instead of difference we have A001694, sorted firsts of A003557.
Sorted positions of first appearances in A066503.
For indices and sum we have A380957 (unsorted A380956), firsts of A380955.
For indices and quotient we have A380988 (unsorted A380987), firsts of A290106.
For sum instead of product we have A381075, sorted firsts of A280292, see A280286.
For indices instead of factors we have A381077, sorted firsts of A380986.
A000040 lists the primes, differences A001223.
A001414 adds up prime factors (indices A056239), row sums of A027746 (indices A112798).
A003963 gives product of prime indices, distinct A156061.
A005117 lists squarefree numbers, complement A013929.
A007947 gives squarefree kernel.
A020639 gives least prime factor (index A055396), greatest A061395 (index A006530).

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[Apply[ConstantArray,FactorInteger[n],{1}]]];
    q=Table[Times@@prifacs[n]-Times@@Union[prifacs[n]],{n,1000}];
    Select[Range[Length[q]],FreeQ[Take[q,#-1],q[[#]]]&]

A007947 Largest squarefree number dividing n: the squarefree kernel of n, rad(n), radical of n.

Original entry on oeis.org

1, 2, 3, 2, 5, 6, 7, 2, 3, 10, 11, 6, 13, 14, 15, 2, 17, 6, 19, 10, 21, 22, 23, 6, 5, 26, 3, 14, 29, 30, 31, 2, 33, 34, 35, 6, 37, 38, 39, 10, 41, 42, 43, 22, 15, 46, 47, 6, 7, 10, 51, 26, 53, 6, 55, 14, 57, 58, 59, 30, 61, 62, 21, 2, 65, 66, 67, 34, 69, 70, 71, 6, 73, 74, 15, 38, 77, 78
Offset: 1

Views

Author

R. Muller, Mar 15 1996

Keywords

Comments

Multiplicative with a(p^e) = p.
Product of the distinct prime factors of n.
a(k)=k for k=squarefree numbers A005117. - Lekraj Beedassy, Sep 05 2006
A note on square roots of numbers: we can write sqrt(n) = b*sqrt(c) where c is squarefree. Then b = A000188(n) is the "inner square root" of n, c = A007913(n), b*c = A019554(n) = "outer square root" of n, and a(n) = lcm(a(b),c). Unless n is biquadrateful (A046101), a(n) = lcm(b,c). [Edited by Jeppe Stig Nielsen, Oct 10 2021, and Andrey Zabolotskiy, Feb 12 2025]
a(n) = A128651(A129132(n-1) + 2) for n > 1. - Reinhard Zumkeller, Mar 30 2007
Also the least common multiple of the prime factors of n. - Peter Luschny, Mar 22 2011
The Mobius transform of the sequence generates the sequence of absolute values of A097945. - R. J. Mathar, Apr 04 2011
Appears to be the period length of k^n mod n. For example, n^12 mod 12 has period 6, repeating 1,4,9,4,1,0, so a(12)= 6. - Gary Detlefs, Apr 14 2013
a(n) differs from A014963(n) when n is a term of A024619. - Eric Desbiaux, Mar 24 2014
a(n) is also the smallest base (also termed radix) for which the representation of 1/n is of finite length. For example a(12) = 6 and 1/12 in base 6 is 0.03, which is of finite length. - Lee A. Newberg, Jul 27 2016
a(n) is also the divisor k of n such that d(k) = 2^omega(n). a(n) is also the smallest divisor u of n such that n divides u^n. - Juri-Stepan Gerasimov, Apr 06 2017

Examples

			G.f. = x + 2*x^2 + 3*x^3 + 2*x^4 + 5*x^5 + 6*x^6 + 7*x^7 + 2*x^8 + 3*x^9 + ... - _Michael Somos_, Jul 15 2018
		

Crossrefs

See A007913, A062953, A000188, A019554, A003557, A066503, A087207 for other properties related to square and squarefree divisors of n.
More general factorization-related properties, specific to n: A020639, A028234, A020500, A010051, A284318, A000005, A001221, A005361, A034444, A014963, A128651, A267116.
Range of values is A005117.
Bisections: A099984, A099985.
Sequences about numbers that have the same squarefree kernel: A065642, array A284311 (A284457).
A003961, A059896 are used to express relationship between terms of this sequence.

Programs

  • Haskell
    a007947 = product . a027748_row  -- Reinhard Zumkeller, Feb 27 2012
    
  • Magma
    [ &*PrimeDivisors(n): n in [1..100] ]; // Klaus Brockhaus, Dec 04 2008
    
  • Maple
    with(numtheory); A007947 := proc(n) local i,t1,t2; t1 := ifactors(n)[2]; t2 := mul(t1[i][1],i=1..nops(t1)); end;
    A007947 := n -> ilcm(op(numtheory[factorset](n))):
    seq(A007947(i),i=1..69); # Peter Luschny, Mar 22 2011
    A:= n -> convert(numtheory:-factorset(n),`*`):
    seq(A(n),n=1..100); # Robert Israel, Aug 10 2014
    seq(NumberTheory:-Radical(n), n = 1..78); # Peter Luschny, Jul 20 2021
  • Mathematica
    rad[n_] := Times @@ (First@# & /@ FactorInteger@ n); Array[rad, 78] (* Robert G. Wilson v, Aug 29 2012 *)
    Table[Last[Select[Divisors[n],SquareFreeQ]],{n,100}] (* Harvey P. Dale, Jul 14 2014 *)
    a[ n_] := If[ n < 1, 0, Sum[ EulerPhi[d] Abs @ MoebiusMu[d], {d, Divisors[ n]}]]; (* Michael Somos, Jul 15 2018 *)
    Table[Product[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 20 2020 *)
  • PARI
    a(n) = factorback(factorint(n)[,1]); \\ Andrew Lelechenko, May 09 2014
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1 + p*X - X)/(1 - X))[n], ", ")) \\ Vaclav Kotesovec, Jun 14 2020
    
  • Python
    from sympy import primefactors, prod
    def a(n): return 1 if n < 2 else prod(primefactors(n))
    [a(n) for n in range(1, 51)]  # Indranil Ghosh, Apr 16 2017
    
  • Sage
    def A007947(n): return mul(p for p in prime_divisors(n))
    [A007947(n) for n in (1..60)] # Peter Luschny, Mar 07 2017
    
  • Scheme
    (define (A007947 n) (if (= 1 n) n (* (A020639 n) (A007947 (A028234 n))))) ;; ;; Needs also code from A020639 and A028234. - Antti Karttunen, Jun 18 2017

Formula

If n = Product_j (p_j^k_j) where p_j are distinct primes, then a(n) = Product_j (p_j).
a(n) = Product_{k=1..A001221(n)} A027748(n,k). - Reinhard Zumkeller, Aug 27 2011
Dirichlet g.f.: zeta(s)*Product_{primes p} (1+p^(1-s)-p^(-s)). - R. J. Mathar, Jan 21 2012
a(n) = Sum_{d|n} phi(d) * mu(d)^2 = Sum_{d|n} |A097945(d)|. - Enrique Pérez Herrero, Apr 23 2012
a(n) = Product_{d|n} d^moebius(n/d) (see Billal link). - Michel Marcus, Jan 06 2015
a(n) = n/( Sum_{k=1..n} (floor(k^n/n)-floor((k^n - 1)/n)) ) = e^(Sum_{k=2..n} (floor(n/k) - floor((n-1)/k))*A010051(k)*M(k)) where M(n) is the Mangoldt function. - Anthony Browne, Jun 17 2016
a(n) = n/A003557(n). - Juri-Stepan Gerasimov, Apr 07 2017
G.f.: Sum_{k>=1} phi(k)*mu(k)^2*x^k/(1 - x^k). - Ilya Gutkovskiy, Apr 11 2017
From Antti Karttunen, Jun 18 2017: (Start)
a(1) = 1; for n > 1, a(n) = A020639(n) * a(A028234(n)).
a(n) = A019565(A087207(n)). (End)
Dirichlet g.f.: zeta(s-1) * zeta(s) * Product_{primes p} (1 + p^(1-2*s) - p^(2-2*s) - p^(-s)). - Vaclav Kotesovec, Dec 18 2019
From Peter Munn, Jan 01 2020: (Start)
a(A059896(n,k)) = A059896(a(n), a(k)).
a(A003961(n)) = A003961(a(n)).
a(n^2) = a(n).
a(A225546(n)) = A019565(A267116(n)). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = A065463/2. - Vaclav Kotesovec, Jun 24 2020
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{k=1..n} mu(n/gcd(n,k))^2.
a(n) = Sum_{k=1..n} mu(gcd(n,k))^2*phi(gcd(n,k))/phi(n/gcd(n,k)).
For n>1, Sum_{k=1..n} a(gcd(n,k))*mu(a(gcd(n,k)))*phi(gcd(n,k))/gcd(n,k) = 0.
For n>1, Sum_{k=1..n} a(n/gcd(n,k))*mu(a(n/gcd(n,k)))*phi(gcd(n,k))*gcd(n,k) = 0. (End)
a(n) = (-1)^omega(n) * Sum_{d|n} mu(d)*psi(d), where omega = A001221 and psi = A001615. - Ridouane Oudra, Aug 01 2025

Extensions

More terms from several people including David W. Wilson
Definition expanded by Jonathan Sondow, Apr 26 2013

A033879 Deficiency of n, or 2n - (sum of divisors of n).

Original entry on oeis.org

1, 1, 2, 1, 4, 0, 6, 1, 5, 2, 10, -4, 12, 4, 6, 1, 16, -3, 18, -2, 10, 8, 22, -12, 19, 10, 14, 0, 28, -12, 30, 1, 18, 14, 22, -19, 36, 16, 22, -10, 40, -12, 42, 4, 12, 20, 46, -28, 41, 7, 30, 6, 52, -12, 38, -8, 34, 26, 58, -48, 60, 28, 22, 1, 46, -12, 66, 10, 42, -4, 70, -51
Offset: 1

Views

Author

Keywords

Comments

Records for the sequence of the absolute values are in A075728 and the indices of these records in A074918. - R. J. Mathar, Mar 02 2007
a(n) = 1 iff n is a power of 2. a(n) = n - 1 iff n is prime. - Omar E. Pol, Jan 30 2014
If a(n) = 1 then n is called a least deficient number or an almost perfect number. All the powers of 2 are least deficient numbers but it is not known if there exists a least deficient number that is not a power of 2. See A000079. - Jianing Song, Oct 13 2019
It is not known whether there are any -1's in this sequence. See comment in A033880. - Antti Karttunen, Feb 02 2020

Examples

			For n = 10 the divisors of 10 are 1, 2, 5, 10, so the deficiency of 10 is 10 minus the sum of its proper divisors or simply 10 - 5 - 2 - 1 = 2. - _Omar E. Pol_, Dec 27 2013
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B2, pp. 74-84.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 147.

Crossrefs

Cf. A000396 (positions of zeros), A005100 (of positive terms), A005101 (of negative terms).
Cf. A141545 (positions of a(n) = -12).
For this sequence applied to various permutations of natural numbers and some other sequences, see A323174, A323244, A324055, A324185, A324546, A324574, A324575, A324654, A325379.

Programs

Formula

a(n) = -A033880(n).
a(n) = A005843(n) - A000203(n). - Omar E. Pol, Dec 14 2008
a(n) = n - A001065(n). - Omar E. Pol, Dec 27 2013
G.f.: 2*x/(1 - x)^2 - Sum_{k>=1} k*x^k/(1 - x^k). - Ilya Gutkovskiy, Jan 24 2017
a(n) = A286385(n) - A252748(n). - Antti Karttunen, May 13 2017
From Antti Karttunen, Dec 29 2017: (Start)
a(n) = Sum_{d|n} A083254(d).
a(n) = Sum_{d|n} A008683(n/d)*A296075(d).
a(n) = A065620(A295881(n)) = A117966(A295882(n)).
a(n) = A294898(n) + A000120(n).
(End)
From Antti Karttunen, Jun 03 2019: (Start)
Sequence can be represented in arbitrarily many ways as a difference of the form (n - f(n)) - (g(n) - n), where f and g are any two sequences whose sum f(n)+g(n) = sigma(n). Here are few examples:
a(n) = A325314(n) - A325313(n) = A325814(n) - A034460(n) = A325978(n) - A325977(n).
a(n) = A325976(n) - A325826(n) = A325959(n) - A325969(n) = A003958(n) - A324044(n).
a(n) = A326049(n) - A326050(n) = A326055(n) - A326054(n) = A326044(n) - A326045(n).
a(n) = A326058(n) - A326059(n) = A326068(n) - A326067(n).
a(n) = A326128(n) - A326127(n) = A066503(n) - A326143(n).
a(n) = A318878(n) - A318879(n).
a(A228058(n)) = A325379(n). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = 1 - Pi^2/12 = 0.177532... . - Amiram Eldar, Dec 07 2023

Extensions

Definition corrected by N. J. A. Sloane, Jul 04 2005

A280292 a(n) = sopfr(n) - sopf(n).

Original entry on oeis.org

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

Views

Author

Michel Marcus, Dec 31 2016

Keywords

Comments

Alladi and Erdős (1977) proved that for all numbers m>=0, m!=1, the sequence of numbers k such that a(k) = m has a positive asymptotic density which is equal to a rational multiple of 1/zeta(2) = 6/Pi^2 (A059956). For example, when m=0, the sequence is the squarefree numbers (A005117), whose density is 6/Pi^2, and when m=2 the sequence is A081770, whose density is 1/Pi^2. - Amiram Eldar, Nov 02 2020
Sum of prime factors minus sum of distinct prime factors. Counting partitions by this statistic (sum minus sum of distinct parts) gives A364916. - Gus Wiseman, Feb 21 2025

References

  • Jean-Marie De Koninck and Aleksandar Ivić, Topics in Arithmetical Functions: Asymptotic Formulae for Sums of Reciprocals of Arithmetical Functions and Related Fields, Amsterdam, Netherlands: North-Holland, 1980. See pp. 164-166.
  • Steven R. Finch, Mathematical Constants II, Encyclopedia of Mathematics and Its Applications, Cambridge University Press, Cambridge, 2018, p. 165.

Crossrefs

A multiplicative version is A003557, firsts A064549 (sorted A001694).
For length instead of sum we have A046660.
For product instead of sum we have A066503, firsts A381076.
Positions of first appearances are A280286 (sorted A381075).
For indices instead of factors we have A380955, firsts A380956 (sorted A380957).
For exponents instead of factors we have A380958, firsts A380989.
A000040 lists the primes, differences A001223.
A001222 counts prime factors (distinct A001221).
A003963 gives product of prime indices, distinct A156061, excess A380986.
A005117 lists squarefree numbers, complement A013929.
A007947 gives squarefree kernel.
A020639 gives least prime factor (index A055396), greatest A061395 (index A006530).
A027746 lists prime factors, distinct A027748.
A112798 lists prime indices (sum A056239), distinct A304038 (sum A066328).

Programs

  • Mathematica
    Array[Total@ # - Total@ Union@ # &@ Flatten[ConstantArray[#1, #2] & @@@ FactorInteger@ #] &, 105] (* Michael De Vlieger, Feb 25 2019 *)
  • PARI
    sopfr(n) = my(f=factor(n)); sum(j=1, #f~, f[j, 1]*f[j, 2]);
    sopf(n) = my(f=factor(n)); sum(j=1, #f~, f[j, 1]);
    a(n) = sopfr(n) - sopf(n);

Formula

a(n) = A001414(n) - A008472(n).
a(A005117(n)) = 0.
a(n) = A001414(A003557(n)). - Antti Karttunen, Oct 07 2017
Additive with a(1) = 0 and a(p^e) = p*(e-1) for prime p and e > 0. - Werner Schulte, Feb 24 2019
From Amiram Eldar, Nov 02 2020: (Start)
a(n) = a(A057521(n)).
Sum_{n<=x} a(n) ~ x*log(log(x)) + O(x) (Alladi and Erdős, 1977).
Sum_{n<=x, n nonsquarefree} 1/a(n) ~ c*x + O(sqrt(x)*log(x)), where c = Integral_{t=0..1} (F(t)-6/Pi^2)/t dt, and F(t) = Product_{p prime} (1-1/p)*(1-1/(t^p - p)) (De Koninck et al., 1981; Finch, 2018), or, equivalently c = Sum_{k>=2} d(k)/k = 0.1039..., where d(k) = (6/Pi^2)*A338559(k)/A338560(k) is the asymptotic density of the numbers m with a(m) = k (Alladi and Erdős, 1977; Ivić, 2003). (End)

Extensions

More terms from Antti Karttunen, Oct 07 2017

A280286 a(n) is the least k such that sopfr(k) - sopf(k) = n.

Original entry on oeis.org

4, 9, 8, 25, 16, 49, 32, 81, 64, 121, 128, 169, 256, 625, 512, 289, 1024, 361, 2048, 1444, 1331, 529, 5324, 2116, 2197, 4232, 8788, 841, 17576, 961, 7569, 3844, 4913, 7688, 19652, 1369, 6859, 5476, 12321, 1681, 34225, 1849, 15129, 7396, 12167, 2209, 46225, 8836, 19881
Offset: 2

Views

Author

Michel Marcus, Dec 31 2016

Keywords

Crossrefs

Cf. A001414 (sopfr), A008472 (sopf), A001248, A280163.
A multiplicative version is A064549 (sorted A001694), firsts of A003557.
For length instead of sum we have A151821.
These are the positions of first appearances in A280292 = A001414 - A008472.
For indices instead of factors we have A380956 (sorted A380957), firsts of A380955.
A multiplicative version for indices is A380987 (sorted A380988), firsts of A290106.
For prime exponents instead of factors we have A380989, firsts of A380958.
The sorted version is A381075.
For product instead of sum see A381076, sorted firsts of A066503.
A000040 lists the primes, differences A001223.
A005117 lists squarefree numbers, complement A013929.
A020639 gives least prime factor (index A055396), greatest A061395 (index A006530).
A056239 adds up prime indices, row sums of A112798.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[Apply[ConstantArray,FactorInteger[n],{1}]]];
    q=Table[Total[prifacs[n]]-Total[Union[prifacs[n]]],{n,1000}];
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    Table[Position[q,k][[1,1]],{k,2,mnrm[q/.(0->1)]}] (* Gus Wiseman, Feb 20 2025 *)
  • PARI
    sopfr(n) = my(f=factor(n)); sum(j=1, #f~, f[j,1]*f[j,2]);
    sopf(n) = my(f=factor(n)); sum(j=1, #f~, f[j,1]);
    a(n) = {my(k = 2); while (sopfr(k) - sopf(k) != n, k++); k;}

Formula

For p prime, a(p) = p^2 (see A001248).

A381075 Sorted positions of first appearances in A280292 (sum of prime factors minus sum of distinct prime factors).

Original entry on oeis.org

1, 4, 8, 9, 16, 25, 32, 49, 64, 81, 121, 128, 169, 256, 289, 361, 512, 529, 625, 841, 961, 1024, 1331, 1369, 1444, 1681, 1849, 2048, 2116, 2197, 2209, 2809, 3481, 3721, 3844, 4232, 4489, 4913, 5041, 5324, 5329, 5476, 6241, 6859, 6889, 7396, 7569, 7688, 7921
Offset: 1

Views

Author

Gus Wiseman, Feb 18 2025

Keywords

Examples

			The initial terms of A280292 are (0,0,0,2,0,0,0,4,3,0,0,2,0,0,0,6,0,3,0,2,0,0,0,4,5,0,6,2,...), wherein a value appears for the first time at positions 1, 4, 8, 9, 16, 25, ...
		

Crossrefs

For length instead of sum we have A151821.
The unsorted version is A280286, firsts of A280292.
For indices instead of factors we have A380957 (unsorted A380956), firsts of A380955.
A multiplicative version is A380988 (unsorted A380987), firsts of A290106.
For prime multiplicities instead of factors see A380989, firsts of A380958.
For product instead of sum we have A381076, sorted firsts of A066503.
A000040 lists the primes, differences A001223.
A005117 lists squarefree numbers, complement A013929.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A364916 counts partitions by (sum minus sum of distinct parts).

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[Apply[ConstantArray,FactorInteger[n],{1}]]];
    q=Table[Total[prifacs[n]]-Total[Union[prifacs[n]]],{n,10000}];
    Select[Range[Length[q]],FreeQ[Take[q,#-1],q[[#]]]&]
  • PARI
    f(n) = my(f=factor(n)); sum(j=1, #f~, f[j, 1]*f[j, 2] - f[j, 1]); \\ A280292
    lista(nn) = my(v=Set(vector(nn, i, f(i))), list=List()); for (i=1, #v, my(k=1); while(f(k) != v[i], k++); listput(list, k)); vecsort(Vec(list)); \\ Michel Marcus, Apr 15 2025

Formula

Sorted positions of first appearances in A001414 - A008472.

A326143 a(n) = A326142(n) - n, where A326142 gives the sum of all other divisors of n except its largest squarefree divisor.

Original entry on oeis.org

-1, -1, -2, 1, -4, 0, -6, 5, 1, -2, -10, 10, -12, -4, -6, 13, -16, 15, -18, 12, -10, -8, -22, 30, 1, -10, 10, 14, -28, 12, -30, 29, -18, -14, -22, 49, -36, -16, -22, 40, -40, 12, -42, 18, 18, -20, -46, 70, 1, 33, -30, 20, -52, 60, -38, 50, -34, -26, -58, 78, -60, -28, 20, 61, -46, 12, -66, 24, -42, 4, -70, 117, -72, -34, 34, 26, -58, 12
Offset: 1

Views

Author

Antti Karttunen, Jun 09 2019

Keywords

Crossrefs

Programs

  • Mathematica
    rad[n_] := Times @@ FactorInteger[n][[;; , 1]]; a[n_] := DivisorSigma[1, n] - rad[n] - n; Array[a, 100] (* Amiram Eldar, Dec 05 2023 *)
  • PARI
    A007947(n) = factorback(factorint(n)[, 1]);
    A326143(n) = (sigma(n)-A007947(n)-n);

Formula

a(n) = A326142(n) - n = (A000203(n)-A007947(n)) - n = A001065(n) - A007947(n).
a(n) = A066503(n) - A033879(n).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = A013661 - A065463 - 1 = -0.0595081... . - Amiram Eldar, Dec 05 2023

A380986 Product of prime indices of n (with multiplicity) minus product of distinct prime indices of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 6, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 12, 6, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 12, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Feb 14 2025

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 300 are {1,1,2,3,3}, so a(300) = 18 - 6 = 12.
		

Crossrefs

Positions of nonzeros are A038838.
For length instead of product we have A046660.
For factors instead of indices we have A066503, see A007947 (squarefree kernel).
For sum of factors instead of product of indices we have A280292, see A280286, A381075.
For quotient instead of difference we have A290106, for factors A003557.
For sum instead of product we have A380955 (firsts A380956, sorted A380957).
A000040 lists the primes, differences A001223.
A003963 gives product of prime indices, distinct A156061.
A005117 lists the squarefree numbers, complement A013929.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, length A001222.
A304038 lists distinct prime indices, sum A066328, length A001221.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Times@@prix[n]-Times@@Union[prix[n]],{n,100}]

Formula

a(n) = A003963(n) - A156061(n).
Showing 1-10 of 23 results. Next