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

A098743 Number of partitions of n into aliquant parts (i.e., parts that do not divide n).

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 3, 1, 3, 3, 13, 1, 23, 10, 11, 9, 65, 8, 104, 14, 56, 66, 252, 10, 245, 147, 206, 77, 846, 35, 1237, 166, 649, 634, 1078, 60, 3659, 1244, 1850, 236, 7244, 299, 10086, 1228, 1858, 4421, 19195, 243, 17660, 3244, 12268, 4039, 48341, 1819, 27675
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 01 2004

Keywords

Comments

It seems very plausible that the low and high water marks occur when n is a factorial number or a prime: see A260797, A260798.
a(A000040(n)) = A002865(n) - 1.

Examples

			7 = 2 + 2 + 3 = 2 + 5 = 3 + 4, so a(7) = 3.
a(10) = #{7+3,6+4,4+3+3} = 3, all other partitions of 10 contain at least one divisor (10, 5, 2, or 1).
		

Crossrefs

See also A057562 (relatively prime parts).

Programs

  • Haskell
    a098743 n = p [nd | nd <- [1..n], mod n nd /= 0] n where
       p _  0 = 1
       p [] _ = 0
       p ks'@(k:ks) m | m < k = 0 | otherwise = p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Nov 22 2011
    
  • Haskell
    -- with memoization
    import Data.MemoCombinators (memo3, integral)
    a098743 n = a098743_list !! n
    a098743_list = map (\x -> pMemo x 1 x) [0..] where
       pMemo = memo3 integral integral integral p
       p   0 = 1
       p x k m | m < k        = 0
               | mod x k == 0 = pMemo x (k + 1) m
               | otherwise    = pMemo x k (m - k) + pMemo x (k + 1) m
    -- Reinhard Zumkeller, Aug 08 2015
    
  • Maple
    a := [1,0,0,0,0]; M:=300; for n from 5 to M do t1:={seq(i,i=1..n)}; t3 := t1 minus divisors(n); t4 := mul(1/(1-x^i), i in t3); t5 := series(t4,x,n+2); a:=[op(a), coeff(t5,x,n)]; od: a; # N. J. A. Sloane, Aug 08 2015
    # second Maple program:
    a:= proc(m) option remember; local b; b:= proc(n, i)
          option remember; `if`(n=0, 1, `if`(i<2, 0, b(n, i-1)+
          `if`(irem(m, i)=0, 0, b(n-i, min(i, n-i))))) end; b(m$2)
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 11 2018
  • Mathematica
    a[m_] := a[m] = Module[{b}, b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 2, 0, b[n, i-1] + If[Mod[m, i] == 0, 0, b[n-i, Min[i, n-i]]]]]; b[m, m]];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Apr 30 2018, after Alois P. Heinz *)
  • PARI
    a(n)={polcoef(1/prod(k=1, n, if(n%k, 1 - x^k, 1) + O(x*x^n)), n)} \\ Andrew Howroyd, Aug 29 2018

Extensions

a(0) added and offset changed by Reinhard Zumkeller, Nov 22 2011
New wording for definition suggested by Marc LeBrun, Aug 07 2015

