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

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

A260798 Number of partitions of p=prime(n) into aliquant parts (i.e., parts that do not divide p, meaning any part except 1 and p).

Original entry on oeis.org

0, 0, 1, 3, 13, 23, 65, 104, 252, 846, 1237, 3659, 7244, 10086, 19195, 48341, 116599, 155037, 356168, 609236, 792905, 1716485, 2832213, 5887815, 15116625, 23911833, 29983570, 46873052, 58443395, 90374471, 394641602, 593224103, 1082063335, 1318608063, 3477935702, 4207389268, 7398721009, 12885091292, 18555597522, 31831360281, 54145147464, 64517020844
Offset: 1

Views

Author

Marc LeBrun and N. J. A. Sloane, Aug 07 2015

Keywords

Examples

			For n=4, the fourth prime is 7, and we see the three partitions 7=2+5=2+2+3=3+4, so a(4)=3.
		

Crossrefs

This is A098743(prime(n)). Cf. A260797.

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral)
    a260798 n = a260798_list !! (n-1)
    a260798_list = map (subtract 1 . pMemo 2) a000040_list where
       pMemo = memo2 integral integral p
       p _ 0 = 1
       p k m | m < k     = 0
             | otherwise = pMemo k (m - k) + pMemo (k + 1) m
    -- Reinhard Zumkeller, Aug 09 2015
  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=2, 1-irem(n, 2),
          `if`(i<2, 0, b(n, i-1)+b(n-i, min(i, n-i))))
        end:
    a:= n-> (p-> b(p, p-1))(ithprime(n)):
    seq(a(n), n=1..45);  # Alois P. Heinz, Mar 11 2018
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 || i == 2, 1 - Mod[n, 2], If[i < 2, 0, b[n, i - 1] + b[n - i, Min[i, n - i]]]];
    a[n_] := b[#, # - 1]&[Prime[n]];
    Table[a[n], {n, 1, 45}] (* Jean-François Alcover, May 20 2018, after Alois P. Heinz *)

A261121 Number of partitions of n-th primorial into aliquant parts (i.e., parts that do not divide n#).

Original entry on oeis.org

0, 0, 0, 35, 148931620, 145695442998205937771172926213510853765
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 09 2015

Keywords

Comments

a(n) = A098743(A002110(n)).

Crossrefs

Programs

  • Haskell
    a261121 = a098743 . a002110
Showing 1-3 of 3 results.