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

A122651 Number of partitions of n into distinct parts, with each part divisible by the next.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			a(9)  = 4 : [9], [8,1], [6,3], [6,2,1].
a(15) = 6 : [15], [14,1], [12,3], [12,2,1], [10,5], [8,4,2,1].
		

Crossrefs

Programs

  • Maple
    A122651r := proc(n,pmax,dv) option remember ; local a,d ; a := 0 ; for d in dv do if d = n and d <= pmax then a := a+1 ; elif d < pmax and n-d > 0 then a := a+A122651r(n-d,d-1,numtheory[divisors](d) minus {d} ) ; fi; od: a ; end: A122651 := proc(n) local i; A122651r(n,n, convert([seq(i,i=1..n)],set) ) ; end: for n from 1 to 120 do printf("%d,",A122651(n)) ; od:  # R. J. Mathar, May 22 2009
    # second Maple program:
    with(numtheory):
    b:= proc(n) option remember;
          `if`(n=0, 1, add(b((n-d)/d), d=divisors(n) minus{1}))
        end:
    a:= n-> `if`(n=0, 1, b(n)+b(n-1));
    seq(a(n), n=0..200);  # Alois P. Heinz, Mar 28 2011
  • Mathematica
    b[0] = 1; b[n_] := b[n] = Sum[b[(n - d)/d], {d, Divisors[n] // Rest}]; a[0] = 1; a[n_] := b[n] + b[n-1]; Table[a[n], {n, 0, 84}] (* Jean-François Alcover, Mar 26 2013, after Alois P. Heinz *)
  • PARI
    { a(n,m=0) = local(r=0); if(n==0,return(1)); fordiv(n,d, if(d<=m,next); r+=a((n-d)\d,1); ); r } /* Max Alekseyev */

Formula

For n>0, a(n) = A167865(n) + A167865(n-1).

Extensions

More terms from R. J. Mathar, May 22 2009
a(0)=1 prepended by Max Alekseyev, Nov 13 2009

A184998 Smallest number having exactly n partitions into distinct parts greater than 1, with each part divisible by the next.

Original entry on oeis.org

1, 0, 6, 14, 12, 18, 24, 40, 36, 30, 48, 42, 75, 60, 72, 66, 80, 105, 84, 114, 102, 90, 120, 138, 132, 126, 186, 156, 150, 170, 180, 182, 310, 222, 200, 272, 434, 234, 198, 320, 273, 308, 210, 354, 252, 300, 360, 372, 392, 500, 366, 315
Offset: 0

Views

Author

Alois P. Heinz, Mar 28 2011

Keywords

Examples

			a(7) = 40, because A167865(40) = 7 and A167865(m) <> 7 for all m<40.  The 7 partitions of 40 into distinct parts greater than 1, with each part divisible by the next are: [40], [38,2], [36,4], [35,5], [32,8], [30,10], [24,12,4].
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc() local t, a, b;
          t:= -1;
          a:= proc() -1 end;
          b:= proc(n) option remember;
                `if`(n=0, 1, add(b((n-d)/d), d=divisors(n) minus{1}))
              end:
          proc(n) local h;
            while a(n) = -1 do
              t:= t+1;
              h:= b(t);
              if a(h) = -1 then a(h):= t fi
            od; a(n)
          end
        end():
    seq(a(n), n=0..100);
  • Mathematica
    a[n0_] := Module[{t = -1, a, b}, a[] = -1; b[n] := b[n] = If[n == 0, 1, Sum[b[(n - d)/d], {d, Divisors[n] ~Complement~ {1}}]]; While[a[n] == -1, t++; h = b[t]; If[a[h] == -1, a[h] = t]]; a[n0]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 21 2018, translated from Maple *)

Formula

a(n) = min { k : A167865(k) = n }.
Showing 1-2 of 2 results.