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.

A331938 Indices of A002110(n) in A055932.

This page as a plain text file.
%I A331938 #6 Feb 03 2020 03:44:16
%S A331938 1,2,4,10,28,83,227,626,1644,4290,11322,28965,74469,189436,471910,
%T A331938 1166247,2884920,7130085,17349489,42180190,101820577,242907065,
%U A331938 579402163,1375056009,3262651085,7768448187,18411720785
%N A331938 Indices of A002110(n) in A055932.
%C A331938 A055932 lists numbers m whose prime divisors p are consecutive primes starting with 2, admitting multiplicity, while A002110 lists numbers m that are products of distinct consecutive primes starting with 2. Therefore, A002110 is a subset of A055932.
%C A331938 Offset is 0 since A002110(0) = 1.
%C A331938 Let 0 <= i <= k, integers. We can write an efficient algorithm to construct a complete list of all terms m of A055932 up to A002110(k) using A067255(m). Every term m in the list has omega(m) = A001221(m) <= k. Starting with A002110(i), we use A067255 to encode m, i.e., the list of multiplicities e pertaining to the 1st..i-th prime p_i, allowing position of the multiplicity e in the list to convey p_i. Thus, the first "recipe" for m = A002110(i) = {1, 1, ..., 1}, a list of i ones. If this does not exceed the limit A002110(k), then we accept it as a value, then increment the last multiplicity. When we have an invalid recipe, we increment the penultimate multiplicity and reset the last to 1, etc., until we have generated all m <= A002110(k). As a measure of efficiency, this algorithm generates 1 <= m <= A002110(12), 74469 terms, in about 2 seconds including sorting, on a 64-bit Intel Xeon E-2286M (2.40 GHz) processor. This is the same amount of time it takes to test numbers 1..400000 to yield the 575 smallest terms of the same sequence.
%t A331938 With[{s = Import["https://oeis.org/A002110/b002110.txt", "Data"][[1 ;; 8, -1]], t = TakeWhile[Import["https://oeis.org/A055932/b055932.txt", "Data"], Length@ # > 0 &][[All, -1]]}, TakeWhile[Map[FirstPosition[t, #][[1]] &, s], IntegerQ] ]
%Y A331938 Cf. A001221, A002110, A055932, A067255.
%K A331938 nonn,more
%O A331938 0,2
%A A331938 _Michael De Vlieger_, Feb 02 2020
%E A331938 a(21)-a(26) from _Giovanni Resta_, Feb 03 2020