A036998 The number of decompositions of n into different parts relatively prime to n.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 4, 2, 3, 2, 11, 2, 17, 3, 5, 5, 37, 3, 53, 5, 12, 7, 103, 5, 70, 10, 42, 11, 255, 4, 339, 23, 59, 22, 130, 11, 759, 32, 115, 22, 1259, 10, 1609, 44, 94, 64, 2589, 22, 1674, 40, 385, 84, 5119, 30, 1309, 79, 665, 162, 9791, 18, 12075, 217, 556, 276
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a036998 n = p (a038566_row n) n where
       p _      0 = 1
       p []     _ = 0
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
    -- Reinhard Zumkeller, Jul 05 2013
  • Mathematica
    Table[ Coefficient[ Series[ Times@@((1+z^#)&/@Select[ Range[ q ], GCD[ #, q ]===1& ]), { z, 0, q} ], z^q ], {q, 128} ]

Extensions

Offset corrected by Amiram Eldar, Apr 24 2020

A100347 Number of compositions of n into parts all relatively prime to n.

Original entry on oeis.org

1, 1, 1, 3, 3, 15, 3, 63, 21, 125, 36, 1023, 25, 4095, 314, 3357, 987, 65535, 207, 262143, 2782, 164498, 17114, 4194303, 1705, 11349545, 119620, 7256527, 209376, 268435455, 1261, 1073741823, 2178309, 276465135, 5687872, 8460492865, 114575, 68719476735
Offset: 0

Views

Author

Vladeta Jovovic, Dec 29 2004

Keywords

Examples

			a(4) = 3 because among the eight compositions of 4 (namely, 1111, 112, 121, 211, 22, 13, 31 and 4) only 1111, 13 and 31 have parts all relatively prime to 4.
		

Crossrefs

Cf. A057562.

Programs

  • Maple
    RP:=proc(n) local A, j: A:={}: for j from 1 to n do if gcd(j, n)=1 then A:=A union {j} fi od: A end: a:=proc(n) local S, j, ser: S:=1/(1-sum(x^RP(n)[j], j=1..nops(RP(n)))): ser:=series(S, x=0, n+5): coeff(ser, x^n): end: 1, seq(a(n), n=1..40); # Emeric Deutsch, Jul 25 2005
    # second Maple program:
    b:= proc(n, m) option remember; `if`(n=0, 1,
          add(`if`(igcd(i, m)>1, 0, b(n-i, m)), i=1..n))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..50); # Alois P. Heinz, Aug 30 2014
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, 1, Sum[If[GCD[i, m] > 1, 0, b[n - i, m]], {i, 1, n}]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 22 2016, after Alois P. Heinz *)

Formula

Coefficient of x^n in expansion of 1/(1-Sum_{d : gcd(d, n)=1} x^d ).

Extensions

More terms from Emeric Deutsch, Jul 25 2005
a(0) from Alois P. Heinz, Aug 30 2014

A331885 Number of partitions of n into parts having a common factor > 1 with n.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 4, 1, 5, 3, 8, 1, 16, 1, 16, 9, 22, 1, 51, 1, 51, 17, 57, 1, 147, 7, 102, 30, 152, 1, 620, 1, 231, 58, 298, 21, 946, 1, 491, 103, 921, 1, 3249, 1, 1060, 325, 1256, 1, 4866, 15, 3157, 299, 2539, 1, 10369, 62, 4846, 492, 4566, 1, 45786, 1, 6843
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 30 2020

Keywords

Examples

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

Crossrefs

Cf. A182986 (positions of 1's), A018783, A057562, A121998, A331887, A331888.

Programs

  • Maple
    a:= proc(m) option remember; local b; b:=
          proc(n, i) option remember; `if`(n=0, 1, `if`(i<2, 0,
           `if`(igcd(i, m)>1, b(n-i, min(i, n-i)), 0)+b(n, i-1)))
          end; forget(b); b(m$2)
        end:
    seq(a(n), n=0..82);  # Alois P. Heinz, Jan 30 2020
  • Mathematica
    Table[SeriesCoefficient[Product[1/(1 - Boole[GCD[k, n] > 1] x^k), {k, 1, n}], {x, 0, n}], {n, 0, 62}]

Formula

a(n) = [x^n] Product_{k: gcd(n,k) > 1} 1 / (1 - x^k).

A227296 Number of partitions of n into parts <= phi(n), where phi is Euler's totient function (cf. A000010).

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 4, 14, 15, 26, 23, 55, 34, 100, 90, 146, 186, 296, 199, 489, 434, 725, 807, 1254, 919, 1946, 2063, 2943, 3036, 4564, 2462, 6841, 7665, 9871, 11098, 14744, 12384, 21636, 23928, 30677, 31603, 44582, 31570, 63260, 69414, 86420, 99795, 124753
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 05 2013

Keywords

Crossrefs

Programs

  • Haskell
    a227296 n = p [1 .. a000010 n] n where
       p _          0 = 1
       p []         _ = 0
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
  • Maple
    with(numtheory):
    b:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
           b(n, i-1) +`if`(i>n, 0, b(n-i, i)))
        end:
    a:= n-> b(n, phi(n)):
    seq(a(n), n=0..100);  # Alois P. Heinz, May 11 2015
  • Mathematica
    (* Requires version 6.0+ *) Table[Length[IntegerPartitions[n, n, Range[EulerPhi[n]]]], {n, 0, 47}] (* Ivan Neretin, May 11 2015 *)
    intPartLen[n_, i_] := intPartLen[n, i] = If[n == 0 || i == 1, 1, intPartLen[n, i - 1] + If[i > n, 0, intPartLen[n - i, i]]]; intPartLenPhi[n_] := intPartLen[n, EulerPhi[n]]; Table[intPartLenPhi[n], {n, 0, 99}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)

Formula

a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*sqrt(3)*n). - Vaclav Kotesovec, May 24 2018

A332002 Number of compositions (ordered partitions) of n into distinct parts all relatively prime to n.

Original entry on oeis.org

1, 1, 0, 2, 2, 4, 2, 12, 4, 6, 4, 64, 4, 132, 6, 32, 32, 616, 6, 1176, 32, 120, 58, 4756, 32, 3452, 108, 1632, 132, 30460, 8, 55740, 376, 3872, 352, 18864, 132, 315972, 1266, 13368, 352, 958264, 108, 1621272, 2228, 10176, 6166, 4957876, 352, 2902866, 2132
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 04 2020

Keywords

Examples

			a(9) = 6 because we have [8, 1], [7, 2], [5, 4], [4, 5], [2, 7] and [1, 8].
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local b; b:=
          proc(m, i, p) option remember; `if`(m=0, p!, `if`(i<1, 0,
            b(m, i-1, p)+`if`(i>m or igcd(i, n)>1, 0, b(m-i, i-1, p+1))))
          end; forget(b): b(n$2, 0)
        end:
    seq(a(n), n=0..63);  # Alois P. Heinz, Feb 04 2020
  • Mathematica
    a[n_] := Module[{b}, b[m_, i_, p_] := b[m, i, p] = If[m == 0, p!, If[i < 1, 0, b[m, i-1, p] + If[i > m || GCD[i, n] > 1, 0, b[m-i, i-1, p+1]]]]; b[n, n, 0]];
    a /@ Range[0, 63] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)

A335797 a(n) = n! * [x^n] exp(Sum_{k=1..n, gcd(n,k) = 1} x^k / k!).

Original entry on oeis.org

1, 1, 1, 4, 5, 51, 7, 876, 457, 7678, 5271, 678569, 10705, 27644436, 5060161, 133924576, 197920145, 82864869803, 173283535, 5832742205056, 98269310261, 34660429169122, 25313714237505, 44152005855084345, 13685698802401, 2410161938206898126, 129066382491033573
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 12 2020

Keywords

Comments

Number of set partitions of [n] into blocks that are relatively prime to n.

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, 1, add(`if`(
          igcd(j, m)=1, b(n-j, m), 0)*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..27);  # Alois P. Heinz, Oct 12 2020
  • Mathematica
    Table[n! SeriesCoefficient[Exp[Sum[Boole[GCD[n, k] == 1] x^k/k!, {k, 1, n}]], {x, 0, n}], {n, 0, 26}]

A338436 a(n) = n! * [x^n] Product_{k=1..n, gcd(n,k) = 1} 1 / (1 - x^k/k!).

Original entry on oeis.org

1, 1, 2, 9, 28, 245, 726, 11480, 48560, 735705, 4352050, 98329550, 483122388, 15543026746, 105478954140, 2717386363515, 25322712724800, 896697825211141, 6457456535543802, 307183340680888754, 2920059397230745400, 107461248960479482740, 1360407935621917573380
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 27 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n! SeriesCoefficient[Product[1/(1 - Boole[GCD[n, k] == 1] x^k/k!), {k, 1, n}], {x, 0, n}], {n, 0, 22}]

