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.

Previous Showing 21-23 of 23 results.

A058189 Number of increasing geometric progressions ending in n (in the positive integers), including those of length 1 or 2.

Original entry on oeis.org

1, 2, 3, 5, 5, 6, 7, 10, 11, 10, 11, 13, 13, 14, 15, 21, 17, 20, 19, 21, 21, 22, 23, 26, 29, 26, 31, 29, 29, 30, 31, 38, 33, 34, 35, 41, 37, 38, 39, 42, 41, 42, 43, 45, 47, 46, 47, 53, 55, 54, 51, 53, 53, 58, 55, 58, 57, 58, 59, 61, 61, 62, 65, 77, 65, 66, 67, 69, 69, 70, 71
Offset: 1

Views

Author

Henry Bottomley, Nov 22 2000

Keywords

Examples

			a(4) = 5 since the possibilities are (4), (1,4), (2,4), (3,4) and (1,2,4).
		

Crossrefs

Cf. A054519 for arithmetic progressions.
Cf. A058190.

Programs

  • PARI
    ends_max_progression_of_length(n,ratio) = { my(k=1); while(1,if(denominator(n)>1,return(k)); n *= ratio; k++;) };
    A058190(n) = sum(d=1,(n-1),max(0,ends_max_progression_of_length(d,d/n)-2));
    A058189(n) = (A058190(n)+n); \\ Antti Karttunen, Nov 19 2017

Formula

a(n) = A058190(n) + n.

A326494 Number of subsets of {1..n} containing all differences and quotients of pairs of distinct elements.

Original entry on oeis.org

1, 2, 4, 6, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127
Offset: 0

Views

Author

Gus Wiseman, Jul 09 2019

Keywords

Comments

The only allowed sets are the empty set, any singleton, any initial interval of positive integers and {2,4}. This can be shown by induction. - Andrew Howroyd, Aug 25 2019

Examples

			The a(0) = 1 through a(6) = 13 subsets:
  {}  {}   {}     {}       {}         {}           {}
      {1}  {1}    {1}      {1}        {1}          {1}
           {2}    {2}      {2}        {2}          {2}
           {1,2}  {3}      {3}        {3}          {3}
                  {1,2}    {4}        {4}          {4}
                  {1,2,3}  {1,2}      {5}          {5}
                           {2,4}      {1,2}        {6}
                           {1,2,3}    {2,4}        {1,2}
                           {1,2,3,4}  {1,2,3}      {2,4}
                                      {1,2,3,4}    {1,2,3}
                                      {1,2,3,4,5}  {1,2,3,4}
                                                   {1,2,3,4,5}
                                                   {1,2,3,4,5,6}
		

Crossrefs

Subsets with difference are A054519.
Subsets with quotients are A326023.
Subsets with quotients > 1 are A326079.
Subsets without differences or quotients are A326490.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],SubsetQ[#,Union[Divide@@@Select[Tuples[#,2],UnsameQ@@#&&Divisible@@#&],Subtract@@@Select[Tuples[#,2],Greater@@#&]]]&]],{n,0,10}]

Formula

a(n) = 2*n + 1 = A005408(n) for n > 3. - Andrew Howroyd, Aug 25 2019

Extensions

Terms a(20) and beyond from Andrew Howroyd, Aug 25 2019

A326440 a(n) = 1 - tau(1) + tau(2) - tau(3) + ... + (-1)^n tau(n), where tau = A000005 is number of divisors.

Original entry on oeis.org

1, 0, 2, 0, 3, 1, 5, 3, 7, 4, 8, 6, 12, 10, 14, 10, 15, 13, 19, 17, 23, 19, 23, 21, 29, 26, 30, 26, 32, 30, 38, 36, 42, 38, 42, 38, 47, 45, 49, 45, 53, 51, 59, 57, 63, 57, 61, 59, 69, 66, 72, 68, 74, 72, 80, 76, 84, 80, 84, 82, 94, 92, 96, 90, 97, 93, 101, 99
Offset: 0

Views

Author

Gus Wiseman, Jul 06 2019

Keywords

Comments

Is this sequence nonnegative?
As tau(n) is odd when n is a square, there are alternating strings of even and odd integers with change of parity for each n square. Indeed, between m^2 and (m+1)^2-1, there is a string of 2m+1 even terms if m is odd, or a string of 2m+1 odd terms if m is even. - Bernard Schott, Jul 10 2019

Examples

			The first 6 terms of A000005 are 1, 2, 2, 3, 2, 4, so a(6) = 1 - 1 + 2 - 2 + 3 - 2 + 4 = 5.
		

Crossrefs

Programs

  • Magma
    [1] cat [1+(&+[(-1)^(k)*#Divisors(k):k in [1..n]]):n in [1..70]]; // Marius A. Burtea, Jul 10 2019
  • Mathematica
    Accumulate[Table[If[k==0,1,(-1)^k*DivisorSigma[0,k]],{k,0,30}]]
  • PARI
    a(n) = 1 - sum(k=1, n, (-1)^(k+1)*numdiv(k)); \\ Michel Marcus, Jul 09 2019
    

Formula

a(n) = 1 + Sum_{k=1..n} (-1)^k A000005(k).
For n > 0, a(n) = 1 + A307704(n).
If p prime, a(p) = a(p-1) - 2. - Bernard Schott, Jul 10 2019
Previous Showing 21-23 of 23 results.