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.

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

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 5, 1, 8, 4, 17, 1, 60, 1, 65, 19, 128, 1, 800, 1, 683, 67, 1025, 1, 11005, 16, 4097, 256, 9203, 1, 369426, 1, 32768, 1027, 65537, 79, 2124475, 1, 262145, 4099, 1424118, 1, 48987720, 1, 2127107, 96334, 4194305, 1, 411836297, 64, 67919981, 65539
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 30 2020

Keywords

Examples

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

Crossrefs

Cf. A182986 (positions of 1's), A100347, A121998, A178472, A331885, A331887.

Programs

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

Formula

a(n) = [x^n] 1 / (1 - Sum_{k: gcd(n,k) > 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).

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