A338437 a(n) = n! * [x^n] Product_{k=1..n, gcd(n,k) = 1} 1 / (1 - x^k/k).

Original entry on oeis.org

1, 1, 2, 9, 32, 300, 864, 17612, 74752, 1152792, 6470400, 220057992, 719622144, 40754156352, 192835098624, 4787867880000, 55181218873344, 3071730630989952, 11004144881762304, 1179255538492239744, 5720352215040000000, 253837962769406045184, 3262870639485701849088
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 27 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n! SeriesCoefficient[Product[1/(1 - Boole[GCD[n, k] == 1] x^k/k), {k, 1, n}], {x, 0, n}], {n, 0, 22}]

A100495 Number of partitions of n such that multiplicities of parts are all relatively prime to n.

Original entry on oeis.org

1, 1, 2, 2, 6, 4, 14, 9, 22, 17, 55, 20, 100, 50, 103, 84, 296, 76, 489, 161, 456, 296, 1254, 230, 1664, 637, 1732, 831, 4564, 459, 6841, 1885, 5254, 2605, 10945, 1628, 21636, 5003, 15298, 5051, 44582, 3133, 63260, 11978, 31309, 16973, 124753, 8800, 154507
Offset: 1

Views

Author

Vladeta Jovovic, Jan 12 2005

Keywords

Crossrefs

Cf. A057562.

Formula

Coefficient of x^n in expansion of Product_{k=1..n} (1+Sum_{d: gcd(n, d)=1} x^(d*k)).

Extensions

More terms from David Wasserman, Feb 28 2008
Showing 1-10 of 11 results. Next