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.

Previous Showing 11-14 of 14 results.

A316151 Heinz numbers of strict integer partitions of prime numbers into prime parts.

Original entry on oeis.org

3, 5, 11, 15, 17, 31, 33, 41, 59, 67, 83, 93, 109, 127, 157, 177, 179, 191, 211, 241, 277, 283, 327, 331, 353, 367, 401, 431, 461, 509, 537, 547, 563, 587, 599, 617, 709, 739, 773, 797, 831, 859, 877, 919, 967, 991, 1031, 1059, 1063, 1087, 1153, 1171, 1201
Offset: 1

Views

Author

Gus Wiseman, Jun 25 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			Sequence of strict integer partitions of prime numbers into prime parts, preceded by their Heinz numbers, begins:
   3: (2)
   5: (3)
  11: (5)
  15: (3,2)
  17: (7)
  31: (11)
  33: (5,2)
  41: (13)
  59: (17)
  67: (19)
  83: (23)
  93: (11,2)
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],And[SquareFreeQ[#],PrimeQ[Total[primeMS[#]]],And@@PrimeQ/@primeMS[#]]&]

A331901 Number of compositions (ordered partitions) of the n-th prime into distinct prime parts.

Original entry on oeis.org

1, 1, 3, 3, 1, 3, 25, 9, 61, 91, 99, 151, 901, 303, 1759, 3379, 5239, 4713, 8227, 12901, 12537, 23059, 65239, 159421, 232369, 489817, 351237, 726295, 564363, 1101883, 2517865, 6916027, 11825821, 4942227, 27166753, 21280053, 39547957, 52630273, 113638975
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 31 2020

Keywords

Examples

			a(4) = 3 because we have [7], [5, 2] and [2, 5].
		

Crossrefs

Programs

  • Maple
    s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    b:= proc(n, i, t) option remember; `if`(s(i)`if`(p>n, 0, b(n-p, i-1, t+1)))(ithprime(i))+b(n, i-1, t)))
        end:
    a:= n-> b(ithprime(n), n, 0):
    seq(a(n), n=1..42);  # Alois P. Heinz, Jan 31 2020
  • Mathematica
    s[n_] := s[n] = If[n < 1, 0, Prime[n] + s[n - 1]];
    b[n_, i_, t_] := b[n, i, t] = If[s[i] < n, 0, If[n == 0, t!, Function[p, If[p > n, 0, b[n - p, i - 1, t + 1]]][Prime[i]] + b[n, i - 1, t]]];
    a[n_] := b[Prime[n], n, 0];
    Array[a, 42] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)

Formula

a(n) = A219107(A000040(n)).

A334292 Number of sets of primes less than the n-th prime whose sum is the n-th prime.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 1, 2, 4, 6, 8, 10, 13, 14, 18, 25, 34, 38, 49, 60, 66, 86, 101, 129, 177, 203, 223, 256, 277, 319, 521, 594, 723, 775, 1063, 1135, 1363, 1633, 1835, 2191, 2600, 2760, 3644, 3862, 4293, 4548, 6261, 8557, 9452, 9963, 11000, 12773, 13437, 17121, 19774, 22799
Offset: 1

Views

Author

Gil Broussard, Apr 21 2020

Keywords

Examples

			a(5) = 0 because 11 is the 5th prime and there are 0 sets of primes < 11 whose sum = 11.
a(9) = 4 because 23 is the 9th prime and there are 4 sets of primes < 23 whose sums = 23: 13+7+3, 13+5+3+2, 11+7+5, 11+7+3+2.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(v, w=primes(nn)); v=Vec(prod(i=1, nn, 1+'x^w[i]) + O('x^(w[nn]+1))); for(i=1, nn, print1(v[w[i]+1]-1, ", ")); } \\ Jinyuan Wang, May 04 2020

Formula

Same generating function as A111133, but on the domain of prime numbers.
a(n) = A070215(n) - 1. - Jinyuan Wang, May 04 2020

Extensions

More terms from David A. Corneth, Apr 22 2020

A335306 a(n) is the smallest composite number whose sum of distinct prime divisors is prime(n).

Original entry on oeis.org

4, 9, 6, 10, 121, 22, 210, 34, 273, 399, 58, 435, 651, 82, 777, 903, 1645, 118, 885, 1281, 142, 1065, 1533, 1659, 1335, 3115, 202, 2037, 214, 2163, 3729, 6213, 2667, 274, 2919, 298, 2235, 4917, 3297, 3423, 5845, 358, 3801, 382, 7059, 394, 6501, 7385, 8229, 454, 4683
Offset: 1

Views

Author

David James Sycamore, May 31 2020

Keywords

Comments

a(n) <= prime(n)^2 for all n, the equality applies to n = 1,2,5 since 2,3,11 are the only primes which cannot be expressed as the sum of distinct smaller primes. For n other than 1,2,5, a(n) is squarefree, and corresponds to the partition (q_1, q_2,....q_k) of n into distinct primes whose product is the least possible value compared with the product of all distinct prime partitions of n. The intersection of this sequence with A261023 corresponds to primes in A133225.
a(n) >= max(4,2*prime(n)-4) with equality if and only if n = 1 or n is in A107770. - Chai Wah Wu, Jun 01 2020

Examples

			a(7) = 10 since (2,5) is the only prime partition of 7 into distinct smaller parts, and 2*5 = 10. a(11) = 11^2 = 121 because the prime partitions of 11 into smaller parts are: (2,2,7), (2,2,2,5), (2,2,2,2,3), (3,3,5), (2,3,3,3), none of which have only distinct primes.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{k = 4, p = Prime@ n}, While[PrimeQ[k] || p != Total[First /@ FactorInteger[k]], k++]; k]; Array[a, 50] (* Giovanni Resta, May 31 2020 *)
  • PARI
    a(n) = {my(p=prime(n)); forcomposite(k=1, p^2, if (vecsum(factor(k)[, 1]) == p, return(k)););} \\ Michel Marcus, May 31 2020
    
  • Python
    from sympy import prime, primefactors
    def A335306(n):
        p = prime(n)
        for m in range(max(4,2*p-4),p**2+1):
            if sum(primefactors(m)) == p:
                return m # Chai Wah Wu, Jun 01 2020

Extensions

More terms from Michel Marcus, May 31 2020
Previous Showing 11-14 of 14 results.