A324742
Number of subsets of {2...n} containing no prime indices of the elements.
Original entry on oeis.org
1, 2, 3, 6, 10, 16, 24, 48, 84, 144, 228, 420, 648, 1080, 1800, 3600, 5760, 11136, 16704, 31104, 53568, 90624, 136896, 269952, 515712, 862080, 1708800, 3171840, 4832640, 9325440, 14890752, 29781504, 52245504, 88418304, 166017024, 331628544, 497645568, 829409280
Offset: 1
The a(1) = 1 through a(6) = 16 subsets:
{} {} {} {} {} {}
{2} {2} {2} {2} {2}
{3} {3} {3} {3}
{4} {4} {4}
{2,4} {5} {5}
{3,4} {2,4} {6}
{2,5} {2,4}
{3,4} {2,5}
{4,5} {3,4}
{2,4,5} {3,6}
{4,5}
{4,6}
{5,6}
{2,4,5}
{3,4,6}
{4,5,6}
An example for n = 20 is {4,5,6,12,17,18,19}, with prime indices:
4: {1,1}
5: {3}
6: {1,2}
12: {1,1,2}
17: {7}
18: {1,2,2}
19: {8}
None of these prime indices {1,2,3,7,8} belong to the set, as required.
The maximal case is
A324763. The version for subsets of {1...n} is
A324741. The strict integer partition version is
A324752. The integer partition version is
A324757. The Heinz number version is
A324761. An infinite version is
A304360.
Cf.
A000720,
A001462,
A007097,
A076078,
A084422,
A085945,
A112798,
A276625,
A290689,
A290822,
A306844,
A324764.
-
Table[Length[Select[Subsets[Range[2,n]],Intersection[#,PrimePi/@First/@Join@@FactorInteger/@#]=={}&]],{n,10}]
-
pset(n)={my(b=0,f=factor(n)[,1]); sum(i=1, #f, 1<<(primepi(f[i])))}
a(n)={my(p=vector(n-1,k,pset(k+1)>>1), d=0); for(i=1, #p, d=bitor(d, p[i]));
((k,b)->if(k>#p, 1, my(t=self()(k+1,b)); if(!bitand(p[k], b), t+=if(bittest(d,k), self()(k+1, b+(1<Andrew Howroyd, Aug 16 2019
A331912
Lexicographically earliest sequence of positive integers that have at most one distinct prime index already in the sequence.
Original entry on oeis.org
1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 26, 27, 29, 31, 32, 37, 39, 41, 43, 47, 49, 52, 53, 58, 59, 61, 64, 65, 67, 71, 73, 74, 79, 81, 83, 86, 87, 89, 91, 94, 97, 101, 103, 104, 107, 109, 111, 113, 116, 117, 121, 122, 125, 127, 128, 129, 131, 137
Offset: 1
The sequence of terms together with their prime indices begins:
1: {} 37: {12} 86: {1,14}
2: {1} 39: {2,6} 87: {2,10}
3: {2} 41: {13} 89: {24}
4: {1,1} 43: {14} 91: {4,6}
5: {3} 47: {15} 94: {1,15}
7: {4} 49: {4,4} 97: {25}
8: {1,1,1} 52: {1,1,6} 101: {26}
9: {2,2} 53: {16} 103: {27}
11: {5} 58: {1,10} 104: {1,1,1,6}
13: {6} 59: {17} 107: {28}
16: {1,1,1,1} 61: {18} 109: {29}
17: {7} 64: {1,1,1,1,1,1} 111: {2,12}
19: {8} 65: {3,6} 113: {30}
23: {9} 67: {19} 116: {1,1,10}
25: {3,3} 71: {20} 117: {2,2,6}
26: {1,6} 73: {21} 121: {5,5}
27: {2,2,2} 74: {1,12} 122: {1,18}
29: {10} 79: {22} 125: {3,3,3}
31: {11} 81: {2,2,2,2} 127: {31}
32: {1,1,1,1,1} 83: {23} 128: {1,1,1,1,1,1,1}
For example, the prime indices of 117 are {2,2,6}, of which only 2 is already in the sequence, so 117 is in the sequence.
Numbers S without all prime indices in S are
A324694.
Numbers S without any prime indices in S are
A324695.
Numbers S with at most one prime index in S are
A331784.
Numbers S with exactly one prime index in S are
A331785.
Numbers S with exactly one distinct prime index in S are
A331913.
-
aQ[n_]:=Length[Select[PrimePi/@First/@If[n==1,{},FactorInteger[n]],aQ]]<=1;
Select[Range[100],aQ]
A332836
Number of compositions of n whose run-lengths are weakly increasing.
Original entry on oeis.org
1, 1, 2, 4, 7, 12, 24, 40, 73, 128, 230, 399, 712, 1241, 2192, 3833, 6746, 11792, 20711, 36230, 63532, 111163, 194782, 340859, 596961, 1044748, 1829241, 3201427, 5604504, 9808976, 17170112, 30051470, 52601074, 92063629, 161140256, 282033124, 493637137, 863982135, 1512197655
Offset: 0
The a(0) = 1 through a(5) = 12 compositions:
() (1) (2) (3) (4) (5)
(11) (12) (13) (14)
(21) (22) (23)
(111) (31) (32)
(121) (41)
(211) (122)
(1111) (131)
(212)
(311)
(1211)
(2111)
(11111)
For example, the composition (2,3,2,2,1,1,2,2,2) has run-lengths (1,1,2,2,3) so is counted under a(17).
The version for the compositions themselves (not run-lengths) is
A000041.
Permitting the run-lengths to be weakly decreasing also gives
A332835.
The complement is counted by
A332871.
Compositions that are not unimodal are
A115981.
Compositions with equal run-lengths are
A329738.
Compositions whose run-lengths are unimodal are
A332726.
Cf.
A001462,
A072704,
A072706,
A100882,
A181819,
A329744,
A329766,
A332641,
A332727,
A332745,
A332833,
A332834.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],LessEqual@@Length/@Split[#]&]],{n,0,10}]
-
step(M, m)={my(n=matsize(M)[1]); for(p=m+1, n, my(v=vector((p-1)\m, i, M[p-i*m,i]), s=vecsum(v)); M[p,]+=vector(#M,i,s-if(i<=#v, v[i]))); M}
seq(n)={my(M=matrix(n+1, n, i, j, i==1)); for(m=1, n, M=step(M, m)); M[1,n]=0; vector(n+1, i, vecsum(M[i,]))/(n-1)} \\ Andrew Howroyd, Dec 31 2020
A376604
Second differences of the Kolakoski sequence (A000002). First differences of A054354.
Original entry on oeis.org
-1, -1, 1, 1, -2, 2, -1, -1, 2, -1, -1, 1, 1, -2, 1, 1, -1, -1, 2, -2, 1, 1, -2, 2, -1, -1, 1, 1, -2, 1, 1, -2, 2, -1, -1, 2, -1, -1, 1, 1, -2, 2, -1, -1, 2, -2, 1, 1, -2, 1, 1, -1, -1, 2, -1, -1, 1, 1, -2, 2, -1, -1, 2, -1, -1, 1, 1, -2, 1, 1, -2, 2, -1, -1
Offset: 1
The Kolakoski sequence (A000002) is:
1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, ...
with first differences (A054354):
1, 0, -1, 0, 1, -1, 1, 0, -1, 1, 0, -1, 0, 1, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, ...
with first differences (A376604):
-1, -1, 1, 1, -2, 2, -1, -1, 2, -1, -1, 1, 1, -2, 1, 1, -1, -1, 2, -2, 1, 1, -2, ...
A078649 appears to be zeros of the first and third differences.
A288605 gives positions of first appearances of each balance.
A333254 lists run-lengths of differences between consecutive primes.
For the Kolakoski sequence (
A000002):
-
kolagrow[q_]:=If[Length[q]<2,Take[{1,2},Length[q]+1],Append[q,Switch[{q[[Length[Split[q]]]],q[[-2]],Last[q]},{1,1,2},1,{1,2,1},2,{2,1,1},2,{2,1,2},2,{2,2,1},1,{2,2,2},1]]]
kol[n_]:=Nest[kolagrow,{1},n-1];
Differences[kol[100],2]
A324699
Lexicographically earliest sequence of positive integers whose prime indices minus 1 already belong to the sequence.
Original entry on oeis.org
1, 3, 7, 9, 19, 21, 27, 29, 49, 57, 63, 71, 79, 81, 87, 107, 113, 133, 147, 171, 189, 203, 213, 229, 237, 243, 261, 271, 311, 321, 339, 343, 359, 361, 399, 409, 421, 441, 457, 497, 513, 551, 553, 567, 593, 609, 619, 639, 687, 711, 729, 749, 757, 783, 791, 813
Offset: 1
The sequence of terms together with their prime indices begins:
1: {}
3: {2}
7: {4}
9: {2,2}
19: {8}
21: {2,4}
27: {2,2,2}
29: {10}
49: {4,4}
57: {2,8}
63: {2,2,4}
71: {20}
79: {22}
81: {2,2,2,2}
87: {2,10}
107: {28}
113: {30}
133: {4,8}
147: {2,4,4}
171: {2,2,8}
189: {2,2,2,4}
Cf.
A000002,
A000720,
A001222,
A001462,
A007097,
A055396,
A061395,
A079000,
A079254,
A109298,
A112798,
A276625,
A277098,
A304360,
A306719.
Cf.
A324694,
A324695,
A324696,
A324697,
A324698,
A324700,
A324701,
A324702,
A324703,
A324704,
A324705.
A324700
Lexicographically earliest sequence containing 0 and all positive integers > 1 whose prime indices minus 1 already belong to the sequence.
Original entry on oeis.org
0, 2, 4, 5, 8, 10, 11, 13, 16, 20, 22, 23, 25, 26, 31, 32, 37, 40, 43, 44, 46, 50, 52, 55, 59, 62, 64, 65, 73, 74, 80, 83, 86, 88, 89, 92, 100, 101, 103, 104, 110, 115, 118, 121, 124, 125, 128, 130, 131, 137, 143, 146, 148, 155, 160, 163, 166, 169, 172, 176
Offset: 1
The sequence of terms together with their prime indices begins:
0
2: {1}
4: {1,1}
5: {3}
8: {1,1,1}
10: {1,3}
11: {5}
13: {6}
16: {1,1,1,1}
20: {1,1,3}
22: {1,5}
23: {9}
25: {3,3}
26: {1,6}
31: {11}
32: {1,1,1,1,1}
37: {12}
40: {1,1,1,3}
43: {14}
44: {1,1,5}
Cf.
A000002,
A000720,
A001222,
A001462,
A007097,
A055396,
A061395,
A079000,
A079254,
A109298,
A112798,
A276625,
A277098,
A304360.
-
aQ[n_]:=Switch[n,0,True,1,False,,And@@Cases[FactorInteger[n],{p,k_}:>aQ[PrimePi[p]-1]]];
Select[Range[0,100],aQ]
A324701
Lexicographically earliest sequence containing 1 and all positive integers n such that the prime indices of n - 1 already belong to the sequence.
Original entry on oeis.org
1, 3, 5, 6, 9, 11, 12, 14, 17, 21, 23, 24, 26, 27, 32, 33, 38, 41, 44, 45, 47, 51, 53, 56, 60, 63, 65, 66, 74, 75, 81, 84, 87, 89, 90, 93, 101, 102, 104, 105, 111, 116, 119, 122, 125, 126, 129, 131, 132, 138, 144, 147, 149, 156, 161, 164, 167, 170, 173, 177
Offset: 1
Cf.
A000002,
A000720,
A001222,
A001462,
A007097,
A055396,
A061395,
A079000,
A079254,
A109298,
A112798,
A276625,
A277098,
A304360.
-
aQ[n_]:=Switch[n,0,False,1,True,,And@@Cases[FactorInteger[n-1],{p,k_}:>aQ[PrimePi[p]]]];
Select[Range[0,100],aQ]
A324702
Lexicographically earliest sequence containing 2 and all positive integers > 1 whose prime indices minus 1 already belong to the sequence.
Original entry on oeis.org
2, 5, 13, 25, 43, 65, 101, 125, 169, 193, 215, 317, 325, 505, 557, 559, 625, 701, 845, 965, 1013, 1075, 1181, 1313, 1321, 1585, 1625, 1849, 2111, 2161, 2197, 2509, 2525, 2785, 2795, 3125, 3505, 3617, 4049, 4057, 4121, 4225, 4343, 4639, 4825, 5065, 5297, 5375
Offset: 1
The sequence of terms together with their prime indices begins:
2: {1}
5: {3}
13: {6}
25: {3,3}
43: {14}
65: {3,6}
101: {26}
125: {3,3,3}
169: {6,6}
193: {44}
215: {3,14}
317: {66}
325: {3,3,6}
505: {3,26}
557: {102}
559: {6,14}
625: {3,3,3,3}
701: {126}
845: {3,6,6}
965: {3,44}
Cf.
A000002,
A000720,
A001222,
A001462,
A007097,
A045965,
A055396,
A061395,
A064989,
A079000,
A079254,
A109298,
A112798,
A276625,
A277098,
A304360.
-
aQ[n_]:=Switch[n,0,False,1,False,2,True,,And@@Cases[FactorInteger[n],{p,k_}:>aQ[PrimePi[p]-1]]];
Select[Range[100],aQ]
A324703
Lexicographically earliest sequence containing 3 and all positive integers n such that the prime indices of n - 1 already belong to the sequence.
Original entry on oeis.org
3, 6, 14, 26, 44, 66, 102, 126, 170, 194, 216, 318, 326, 506, 558, 560, 626, 702, 846, 966, 1014, 1076, 1182, 1314, 1322, 1586, 1626, 1850, 2112, 2162, 2198, 2510, 2526, 2786, 2796, 3126, 3506, 3618, 4050, 4058, 4122, 4226, 4344, 4640, 4826, 5066, 5298, 5376
Offset: 1
Cf.
A000002,
A000720,
A001222,
A001462,
A007097,
A045965,
A055396,
A061395,
A064989,
A079000,
A079254,
A109298,
A112798,
A276625,
A277098,
A304360.
-
aQ[n_]:=Switch[n,0,False,3,True,,And@@Cases[FactorInteger[n-1],{p,k_}:>aQ[PrimePi[p]]]];
Select[Range[0,1000],aQ]
A324705
Lexicographically earliest sequence containing 1 and all composite numbers divisible by prime(m) for some m already in the sequence.
Original entry on oeis.org
1, 4, 6, 8, 10, 12, 14, 16, 18, 20, 21, 22, 24, 26, 28, 30, 32, 34, 35, 36, 38, 39, 40, 42, 44, 46, 48, 49, 50, 52, 54, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 70, 72, 74, 76, 77, 78, 80, 82, 84, 86, 87, 88, 90, 91, 92, 94, 95, 96, 98, 100, 102, 104, 105, 106
Offset: 1
The sequence of terms together with their prime indices begins:
1: {}
4: {1,1}
6: {1,2}
8: {1,1,1}
10: {1,3}
12: {1,1,2}
14: {1,4}
16: {1,1,1,1}
18: {1,2,2}
20: {1,1,3}
21: {2,4}
22: {1,5}
24: {1,1,1,2}
26: {1,6}
28: {1,1,4}
30: {1,2,3}
32: {1,1,1,1,1}
34: {1,7}
35: {3,4}
36: {1,1,2,2}
Cf.
A000002,
A000720,
A001222,
A001462,
A007097,
A055396,
A061395,
A079000,
A079254,
A109298,
A112798,
A276625,
A277098,
A304360.
-
aQ[n_]:=Switch[n,1,True,?PrimeQ,False,,!And@@Cases[FactorInteger[n],{p_,k_}:>!aQ[PrimePi[p]]]];
Select[Range[200],aQ]
Comments