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-4 of 4 results.

A380958 Number of prime factors of n (with multiplicity) minus sum of distinct prime exponents of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 1, 1, 2, 0, 1, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 0, 1, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Feb 13 2025

Keywords

Examples

			The prime factors of 2100 are {2,2,3,5,5,7}, with distinct multiplicities {1,2}, so a(2100) = 6 - (1+2) = 3.
		

Crossrefs

Positions of 0's are A130091, complement A130092.
The RHS (sum of distinct prime exponents) is A136565.
For prime factors instead of exponents see A280292, firsts A280286, sorted A381075.
For prime indices instead of exponents see A380955, firsts A380956, sorted A380957.
Position of first appearance of n is A380989(n).
A000040 lists the primes, differences A001223.
A005117 lists squarefree numbers, complement A013929.
A005361 gives product of prime signature.
A055396 gives least prime index, greatest A061395.
A056239 (reverse A296150) adds up prime indices, row sums of A112798, counted by A001222.
A124010 lists prime exponents (signature); see A001222, A001221, A051903, A051904.

Programs

  • Mathematica
    Table[PrimeOmega[n]-Total[Union[Last/@If[n==1,{},FactorInteger[n]]]],{n,100}]

Formula

a(n) = A001222(n) - A136565(n).

A380989 Position of first appearance of n in A380958 (number of prime factors minus sum of distinct prime exponents).

Original entry on oeis.org

1, 6, 30, 210, 900, 7776, 27000, 279936, 810000, 9261000, 24300000, 362797056, 729000000, 13060694016, 21870000000, 408410100000, 656100000000, 16926659444736, 19683000000000, 609359740010496, 590490000000000, 18010885410000000, 17714700000000000
Offset: 0

Views

Author

Gus Wiseman, Feb 18 2025

Keywords

Comments

Is this sequence strictly increasing?
From David Consiglio, Jr., Feb 20 2025: (Start)
The answer to the question above is: no, a(21) < a(20). And all subsequent odd indexed terms are lower than their even predecessors.
All terms must be a product of x primes (with multiplicity) to the y power where x-y = n and x mod y = 0. There are very few combinations of numbers that meet these criteria, so checking all of them to find the minimum outcome is quite fast.
Example --> n=5
6 primes to the 1 power --> 6 distinct primes
2*3*5*7*11*13 = 30030
7 primes to the 2 power -- disallowed (5 mod 2 = 1)
8 primes to the 3 power -- disallowed (4 mod 3 = 1)
9 primes to the 4 power -- disallowed (9 mod 4 = 1)
10 primes to the 5 power --> 2 distinct primes
2*2*2*2*2*3*3*3*3*3 = 7776
The minimum value is 7776 and thus a(5) = 7776. (End)

Examples

			The terms together with their prime indices begin:
        1: {}
        6: {1,2}
       30: {1,2,3}
      210: {1,2,3,4}
      900: {1,1,2,2,3,3}
     7776: {1,1,1,1,1,2,2,2,2,2}
    27000: {1,1,1,2,2,2,3,3,3}
   279936: {1,1,1,1,1,1,1,2,2,2,2,2,2,2}
   810000: {1,1,1,1,2,2,2,2,3,3,3,3}
  9261000: {1,1,1,2,2,2,3,3,3,4,4,4}
		

Crossrefs

Position of first appearance of n in A001222 - A136565.
For factors instead of exponents we have A280286 (sorted A381075), firsts of A280292.
For indices instead of exponents we have A380956 (sorted A380957), firsts of A380955.
A000040 lists the primes, differences A001223.
A005361 gives product of prime exponents.
A055396 gives least prime index, greatest A061395.
A056239 (reverse A296150) adds up prime indices, row sums of A112798.
A124010 lists prime exponents (signature); A001221, A051903, A051904.

Programs

  • Mathematica
    prisig[n_]:=If[n==1,{},Last/@FactorInteger[n]];
    q=Table[Total[prisig[n]]-Total[Union[prisig[n]]],{n,10000}];
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    Table[Position[q,k][[1,1]],{k,0,mnrm[q+1]-1}]

Extensions

a(10)-a(11) from Michel Marcus, Feb 20 2025
a(12) and beyond from David Consiglio, Jr., Feb 20 2025

A075653 a(n) = n + sopf(n), where sopf is the sum of the distinct prime factors of n (A008472).

Original entry on oeis.org

1, 4, 6, 6, 10, 11, 14, 10, 12, 17, 22, 17, 26, 23, 23, 18, 34, 23, 38, 27, 31, 35, 46, 29, 30, 41, 30, 37, 58, 40, 62, 34, 47, 53, 47, 41, 74, 59, 55, 47, 82, 54, 86, 57, 53, 71, 94, 53, 56, 57, 71, 67, 106, 59, 71, 65, 79, 89, 118, 70, 122, 95, 73, 66, 83, 82, 134, 87, 95
Offset: 1

