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

A304465 If n is prime, set a(n) = 1. Otherwise, start with the multiset of prime factors of n, and given a multiset take the multiset of its multiplicities. Repeating this until a multiset of size 1 is reached, set a(n) to the unique element of this multiset.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 2, 1, 2, 2, 4, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 3, 2, 1, 3, 1, 5, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 6, 2, 3, 1, 2, 2, 3, 1, 2, 1, 2, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 2, 3
Offset: 1

Views

Author

Gus Wiseman, May 13 2018

Keywords

Comments

a(1) = 0 by convention.
a(n) depends only on prime signature of n (cf. A025487). - Antti Karttunen, Nov 08 2018

Examples

			Starting with the multiset of prime factors of 2520 we have {2,2,2,3,3,5,7} -> {1,1,2,3} -> {1,1,2} -> {1,2} -> {1,1} -> {2}, so a(2520) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Switch[n,1,0,?PrimeQ,1,,NestWhile[Sort[Length/@Split[#]]&,Sort[Last/@FactorInteger[n]],Length[#]>1&]//First],{n,100}]
  • PARI
    A181819(n) = factorback(apply(e->prime(e),(factor(n)[,2])));
    A304465(n) = if(1==n,0,my(t=isprimepower(n)); if(t,t, t=omega(n); if(bigomega(n)==t),t,A304465(A181819(n)))); \\ Antti Karttunen, Nov 08 2018

Formula

a(p^n) = n where p is any prime number.
a(product of n distinct primes) = n.
a(1) = 0; and for n > 1, if n = prime^k, a(n) = k, otherwise, if n is squarefree [i.e., A001221(n) = A001222(n)], a(n) = A001221(n), otherwise a(n) = a(A181819(n)). - Antti Karttunen, Nov 08 2018

Extensions

More terms from Antti Karttunen, Nov 08 2018

A304464 Start with the normalized multiset of prime factors of n > 1. Given a multiset, take the multiset of its multiplicities. Repeat this until a multiset of size 1 is obtained. a(n) is the unique element of this multiset.

Original entry on oeis.org

0, 1, 2, 2, 3, 2, 4, 3, 2, 2, 5, 2, 6, 2, 2, 4, 7, 2, 8, 2, 2, 2, 9, 2, 2, 2, 3, 2, 10, 3, 11, 5, 2, 2, 2, 2, 12, 2, 2, 2, 13, 3, 14, 2, 2, 2, 15, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 17, 2, 18, 2, 2, 6, 2, 3, 19, 2, 2, 3, 20, 2, 21, 2, 2, 2, 2, 3, 22, 2, 4, 2, 23
Offset: 1

Views

Author

Gus Wiseman, May 13 2018

Keywords

Comments

a(1) = 0 by convention.

Examples

			Starting with the normalized multiset of prime factors of 360, we obtain {1,1,1,2,2,3} -> {1,2,3} -> {1,1,1} -> {3}, so a(360) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[If[n===1,0,NestWhile[Sort[Length/@Split[#]]&,If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]],Length[#]>1&]//First],{n,100}]

Formula

a(prime(n)) = n.
a(p^n) = n where p is any prime number and n > 1.
a(product of n > 1 distinct primes) = n.

A304455 Number of steps in the reduction to a multiset of size 1 of the multiset of prime factors of n, obtained by repeatedly taking the multiset of multiplicities.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 1, 1, 2, 0, 3, 0, 2, 2, 1, 0, 3, 0, 3, 2, 2, 0, 3, 1, 2, 1, 3, 0, 2, 0, 1, 2, 2, 2, 2, 0, 2, 2, 3, 0, 2, 0, 3, 3, 2, 0, 3, 1, 3, 2, 3, 0, 3, 2, 3, 2, 2, 0, 4, 0, 2, 3, 1, 2, 2, 0, 3, 2, 2, 0, 3, 0, 2, 3, 3, 2, 2, 0, 3, 1, 2, 0, 4, 2, 2, 2, 3, 0, 4, 2, 3, 2, 2, 2, 3, 0, 3, 3, 2, 0, 2, 0, 3, 2
Offset: 1

Views

Author

Gus Wiseman, May 12 2018

Keywords

Examples

			The a(2520) = 5 steps are {2,2,2,3,3,5,7} -> {1,1,2,3} -> {1,1,2} -> {1,2} -> {1,1} -> {2}.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[FixedPointList[Sort[Length/@Split[#]]&,If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[p,{k}]]]]],Length[#]>1&]],{n,100}]
  • PARI
    A181819(n) = factorback(apply(e->prime(e),(factor(n)[,2])));
    A304455(n) = if(n<=2,0, n=A181819(n); if(2==n,0,1+A304455(n))); \\ Antti Karttunen, Dec 06 2018

Formula

For n > 2, a(n) = A182850(n) - 1.
a(prime(n)) = 0.
a(A246547(n)) = 1.

Extensions

More terms from Antti Karttunen, Dec 06 2018

A303974 Regular triangle where T(n,k) is the number of aperiodic multisets of size k that fit within some normal multiset of size n.

Original entry on oeis.org

1, 2, 1, 3, 3, 3, 4, 6, 10, 6, 5, 10, 22, 23, 15, 6, 15, 40, 57, 62, 27, 7, 21, 65, 115, 165, 129, 63, 8, 28, 98, 205, 356, 385, 318, 120, 9, 36, 140, 336, 676, 914, 1005, 676, 252, 10, 45, 192, 518, 1176, 1885, 2524, 2334, 1524, 495, 11, 55, 255, 762, 1918, 3528, 5495, 6319, 5607, 3261, 1023
Offset: 1

Views

Author

Gus Wiseman, May 03 2018

Keywords

Comments

A multiset is normal if it spans an initial interval of positive integers. It is aperiodic if its multiplicities are relatively prime.

Examples

			Triangle begins:
1
2    1
3    3    3
4    6   10    6
5   10   22   23   15
6   15   40   57   62   27
7   21   65  115  165  129   63
8   28   98  205  356  385  318  120
9   36  140  336  676  914 1005  676  252
The a(4,3) = 10 multisets: (112), (113), (122), (123), (124), (133), (134), (223), (233), (234).
The a(5,4) = 23 multisets:
(1112), (1222),
(1113), (1123), (1223), (1233), (1333), (2223), (2333),
(1124), (1134), (1224), (1234), (1244), (1334), (1344), (2234), (2334), (2344),
(1235), (1245), (1345), (2345).
		

Crossrefs

Programs

  • Mathematica
    allnorm[n_Integer]:=Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1];
    Table[Length/@GatherBy[Select[Union@@Rest/@Subsets/@allnorm[n],GCD@@Length/@Split[#]===1&],Length],{n,10}]
  • PARI
    T(n,k)={sumdiv(k, d, moebius(k/d)*sum(i=1, d, binomial(d-1, i-1)*binomial(n-k+i, i)))} \\ Andrew Howroyd, Sep 18 2018

Formula

T(n,k) = Sum_{d|k} mu(k/d) * Sum_{i=1..d} binomial(d-1, i-1)*binomial(n-k+i, i). - Andrew Howroyd, Sep 18 2018

Extensions

Terms a(56) and beyond from Andrew Howroyd, Sep 18 2018

A303976 Number of different aperiodic multisets that fit within some normal multiset of size n.

Original entry on oeis.org

1, 3, 9, 26, 75, 207, 565, 1518, 4044, 10703, 28234, 74277, 195103, 511902, 1342147, 3517239, 9214412, 24134528, 63204417, 165505811, 433361425, 1134664831, 2970787794, 7777975396, 20363634815, 53313819160, 139579420528, 365427311171, 956707667616, 2504704955181
Offset: 1

Views

Author

Gus Wiseman, May 03 2018

Keywords

Comments

A multiset is normal if it spans an initial interval of positive integers. It is aperiodic if its multiplicities are relatively prime.

Examples

			The a(4) = 26 aperiodic multisets:
(1), (2), (3), (4),
(12), (13), (14), (23), (24), (34),
(112), (113), (122), (123), (124), (133), (134), (223), (233), (234),
(1112), (1123), (1222), (1223), (1233), (1234).
		

Crossrefs

Programs

  • Mathematica
    allnorm[n_Integer]:=Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1];
    Table[Length[Select[Union@@Rest/@Subsets/@allnorm[n],GCD@@Length/@Split[#]===1&]],{n,10}]
  • PARI
    seq(n)={Vec(sum(d=1, n, moebius(d)*x^d/(1 - x - x^d*(2-x)) + O(x*x^n))/(1-x))} \\ Andrew Howroyd, Feb 04 2021

Formula

a(n) = Sum_{k=1..n} Sum_{d|k} mu(k/d) * Sum_{i=1..d} binomial(d-1, i-1)*binomial(n-k+i, i). - Andrew Howroyd, Sep 18 2018
G.f.: Sum_{d>=1} mu(d)*x^d/((1 - x - x^d*(2-x))*(1-x)). - Andrew Howroyd, Feb 04 2021

Extensions

Terms a(13) and beyond from Andrew Howroyd, Sep 18 2018

A304450 Numbers that are not perfect powers and whose prime factors span an initial interval of prime numbers.

Original entry on oeis.org

2, 6, 12, 18, 24, 30, 48, 54, 60, 72, 90, 96, 108, 120, 150, 162, 180, 192, 210, 240, 270, 288, 300, 360, 384, 420, 432, 450, 480, 486, 540, 600, 630, 648, 720, 750, 768, 810, 840, 864, 960, 972, 1050, 1080, 1152, 1200, 1260, 1350, 1440, 1458, 1470, 1500, 1536
Offset: 1

Views

Author

Gus Wiseman, May 12 2018

Keywords

Comments

The multiset of prime indices of a(n) is the a(n)-th row of A112798. This multiset is normal, meaning it spans an initial interval of positive integers, and aperiodic, meaning its multiplicities are relatively prime.

Examples

			Sequence of all normal aperiodic multisets begins
2:   {1}
6:   {1,2}
12:  {1,1,2}
18:  {1,2,2}
24:  {1,1,1,2}
30:  {1,2,3}
48:  {1,1,1,1,2}
54:  {1,2,2,2}
60:  {1,1,2,3}
72:  {1,1,1,2,2}
90:  {1,2,2,3}
96:  {1,1,1,1,1,2}
108: {1,1,2,2,2}
120: {1,1,1,2,3}
150: {1,2,3,3}
162: {1,2,2,2,2}
180: {1,1,2,2,3}
192: {1,1,1,1,1,1,2}
210: {1,2,3,4}
240: {1,1,1,1,2,3}
270: {1,2,2,2,3}
288: {1,1,1,1,1,2,2}
300: {1,1,2,3,3}
360: {1,1,1,2,2,3}
384: {1,1,1,1,1,1,1,2}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],FactorInteger[#][[-1,1]]==Prime[Length[FactorInteger[#]]]&&GCD@@FactorInteger[#][[All,2]]===1&]
  • PARI
    ok(n)={my(f=factor(n)[,1]); #f && !ispower(n) && #f==primepi(f[#f])} \\ Andrew Howroyd, Aug 26 2018

Formula

Intersection of A007916 and A055932.

A304623 Regular triangle where T(n,k) is the number of aperiodic multisets with maximum k that fit within some normal multiset of weight n.

Original entry on oeis.org

1, 1, 2, 1, 4, 4, 1, 6, 11, 8, 1, 10, 21, 27, 16, 1, 12, 38, 61, 63, 32, 1, 18, 57, 120, 162, 143, 64, 1, 22, 87, 205, 347, 409, 319, 128, 1, 28, 122, 333, 651, 950, 1000, 703, 256, 1, 32, 164, 506, 1132, 1926, 2504, 2391, 1535, 512, 1, 42, 217, 734, 1840
Offset: 1

Views

Author

Gus Wiseman, May 15 2018

Keywords

Comments

A multiset is normal if it spans an initial interval of positive integers, and is aperiodic if its multiplicities are relatively prime.

Examples

			Triangle begins:
1
1    2
1    4    4
1    6   11    8
1   10   21   27   16
1   12   38   61   63   32
1   18   57  120  162  143   64
1   22   87  205  347  409  319  128
The a(4,3) = 11 multisets are (3), (13), (23), (113), (123), (133), (223), (233), (1123), (1223), (1233).
		

Crossrefs

Programs

  • Mathematica
    allnorm[n_Integer]:=Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1];
    Table[Length/@GatherBy[Select[Union@@Rest/@Subsets/@allnorm[n],GCD@@Length/@Split[#]===1&],Max],{n,10}]
  • PARI
    T(n,k) = sum(j=1, n, sumdiv(j, d, sum(i=max(1, j+k-n), d, moebius(j/d)*binomial(k-1, i-1)*binomial(d-1, i-1)))) \\ Andrew Howroyd, Jan 20 2023

Formula

T(n,k) = Sum_{j=1..n} Sum_{d|j} Sum_{i=max(1, j+k-n)..d} mu(j/d)*binomial(k-1, i-1)*binomial(d-1, i-1). - Andrew Howroyd, Jan 20 2023
Showing 1-7 of 7 results.