A377355
a(n) is the greatest k not yet in the sequence such that A374356(n) = A374356(k).
Original entry on oeis.org
0, 1, 3, 2, 6, 7, 4, 5, 12, 13, 15, 14, 8, 9, 11, 10, 24, 25, 27, 26, 30, 31, 28, 29, 16, 17, 19, 18, 22, 23, 20, 21, 48, 49, 51, 50, 54, 55, 52, 53, 60, 61, 63, 62, 56, 57, 59, 58, 32, 33, 35, 34, 38, 39, 36, 37, 44, 45, 47, 46, 40, 41, 43, 42, 96, 97, 99, 98
Offset: 0
The first terms are:
n a(n) A374356(n) A374356(a(n))
-- ---- ---------- -------------
0 0 0 0
1 1 1 1
2 3 2 2
3 2 2 2
4 6 4 4
5 7 5 5
6 4 4 4
7 5 5 5
8 12 8 8
9 13 9 9
10 15 10 10
11 14 10 10
12 8 8 8
13 9 9 9
14 11 10 10
15 10 10 10
A245564
a(n) = Product_{i in row n of A245562} Fibonacci(i+2).
Original entry on oeis.org
1, 2, 2, 3, 2, 4, 3, 5, 2, 4, 4, 6, 3, 6, 5, 8, 2, 4, 4, 6, 4, 8, 6, 10, 3, 6, 6, 9, 5, 10, 8, 13, 2, 4, 4, 6, 4, 8, 6, 10, 4, 8, 8, 12, 6, 12, 10, 16, 3, 6, 6, 9, 6, 12, 9, 15, 5, 10, 10, 15, 8, 16, 13, 21, 2, 4, 4, 6, 4, 8, 6, 10, 4, 8, 8, 12, 6, 12, 10, 16, 4, 8, 8, 12, 8, 16, 12, 20, 6, 12, 12, 18
Offset: 0
From _Gus Wiseman_, Jul 05 2025: (Start)
The binary indices of 11 are {1,2,4}, with sparse subsets {{},{1},{2},{4},{1,4},{2,4}}, so a(11) = 6.
The maximal runs of binary indices of 11 are ((1,2),(4)), with lengths (2,1), so a(11) = F(2+2)*F(1+2) = 6.
The a(0) = 1 through a(12) = 3 sparse subsets are:
0 1 2 3 4 5 6 7 8 9 10 11 12
------------------------------------------------------------------
{} {} {} {} {} {} {} {} {} {} {} {} {}
{1} {2} {1} {3} {1} {2} {1} {4} {1} {2} {1} {3}
{2} {3} {3} {2} {4} {4} {2} {4}
{1,3} {3} {1,4} {2,4} {4}
{1,3} {1,4}
{2,4}
The greatest number whose set of binary indices is a member of column n above is A374356(n).
(End)
A034839 counts subsets by number of maximal runs, strict partitions
A116674.
A384877 gives lengths of maximal anti-runs of binary indices, firsts
A384878.
-
with(combinat); ans:=[];
for n from 0 to 100 do lis:=[]; t1:=convert(n,base,2); L1:=nops(t1); out1:=1; c:=0;
for i from 1 to L1 do
if out1 = 1 and t1[i] = 1 then out1:=0; c:=c+1;
elif out1 = 0 and t1[i] = 1 then c:=c+1;
elif out1 = 1 and t1[i] = 0 then c:=c;
elif out1 = 0 and t1[i] = 0 then lis:=[c,op(lis)]; out1:=1; c:=0;
fi;
if i = L1 and c>0 then lis:=[c,op(lis)]; fi;
od:
a:=mul(fibonacci(i+2), i in lis);
ans:=[op(ans),a];
od:
ans;
-
a[n_] := Sum[Mod[Binomial[3k, k] Binomial[n, k], 2], {k, 0, n}];
a /@ Range[0, 100] (* Jean-François Alcover, Feb 29 2020, after Chai Wah Wu *)
spars[S_]:=Select[Subsets[S],FreeQ[Differences[#],1]&];
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
Table[Length[spars[bpe[n]]],{n,0,30}] (* Gus Wiseman, Jul 05 2025 *)
-
a(n)=my(s=1,k); while(n, n>>=valuation(n,2); k=valuation(n+1,2); s*=fibonacci(k+2); n>>=k); s \\ Charles R Greathouse IV, Oct 21 2016
-
# use RLT function from A278159
from sympy import fibonacci
def A245564(n): return RLT(n,lambda m: fibonacci(m+2)) # Chai Wah Wu, Feb 04 2022
A374354
Irregular table T(n, k), n >= 0, 0 <= k < A277561(n), read by rows; the n-th row lists the fibbinary numbers f <= n such that n - f is also a fibbinary number whose binary expansion has no common 1's with that of f (where fibbinary numbers correspond to A003714).
Original entry on oeis.org
0, 0, 1, 0, 2, 1, 2, 0, 4, 0, 1, 4, 5, 2, 4, 2, 5, 0, 8, 0, 1, 8, 9, 0, 2, 8, 10, 1, 2, 9, 10, 4, 8, 4, 5, 8, 9, 4, 10, 5, 10, 0, 16, 0, 1, 16, 17, 0, 2, 16, 18, 1, 2, 17, 18, 0, 4, 16, 20, 0, 1, 4, 5, 16, 17, 20, 21, 2, 4, 18, 20, 2, 5, 18, 21, 8, 16, 8, 9, 16, 17
Offset: 0
Triangle T(n, k) begins:
n n-th row
-- -----------
0 0
1 0, 1
2 0, 2
3 1, 2
4 0, 4
5 0, 1, 4, 5
6 2, 4
7 2, 5
8 0, 8
9 0, 1, 8, 9
10 0, 2, 8, 10
11 1, 2, 9, 10
12 4, 8
13 4, 5, 8, 9
14 4, 10
15 5, 10
16 0, 16
-
row(n) = { my (r = [0], e, x, y, b); while (n, x = y = 0; e = valuation(n, 2); for (k = 0, oo, if (bittest(n, e+k), n -= b = 2^(e+k); [x, y] = [y + b, x], r = concat([v + y | v <- r], [v + x | v <- r]); break;););); return (r); }
A374355
a(n) is the least fibbinary number f <= n such that n - f is also a fibbinary number whose binary expansion has no common 1's with that of f (where fibbinary numbers correspond to A003714).
Original entry on oeis.org
0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 0, 1, 4, 4, 4, 5, 0, 0, 0, 1, 0, 0, 2, 2, 8, 8, 8, 9, 8, 8, 10, 10, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 0, 1, 4, 4, 4, 5, 16, 16, 16, 17, 16, 16, 18, 18, 16, 16, 16, 17, 20, 20, 20, 21, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 0, 1, 4, 4, 4, 5, 0
Offset: 0
The first terms, in binary and in decimal, are:
n a(n) bin(n) bin(a(n))
-- ---- ------ ---------
0 0 0 0
1 0 1 0
2 0 10 0
3 1 11 1
4 0 100 0
5 0 101 0
6 2 110 10
7 2 111 10
8 0 1000 0
9 0 1001 0
10 0 1010 0
11 1 1011 1
12 4 1100 100
13 4 1101 100
14 4 1110 100
15 5 1111 101
16 0 10000 0
-
a(n) = { my (v = 0, e, x, y, b); while (n, x = y = 0; e = valuation(n, 2); for (k = 0, oo, if (bittest(n, e+k), n -= b = 2^(e+k); [x, y] = [y + b, x], v += y; break;););); return (v); }
A384883
Number of maximal sparse subsets of the binary indices of n, where a set is sparse iff 1 is not a first difference.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 4, 2, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 4, 2, 2, 4, 4, 2, 2, 2, 4, 3, 3, 4, 5, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 1, 1, 2
Offset: 0
The binary indices of 27 are {1,2,4,5}, with maximal sparse subsets {{1,4},{1,5},{2,4},{2,5}}, so a(27) = 4.
For subsets of {1..n} we get
A000931 (shifted), maximal case of
A000045 (shifted).
This is the maximal case of
A245564.
The greatest number whose binary indices are one of these subsets is
A374356.
For prime instead of binary indices we have
A385215, maximal case of
A166469.
A034839 counts subsets by number of maximal runs, for strict partitions
A116674.
A202064 counts subsets containing n with k maximal runs.
A384877 gives lengths of maximal anti-runs in binary indices, firsts
A384878.
-
spars[S_]:=Select[Subsets[S],FreeQ[Differences[#],1]&];
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
maximize[sys_]:=Complement@@Prepend[Most[Subsets[#]]&/@sys,sys];
Table[Length[maximize[spars[bpe[n]]]],{n,0,100}]
A374396
a(n) is the last term in the n-th row of A374394.
Original entry on oeis.org
0, 1, 2, 2, 4, 3, 4, 7, 7, 6, 7, 7, 12, 11, 12, 10, 10, 12, 11, 12, 20, 20, 19, 20, 20, 17, 16, 17, 20, 20, 19, 20, 20, 33, 32, 33, 31, 31, 33, 32, 33, 28, 28, 27, 28, 28, 33, 32, 33, 31, 31, 33, 32, 33, 54, 54, 53, 54, 54, 51, 50, 51, 54, 54, 53, 54, 54, 46
Offset: 0
A385215
Number of maximal sparse submultisets of the prime indices of n, where a multiset is sparse iff 1 is not a first difference.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1
Offset: 1
The sparse submultisets of the prime indices of n = 8 are {{},{1},{1,1},{1,1,1}}, with maximization {{1,1,1}}. So a(8) = 1.
The sparse submultisets of the prime indices of n = 462 are {{},{1},{2},{4},{5},{1,4},{2,4},{1,5},{2,5}}, with maximization {{1,4},{1,5},{2,4},{2,5}}, so a(462) = 4.
The prime indices of n together their a(n) maximal sparse submultisets for n = 1, 6, 210, 462, 30030, 46410:
{} {1,2} {1,2,3,4} {1,2,4,5} {1,2,3,4,5,6} {1,2,3,4,6,7}
------------------------------------------------------------
{} {1} {1,3} {1,4} {2,5} {1,3,6}
{2} {1,4} {1,5} {1,3,5} {1,3,7}
{2,4} {2,4} {1,3,6} {1,4,6}
{2,5} {1,4,6} {1,4,7}
{2,4,6} {2,4,6}
{2,4,7}
This is the maximal case of
A166469.
For binary instead of prime indices we have
A384883, maximal case of
A245564.
The greatest number whose prime indices are one of these submultisets is
A385216.
A034839 counts subsets by number of maximal runs, for strict partitions
A116674.
A384887 counts partitions with equal lengths of gapless runs, distinct
A384884.
-
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
maxq[els_]:=Select[els,Not[Or@@Table[Divisible[oth,#],{oth,DeleteCases[els,#]}]]&];
Table[Length[maxq[Select[Divisors[n],FreeQ[Differences[prix[#]],1]&]]],{n,30}]
A377414
a(n) is the largest term of A126684, say b, such that n AND b = b (where AND denotes the bitwise AND operator).
Original entry on oeis.org
0, 1, 2, 2, 4, 5, 4, 5, 8, 8, 10, 10, 8, 8, 10, 10, 16, 17, 16, 17, 20, 21, 20, 21, 16, 17, 16, 17, 20, 21, 20, 21, 32, 32, 34, 34, 32, 32, 34, 34, 40, 40, 42, 42, 40, 40, 42, 42, 32, 32, 34, 34, 32, 32, 34, 34, 40, 40, 42, 42, 40, 40, 42, 42, 64, 65, 64, 65
Offset: 0
The first terms, in decimal and in binary, are:
n a(n) bin(n) bin(a(n))
-- ---- ------ ---------
0 0 0 0
1 1 1 1
2 2 10 10
3 2 11 10
4 4 100 100
5 5 101 101
6 4 110 100
7 5 111 101
8 8 1000 1000
9 8 1001 1000
10 10 1010 1010
11 10 1011 1010
12 8 1100 1000
13 8 1101 1000
14 10 1110 1010
15 10 1111 1010
-
a(n) = { my (v = 0, x = exponent(n), y); while (n, n -= 2^y = exponent(n); if (x%2 == y%2, v += 2^y;);); return (v); }
A385216
Greatest Heinz number of a sparse submultiset of the prime indices of n, where a multiset is sparse iff 1 is not a first difference.
Original entry on oeis.org
1, 2, 3, 4, 5, 3, 7, 8, 9, 10, 11, 4, 13, 14, 5, 16, 17, 9, 19, 20, 21, 22, 23, 8, 25, 26, 27, 28, 29, 10, 31, 32, 33, 34, 7, 9, 37, 38, 39, 40, 41, 21, 43, 44, 9, 46, 47, 16, 49, 50, 51, 52, 53, 27, 55, 56, 57, 58, 59, 20, 61, 62, 63, 64, 65, 33, 67, 68, 69
Offset: 1
The prime indices of 12 are {1,1,2}, with sparse submultisets {{},{1},{2},{1,1}}, with Heinz numbers {1,2,3,4}, so a(12) = 4.
The prime indices of 36 are {1,1,2,2}, with sparse submultisets {{},{1},{2},{1,1},{2,2}}, with Heinz numbers {1,2,3,4,9}, so a(36) = 9.
The prime indices of 462 are {1,2,4,5}, with sparse submultisets {{},{1},{2},{4},{5},{1,4},{2,4},{1,5},{2,5}}, with Heinz numbers {1,2,3,7,11,14,21,22,33}, so a(462) = 33.
The union is
A319630 (Heinz numbers of sparse multisets), complement
A104210.
A000005 counts divisors (or submultisets of prime indices).
A212166 ranks partitions with max multiplicity = length, counted by
A239964.
A381542 ranks partitions with max part = max multiplicity, counted by
A240312.
-
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Table[Max@@Select[Divisors[n],FreeQ[Differences[prix[#]],1]&],{n,100}]
Showing 1-9 of 9 results.
Comments