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

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).

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

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 1, 2, 2, 3, 1, 5, 1, 5, 4, 6, 1, 11, 1, 11, 6, 12, 1, 23, 3, 18, 8, 23, 1, 69, 1, 32, 13, 38, 7, 84, 1, 54, 19, 79, 1, 224, 1, 90, 46, 104, 1, 264, 5, 187, 39, 166, 1, 449, 14, 251, 55, 256, 1, 1374, 1, 340, 111, 390, 20, 1692, 1, 513, 105, 1610
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 30 2020

Keywords

Examples

			a(12) = 5 because we have [12], [10, 2], [9, 3], [8, 4] and [6, 4, 2].
		

Crossrefs

Cf. A036998, A121998, A175787 (positions of 1's), A303280, A331885, A331888.

Programs

  • Maple
    a:= proc(m) option remember; local b; b:=
          proc(n, i) option remember; `if`(i*(i+1)/21, b(n-i, min(i-1, 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 + Boole[GCD[k, n] > 1] x^k), {k, 1, n}], {x, 0, n}], {n, 0, 70}]
  • PARI
    A331887(n) = { my(p = Ser(1, 'x, 1+n)); for(k=2, n, if(gcd(n,k)>1, p *= (1 + 'x^k))); polcoef(p, n); }; \\ Antti Karttunen, Jan 25 2025

Formula

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

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 *)

A332003 Number of compositions (ordered partitions) of n into distinct parts having a common factor > 1 with n.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 3, 1, 3, 3, 5, 1, 13, 1, 13, 7, 19, 1, 59, 1, 59, 15, 65, 1, 309, 5, 133, 27, 195, 1, 2883, 1, 435, 67, 617, 17, 4133, 1, 1177, 135, 2915, 1, 36647, 1, 3299, 1767, 4757, 1, 52045, 13, 21149, 619, 11307, 1, 187307, 69, 29467, 1179, 30461
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 04 2020

Keywords

Examples

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

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 *)
Showing 1-4 of 4 results.