[seqfan] Re: sequence of "almost totatives" of primorial Pn
L. Edson Jeffery
lejeffery2 at gmail.com
Mon May 15 20:38:18 CEST 2017
Hello Jamie,
Not sure if your sequence is of any value for the database, but the
following Mathematica code (likely not optimal) generates it:
p[n_] := Product[Prime[k], {k, n - 1}];
a[n_] := a[n] = Prime[n + 1]*t[n];
t[n_] := t[n] =
If[n == 2, {1, 5},
Complement[
Flatten[Table[k*p[n] + t[n - 1], {k, 0, Prime[n] - 1}]],
a[n - 1]]];
Table[a[n], {n, 2, 4}]
{{5, 25}, {7, 49, 77, 91, 119, 133, 161, 203}, {11, 121,
143, 187, 209, 253, 319, 341, 407, 451, 473, 517, 583, 649, 671,
737, 781, 803, 869, 913, 979, 1067, 1111, 1133, 1177, 1199, 1243,
1331, 1397, 1441, 1507, 1529, 1573, 1639, 1661, 1727, 1793, 1837,
1859, 1903, 1969, 1991, 2057, 2101, 2123, 2167, 2189, 2299}}
Ed Jeffery
More information about the SeqFan
mailing list