Views

Author

Joseph L. Pe, Oct 11 2002

Keywords

Comments

For 1 <= k <= n, add sigma(k) if k is a prime factor of n, otherwise add 1. For example, a(6) = 11 since for k = 1,2,.. we have 1 + sigma(2) + sigma(3) + 1 + 1 + 1 = 1 + (1+2) + (1+3) + 1 + 1 + 1 = 11. - Wesley Ivan Hurt, Oct 18 2021

Examples

			6 + sum of prime factors of 6 = 6 + 2 + 3 = 11, so a(6) = 11.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Append[{1}, Table[n + Apply[Plus, Transpose[FactorInteger[n]][[1]]], {n, 2, 100}]]]
    Join[{1},Table[n+Total[FactorInteger[n][[All,1]]],{n,2,70}]] (* Harvey P. Dale, Sep 29 2016 *)
  • PARI
    a(n) = n + vecsum(factor(n)[,1]); \\ Michel Marcus, Feb 22 2017

Formula

a(n) = n + A008472(n).
a(p) = 2p for primes p. - Wesley Ivan Hurt, Oct 18 2021

A208614 Number of partitions of n into distinct primes where all of the prime factors of n are represented in the partition.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 3, 1, 4, 2, 1, 1, 1, 3, 2, 1, 1, 3, 1, 1, 2, 3, 1, 2, 1, 3, 4, 2, 1, 5, 9, 6, 5, 4, 1, 6, 6, 7, 4, 3, 1, 4, 1, 4, 9, 20, 7, 3, 1, 7, 8, 6, 1, 15, 1, 5, 19, 11, 13, 9, 1, 21, 52, 7, 1
Offset: 0

Views

Author

Richard Penner, Feb 29 2012

Keywords

Comments

Inspired by web-based discussion started by Rajesh Bhowmick.

Examples

			a(p) = 1 for any prime p.
a(n) = 0 for 1, 4, 6, 8, 9, 22.
a(25) = 3 because 25 = 3 + 5 + 17 = 5 + 7 + 13 = 2 + 5 + 7 + 11.
		

Crossrefs

Cf. A000586 (upper bound). A000586(A076694(n)) is a stricter upper bound.

Programs

  • Maple
    with(numtheory):
    a:= proc(n) local b, l, f;
          b:= proc(h, j) option remember;
                `if`(h=0, 1, `if`(j<1, 0,
                `if`(l[j]>h, 0, b(h-l[j], j-1)) +b(h, j-1)))
              end; forget(b);
          f:= factorset(n);
          l:= sort([({seq(ithprime(i), i=1..pi(n))} minus f)[]]);
          b(n-add(i, i=f), nops(l))
        end:
    seq(a(n), n=0..300);  # Alois P. Heinz, Mar 20 2012
  • Mathematica
    restrictedIntegerPartition[ n_Integer, list_List ] := 1 /; n == 0
    restrictedIntegerPartition[ n_Integer, list_List ] := 0 /; n < 0 || Total[list] < n || n < Min[list]
    restrictedIntegerPartition[ n_Integer, list_List ] := restrictedIntegerPartition[n - First[list], Rest[list]] + restrictedIntegerPartition[n, Rest[list]]
    distinctPrimeFactors[ n_Integer ] := distinctPrimeFactors[n] = Map[First, FactorInteger[n]]
    oeisA076694[ n_Integer ] := oeisA076694[n] = n - Total[distinctPrimeFactors[n]]
    oeisA208614[ n_Integer ] := restrictedIntegerPartition[oeisA076694[n], Sort[Complement[Prime @ Range @ PrimePi @ oeisA076694 @ n, distinctPrimeFactors[n]] , Greater ]]
    Table[oeisA208614[n], {n,1,100}]
  • Maxima
    countRestrictedIntegerPartitions(n, L) := if ( n = 0 ) then 1 else if ( ( n < 0 ) or ( lsum(k, k, L) < n ) or ( n < lmin( L ) ) ) then 0 else block( [ m, R ], m : first(L), R : rest(L), countRestrictedIntegerPartitions(n, R) + countRestrictedIntegerPartitions(n - m, R));
    distinctPrimeFactors(n) := map(first,ifactors(n));
    oeisA076694(n) := n - lsum(k,k,distinctPrimeFactors(n));
    listOfPrimesLessThanOrEqualTo (n) := block( [ list : [] , i], for i : 2 step 0 while i <= n do ( list : cons(i, list) , i : next_prime(i) ) , list );
    oeisA208614(n) := block([ m, list ], m : oeisA076694(n), list : sort(listify(setdifference(setify(listOfPrimesLessThanOrEqualTo(m)), setify(distinctPrimeFactors(n)))), ordergreatp), countRestrictedIntegerPartitions(m, list));
    makelist(oeisA208614(j), j, 1, 100);
Showing 1-4 of 4 results.