login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A212658 Number of multisets {1^k1, 2^k2, ..., n^kn}, ki >= 0, with the sum of reciprocals <= 1. 2
1, 2, 4, 8, 17, 37, 86, 199, 475, 1138, 2769, 6748, 16613, 40904, 101317, 251401, 624958, 1555940, 3882708, 9701790, 24276866, 60817940, 152508653, 382828565, 961859364, 2418662434, 6086480305, 15327208770, 38622901484, 97384378728, 245686368946, 620158662562 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

The number of distinct sums of reciprocals is given by A212606.

LINKS

Dexter Senft, Table of n, a(n) for n = 0..36

PROG

(C#)

/* For n=43 or greater, the least common multiple of the numbers 1..n requires more than 64 bits to represent, and C# has no such native data type. */

using System;

using System.Collections.Generic;

namespace A212658 {

   class Program {

      static long Result;

      static long GCD(long n, long m) {

         long mod;

         long j = n<m ? m : n;

         long k = n<m ? n : m;

         while (true) if ((mod = k%j) == 0)

            return j; else { k=j; j=mod; }

      }

      static long LCM(int n) { // This produces A003418

         return n<=1 ? 1 : LCM(n-1) / GCD(LCM(n-1), n) * n;

      }

      static void Main(string[] args) {

         List<long> numbers = new List<long>();

         for (int n=1; n<=42; n++) {

            long lcm= LCM(n);

            numbers.Clear();

            Result = 0;

            for (int i=2; i<=n; i++) numbers.Add(lcm/i);

            Count(lcm, numbers, 0);

            Console.Write(n.ToString() + ": " + (Result+2).ToString() + "\n");

         }

      }

      static void Count(long Target, List<long> L, int At) {

         if (At >= L.Count) return;

         if (L[At] <= Target) {

            Result++;

            long AmtLeft = Target - L[At];

            if (AmtLeft >= L[L.Count-1]) Count(AmtLeft, L, At);

         }

         Count(Target, L, At+1);

         return;

      }

   }

}

/* Dexter Senft, Feb 07 2019 */

CROSSREFS

Cf. A212657, A212606, A212607, A020473, A092669, A092671, A208480, A003418.

Sequence in context: A003426 A179476 A087803 * A036374 A214999 A084635

Adjacent sequences:  A212655 A212656 A212657 * A212659 A212660 A212661

KEYWORD

nonn

AUTHOR

Max Alekseyev, May 23 2012

EXTENSIONS

a(24)-a(25) from Alois P. Heinz, Nov 20 2017

a(26)-a(31) from Dexter Senft, Feb 07 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 23 05:06 EDT 2019. Contains 327327 sequences. (Running on oeis4.)