login
The OEIS is supported by the many generous donors 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
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
Sequence in context: A003426 A179476 A087803 * A036374 A214999 A348756
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 13:29 EDT 2024. Contains 371780 sequences. (Running on oeis4.)