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.

A366737 Number of numbers k <= A056239(n) that can be written as a linear combination of the prime indices of n (allowing coefficients of 0).

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 3, 2, 4, 1, 4, 1, 5, 4, 4, 1, 5, 1, 5, 3, 6, 1, 5, 2, 7, 3, 6, 1, 6, 1, 5, 5, 8, 4, 6, 1, 9, 4, 6, 1, 7, 1, 7, 6, 10, 1, 6, 2, 7, 6, 8, 1, 7, 4, 7, 5, 11, 1, 7, 1, 12, 4, 6, 3, 8, 1, 9, 7, 8, 1, 7, 1, 13, 7, 10, 4, 9, 1, 7, 4, 14, 1, 8, 5
Offset: 1

Views

Author

Gus Wiseman, Oct 19 2023

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 33 are {2,5}, with combinations
  2 = 2
  4 = 2+2
  5 = 5
  6 = 2+2+2
  7 = 5+2
Hence a(33) = 5.
		

Crossrefs

For minimum instead of length we have A055396.
Positions of first appearances are 1, 2, and A100484.
For subsets instead of combinations we have A304793, complement A325799.
A056239 adds up prime indices, row sums of A112798.
A126796 counts complete partitions, ranks A325781, strict A188431.
A276024 counts positive subset-sums of partitions, strict A284640.
A365924 counts incomplete partitions, ranks A365830, strict A365831.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Range[Total[prix[n]]],combs[#,prix[n]]!={}&]],{n,30}]

Formula

a(2n) = A056239(2n) - 1 for n > 0.