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.

A318726 Number of integer compositions of n that have only one part or whose consecutive parts are indivisible and the last and first part are also indivisible.

This page as a plain text file.
%I A318726 #17 Nov 04 2019 09:20:41
%S A318726 1,1,1,1,3,1,5,3,8,13,12,23,27,56,64,100,150,216,325,459,700,1007,
%T A318726 1493,2186,3203,4735,6929,10243,14952,22024,32366,47558,69906,102634,
%U A318726 150984,221713,325919,478842,703648,1034104,1519432,2233062,3281004,4821791,7085359
%N A318726 Number of integer compositions of n that have only one part or whose consecutive parts are indivisible and the last and first part are also indivisible.
%H A318726 Andrew Howroyd, <a href="/A318726/b318726.txt">Table of n, a(n) for n = 1..200</a>
%F A318726 a(n) = A328598(n) + 1. - _Gus Wiseman_, Nov 04 2019
%e A318726 The a(10) = 13 compositions:
%e A318726   (10)
%e A318726   (7,3) (3,7) (6,4) (4,6)
%e A318726   (5,3,2) (5,2,3) (3,5,2) (3,2,5) (2,5,3) (2,3,5)
%e A318726   (3,2,3,2) (2,3,2,3)
%e A318726 The a(11) = 12 compositions:
%e A318726   (11)
%e A318726   (9,2) (2,9) (8,3) (3,8) (7,4) (4,7) (6,5) (5,6)
%e A318726   (5,2,4) (4,5,2) (2,4,5)
%t A318726 Table[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,({___,x_,y_,___}/;Divisible[x,y])|({y_,___,x_}/;Divisible[x,y])]&]//Length,{n,20}]
%o A318726 (PARI)
%o A318726 b(n,k,pred)={my(M=matrix(n,n)); for(n=1, n, M[n,n]=pred(k,n); for(j=1, n-1, M[n,j]=sum(i=1, n-j, if(pred(i,j), M[n-j,i], 0)))); sum(i=1, n, if(pred(i,k), M[n,i], 0))}
%o A318726 a(n)={1 + sum(k=1, n-1, b(n-k, k, (i,j)->i%j<>0))} \\ _Andrew Howroyd_, Sep 08 2018
%Y A318726 Cf. A000740, A008965, A167606, A285573, A296302, A303362, A304713, A316476, A318727.
%K A318726 nonn
%O A318726 1,5
%A A318726 _Gus Wiseman_, Sep 02 2018
%E A318726 a(21)-a(28) from _Robert Price_, Sep 08 2018
%E A318726 Terms a(29) and beyond from _Andrew Howroyd_, Sep 08 2018
%E A318726 Name corrected by _Gus Wiseman_, Nov 04 2019