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.

A051026 Number of primitive subsequences of {1, 2, ..., n}.

This page as a plain text file.
%I A051026 #69 Feb 16 2025 08:32:41
%S A051026 1,2,3,5,7,13,17,33,45,73,103,205,253,505,733,1133,1529,3057,3897,
%T A051026 7793,10241,16513,24593,49185,59265,109297,163369,262489,355729,
%U A051026 711457,879937,1759873,2360641,3908545,5858113,10534337,12701537,25403073,38090337,63299265,81044097,162088193,205482593,410965185,570487233,855676353
%N A051026 Number of primitive subsequences of {1, 2, ..., n}.
%C A051026 a(n) counts all subsequences of {1, ..., n} in which no term divides any other.  If n is a prime a(n) = 2*a(n-1)-1 because for each subsequence s counted by a(n-1) two different subsequences are counted by a(n): s and s,n.  There is only one exception: 1,n is not a primitive subsequence because 1 divides n.  For all n>1: a(n) < 2*a(n-1). - _Alois P. Heinz_, Mar 07 2011
%C A051026 Maximal primitive subsets are counted by A326077. - _Gus Wiseman_, Jun 07 2019
%D A051026 Blanchet-Sadri, Francine. Algorithmic combinatorics on partial words. Chapman & Hall/CRC, Boca Raton, FL, 2008. ii+385 pp. ISBN: 978-1-4200-6092-8; 1-4200-6092-9 MR2384993 (2009f:68142). See p. 320. - _N. J. A. Sloane_, Apr 06 2012
%H A051026 Juliana Couras, Ricardo Jesus, and Tomás Oliveira e Silva, <a href="/A051026/b051026.txt">Table of n, a(n) for n = 0..800</a> (terms up to n=80 from Alois P. Heinz)
%H A051026 Marcel K. Goh and Jonah Saks, <a href="https://arxiv.org/abs/2206.12535">Alternating-sum statistics for certain sets of integers</a>, arXiv:2206.12535 [math.CO], 2022.
%H A051026 Nathan McNew, <a href="http://arxiv.org/abs/1808.04923">Counting primitive subsets and other statistics of the divisor graph of {1,2,..,n}</a>, arXiv:1808.04923 [math.NT], 2018.
%H A051026 Richárd Palincza, <a href="https://repozitorium.omikk.bme.hu/items/ba640e7b-ba77-48eb-a9e2-d60f1b01e5dd">Counting type and extremal problems from Arithmetic Combinatorics</a>, Ph. D. Thesis, Budapest Univ. Tech. Econ. (Hungary, 2024).
%H A051026 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimitiveSequence.html">Primitive Sequence</a>
%e A051026 a(4) = 7, the primitive subsequences (including the empty sequence) are: (), (1), (2), (3), (4), (2,3), (3,4).
%e A051026 a(5) = 13 = 2*7-1, the primitive subsequences are: (), (5), (1), (2), (2,5), (3), (3,5), (4), (4,5), (2,3), (2,3,5), (3,4), (3,4,5).
%e A051026 From _Gus Wiseman_, Jun 07 2019: (Start)
%e A051026 The a(0) = 1 through a(5) = 13 primitive (pairwise indivisible) subsets:
%e A051026   {}  {}   {}   {}     {}     {}
%e A051026       {1}  {1}  {1}    {1}    {1}
%e A051026            {2}  {2}    {2}    {2}
%e A051026                 {3}    {3}    {3}
%e A051026                 {2,3}  {4}    {4}
%e A051026                        {2,3}  {5}
%e A051026                        {3,4}  {2,3}
%e A051026                               {2,5}
%e A051026                               {3,4}
%e A051026                               {3,5}
%e A051026                               {4,5}
%e A051026                               {2,3,5}
%e A051026                               {3,4,5}
%e A051026 a(n) is also the number of subsets of {1..n} containing all of their pairwise products <= n as well as any quotients of divisible elements. For example, the a(0) = 1 through a(5) = 13 subsets are:
%e A051026   {}  {}   {}     {}       {}         {}
%e A051026       {1}  {1}    {1}      {1}        {1}
%e A051026            {1,2}  {1,2}    {1,3}      {1,3}
%e A051026                   {1,3}    {1,4}      {1,4}
%e A051026                   {1,2,3}  {1,2,4}    {1,5}
%e A051026                            {1,3,4}    {1,2,4}
%e A051026                            {1,2,3,4}  {1,3,4}
%e A051026                                       {1,3,5}
%e A051026                                       {1,4,5}
%e A051026                                       {1,2,3,4}
%e A051026                                       {1,2,4,5}
%e A051026                                       {1,3,4,5}
%e A051026                                       {1,2,3,4,5}
%e A051026 Also the number of subsets of {1..n} containing all of their multiples <= n. For example, the a(0) = 1 through a(5) = 13 subsets are:
%e A051026   {}  {}   {}     {}       {}         {}
%e A051026       {1}  {2}    {2}      {3}        {3}
%e A051026            {1,2}  {3}      {4}        {4}
%e A051026                   {2,3}    {2,4}      {5}
%e A051026                   {1,2,3}  {3,4}      {2,4}
%e A051026                            {2,3,4}    {3,4}
%e A051026                            {1,2,3,4}  {3,5}
%e A051026                                       {4,5}
%e A051026                                       {2,3,4}
%e A051026                                       {2,4,5}
%e A051026                                       {3,4,5}
%e A051026                                       {2,3,4,5}
%e A051026                                       {1,2,3,4,5}
%e A051026 (End)
%e A051026 From _Gus Wiseman_, Mar 12 2024: (Start)
%e A051026 Also the number of subsets of {1..n} containing all divisors of the elements. For example, the a(0) = 1 through a(6) = 17 subsets are:
%e A051026   {}  {}   {}     {}       {}         {}
%e A051026       {1}  {1}    {1}      {1}        {1}
%e A051026            {1,2}  {1,2}    {1,2}      {1,2}
%e A051026                   {1,3}    {1,3}      {1,3}
%e A051026                   {1,2,3}  {1,2,3}    {1,5}
%e A051026                            {1,2,4}    {1,2,3}
%e A051026                            {1,2,3,4}  {1,2,4}
%e A051026                                       {1,2,5}
%e A051026                                       {1,3,5}
%e A051026                                       {1,2,3,4}
%e A051026                                       {1,2,3,5}
%e A051026                                       {1,2,4,5}
%e A051026                                       {1,2,3,4,5}
%e A051026 (End)
%p A051026 with(numtheory):
%p A051026 b:= proc(s) option remember; local n;
%p A051026       n:= max(s[]);
%p A051026       `if`(n<0, 1, b(s minus {n}) + b(s minus divisors(n)))
%p A051026     end:
%p A051026 bb:= n-> b({$2..n} minus divisors(n)):
%p A051026 sb:= proc(n) option remember; `if`(n<2, 0, bb(n) + sb(n-1)) end:
%p A051026 a:= n-> `if`(n=0, 1, `if`(isprime(n), 2*a(n-1)-1, 2+sb(n))):
%p A051026 seq(a(n), n=0..40);  # _Alois P. Heinz_, Mar 07 2011
%t A051026 b[s_] := b[s] = With[{n=Max[s]}, If[n < 0, 1, b[Complement[s, {n}]] + b[Complement[s, Divisors[n]]]]];
%t A051026 bb[n_] := b[Complement[Range[2, n], Divisors[n]]];
%t A051026 sb[n_] := sb[n] = If[n < 2, 0, bb[n] + sb[n-1]];
%t A051026 a[n_] := If[n == 0, 1, If[PrimeQ[n], 2a[n-1] - 1, 2 + sb[n]]]; Table[a[n], {n, 0, 37}]
%t A051026 (* _Jean-François Alcover_, Jul 27 2011, converted from Maple *)
%t A051026 Table[Length[Select[Subsets[Range[n]], SubsetQ[#,Select[Union@@Table[#*i,{i,n}],#<=n&]]&]],{n,10}] (* _Gus Wiseman_, Jun 07 2019 *)
%t A051026 Table[Length[Select[Subsets[Range[n]], #==Union@@Divisors/@#&]],{n,0,10}] (* _Gus Wiseman_, Mar 12 2024 *)
%Y A051026 Cf. A007865, A054519, A096827, A103580, A303362, A305148.
%Y A051026 Cf. A326023, A326076, A326077, A326081, A326082, A326083, A326117.
%Y A051026 Cf. A037031, A051026, A355740, A368110, A370585.
%K A051026 nonn,nice
%O A051026 0,2
%A A051026 _Eric W. Weisstein_
%E A051026 More terms from _David Wasserman_, May 02 2002
%E A051026 a(32)-a(37) from _Donovan Johnson_, Aug 11 2010