Original entry on oeis.org
2, 4, 16, 32, 256, 512, 2048, 4096, 65536, 131072, 524288, 1048576, 8388608, 16777216, 67108864, 134217728, 4294967296, 8589934592, 34359738368, 68719476736, 549755813888, 1099511627776, 4398046511104, 8796093022208
Offset: 0
-
denom((binomial(2n,n)*4^-n)/2); # Stephen Crowley, Mar 05 2007
-
Table[Numerator[Beta[1, n + 1, 1/2]], {n, 0, 22}] (* Gerry Martens, Nov 13 2016 *)
A048881
a(n) = A000120(n+1) - 1 = wt(n+1) - 1.
Original entry on oeis.org
0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3
Offset: 0
From _Omar E. Pol_, Mar 08 2011: (Start)
Sequence can be written in the following form (irregular triangle):
0,
0,1,
0,1,1,2,
0,1,1,2,1,2,2,3,
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
...
Row sums are A001787.
(End)
-
a048881 n = a048881_list !! n
a048881_list = c [0] where c (x:xs) = x : c (xs ++ [x,x+1])
-- Reinhard Zumkeller, Mar 07 2011
(Python 3.10+)
def A048881(n): return (n+1).bit_count()-1 # Chai Wah Wu, Nov 15 2022
-
A048881 := proc(n)
A000120(n+1)-1 ;
end proc:
seq(A048881(n),n=0..200) ; # R. J. Mathar, Mar 12 2018
-
a[n_] := IntegerExponent[ CatalanNumber[n], 2]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Jun 21 2013 *)
-
{ a(n) = if( n<0, 0, n++; n /= 2^valuation(n,2); subst( Pol( binary( n ) ), x, 1) - 1 ) } /* Michael Somos, Aug 23 2007 */
-
{a(n) = if( n<0, 0, valuation( (2*n)! / n! / (n+1)!, 2 ) ) } /* Michael Somos, Aug 23 2007 */
-
a(n) = hammingweight(n+1) - 1; \\ Michel Marcus, Nov 15 2022
A046699
a(1) = a(2) = 1, a(n) = a(n - a(n-1)) + a(n-1 - a(n-2)) if n > 2.
Original entry on oeis.org
1, 1, 2, 2, 3, 4, 4, 4, 5, 6, 6, 7, 8, 8, 8, 8, 9, 10, 10, 11, 12, 12, 12, 13, 14, 14, 15, 16, 16, 16, 16, 16, 17, 18, 18, 19, 20, 20, 20, 21, 22, 22, 23, 24, 24, 24, 24, 25, 26, 26, 27, 28, 28, 28, 29, 30, 30, 31, 32, 32, 32, 32, 32, 32, 33, 34, 34, 35, 36, 36, 36, 37
Offset: 1
- Sequence was proposed by Reg Allenby.
- B. W. Conolly, "Meta-Fibonacci sequences," in S. Vajda, editor, Fibonacci and Lucas Numbers and the Golden Section. Halstead Press, NY, 1989, pp. 127-138. See Eq. (2).
- Michael Doob, The Canadian Mathematical Olympiad & L'Olympiade Mathématique du Canada 1969-1993, Canadian Mathematical Society & Société Mathématique du Canada, Problem 5, 1990, pp. 212-213, 1993.
- S. Vajda, Fibonacci and Lucas Numbers and the Golden Section, Wiley, 1989, see p. 129.
- S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 129.
- N. J. A. Sloane, Table of n, a(n) for n = 1..20000
- Altug Alkan, On a Generalization of Hofstadter's Q-Sequence: A Family of Chaotic Generational Structures, Complexity (2018) Article ID 8517125.
- Joerg Arndt, Matters Computational (The Fxtbook)
- Stephen M. Buckley, Wiring switches to more light bulbs, arXiv:2410.02460 [math.CO], 2024. See pp. 3, 12, 22.
- Joseph Callaghan, John J. Chew III, and Stephen M. Tanny, On the behavior of a family of meta-Fibonacci sequences, SIAM Journal on Discrete Mathematics 18.4 (2005): 794-824. See p. 794. - _N. J. A. Sloane_, Apr 16 2014
- M. Celaya and F. Ruskey, Morphic Words and Nested Recurrence Relations, arXiv preprint arXiv:1307.0153 [math.CO], 2013.
- C. Deugau and F. Ruskey, Complete k-ary Trees and Generalized Meta-Fibonacci Sequences, J. Integer Seq., Vol. 12. [This is a later version than that in the GenMetaFib.html link]
- C. Deugau and F. Ruskey, Complete k-ary Trees and Generalized Meta-Fibonacci Sequences
- A. Erickson, A. Isgur, B. W. Jackson, F. Ruskey and S. M. Tanny, Nested recurrence relations with Conolly-like solutions, See Table 2.
- Nathan Fox, A Slow Relative of Hofstadter's Q-Sequence, arXiv:1611.08244 [math.NT], 2016.
- Nathan Fox, Trees, Fibonacci Numbers, and Nested Recurrences, Rutgers University Experimental Math Seminar, Mar 07, 2019.
- Nathan Fox, Connecting Slow Solutions to Nested Recurrences with Linear Recurrent Sequences, arXiv:2203.09340 [math.CO], 2022.
- The IMO Compendium, Problem 5, 22nd Canadian Mathematical Olympiad 1990.
- Abraham Isgur, Mustazee Rahman, and Stephen Tanny, Solving non-homogeneous nested recursions using trees, Annals of Combinatorics 17.4 (2013): 695-710. See p. 695. - _N. J. A. Sloane_, Apr 16 2014
- A. Isgur, R. Lech, S. Moore, S. Tanny, Y. Verberne, and Y. Zhang, Constructing New Families of Nested Recursions with Slow Solutions, SIAM J. Discrete Math., 30(2), 2016, 1128-1147. (20 pages); DOI:10.1137/15M1040505.
- B. Jackson and F. Ruskey, Meta-Fibonacci Sequences, Binary Trees and Extremal Compact Codes
- B. Jackson and F. Ruskey, Meta-Fibonacci Sequences, Binary Trees and Extremal Compact Codes, Electronic Journal of Combinatorics, 13 (2006), #R26, 13 pages.
- Oliver Kullmann and Xishun Zhao, Parameters for minimal unsatisfiability: Smarandache primitive numbers and full clauses, arXiv preprint, arXiv:1505.02318 [cs.DM], 2015.
- Thomas M. Lewis and Fabian Salinas, Optimal pebbling of complete binary trees and a meta-Fibonacci sequence, arXiv:2109.07328 [math.CO], 2021.
- Ramin Naimi and Eric Sundberg, A Combinatorial Problem Solved by a Meta-Fibonacci Recurrence Relation, arXiv:1902.02929 [math.CO], 2019.
- Index entries for Hofstadter-type sequences.
- Index to sequences related to Olympiads.
Cf.
A001511,
A005185,
A005187,
A007843,
A055938,
A079559,
A080578,
A101925,
A182105,
A213714,
A226222,
A234016,
A275363,
A324473,
A324475,
A324477.
-
a046699 n = a046699_list !! (n-1)
a046699_list = 1 : 1 : zipWith (+) zs (tail zs) where
zs = map a046699 $ zipWith (-) [2..] a046699_list
-- Reinhard Zumkeller, Jan 02 2012
-
[ n le 2 select 1 else Self(n - Self(n-1)) + Self(n-1 -Self(n-2)):n in [1..80]]; // Marius A. Burtea, Oct 17 2019
-
a := proc(n) option remember; if n <= 1 then return 1 end if; if n <= 2 then return 2 end if; return add(a(n - i + 1 - a(n - i)), i = 1 .. 2) end proc # Frank Ruskey and Chris Deugau (deugaucj(AT)uvic.ca)
a := proc(n) option remember; if n <= 2 then 1 else a(n - a(n-1)) + a(n-1 - a(n-2)); fi; end; # N. J. A. Sloane, Apr 16 2014
-
a[n_] := (k = 1; While[ !Divisible[(2*++k)!, 2^(n-1)]]; k); a[1] = a[2] = 1; Table[a[n], {n, 1, 72}] (* Jean-François Alcover, Oct 06 2011, after Benoit Cloitre *)
CoefficientList[ Series[1 + x/(1 - x)*Product[1 + x^(2^n - 1), {n, 6}], {x, 0, 80}], x] (* or *)
a[1] = a[2] = 1; a[n_] := a[n] = a[n - a[n - 1]] + a[n - 1 - a[n - 2]]; Array[a, 80] (* Robert G. Wilson v, Sep 08 2014 *)
-
a[1]:1$
a[2]:1$
a[n]:=a[n-a[n-1]]+a[n-1-a[n-2]]$
makelist(a[n],n,2,60); /* Martin Ettl, Oct 29 2012 */
-
a(n)=if(n<0,1,s=1;while((2*s)!%2^(n-1)>0,s++);s) \\ Benoit Cloitre, Jan 19 2007
-
from sympy import factorial
def a(n):
if n<3: return 1
s=1
while factorial(2*s)%(2**(n - 1))>0: s+=1
return s
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 11 2017, after Benoit Cloitre
A082850
Let S(0) = {}, S(n) = {S(n-1), S(n-1), n}; sequence gives S(infinity).
Original entry on oeis.org
1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1, 1, 2, 3, 4, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1, 1, 2, 3, 4, 5, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1, 1, 2, 3, 4, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1, 1, 2, 3, 4, 5, 6, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1, 1, 2, 3, 4, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1, 1, 2, 3, 4, 5, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1
Offset: 1
S(1) = {1}, S(2) = {1,1,2}, S(3) = {1,1,2,1,1,2,3}, etc.
-
Fold[Flatten[{#1, #1, #2}] &, {}, Range[5]] (* Birkas Gyorgy, Apr 13 2011 *)
Flatten[Table[Length@Last@Split@IntegerDigits[2 n, 2], {n, 20}] /. {n_ ->Range[n]}] (* Birkas Gyorgy, Apr 13 2011 *)
-
S = []; [S.extend(S + [n]) for n in range(1, 8)]
print(S) # Michael S. Branicky, Jul 02 2022
-
from itertools import count, islice
def A082850_gen(): # generator of terms
S = []
for n in count(1):
yield from (m:=S+[n])
S += m #
A082850_list = list(islice(A082850_gen(),20)) # Chai Wah Wu, Mar 06 2023
A364675
Number of integer partitions of n whose nonzero first differences are a submultiset of the parts.
Original entry on oeis.org
1, 1, 2, 3, 4, 4, 7, 7, 10, 12, 15, 15, 26, 25, 35, 45, 55, 60, 86, 94, 126, 150, 186, 216, 288, 328, 407, 493, 610, 699, 896, 1030, 1269, 1500, 1816, 2130, 2620, 3029, 3654, 4300, 5165, 5984, 7222, 8368, 9976, 11637, 13771, 15960, 18978, 21896, 25815, 29915
Offset: 0
The partition y = (3,2,1,1) has first differences (1,1,0), and (1,1) is a submultiset of y, so y is counted under a(7).
The a(1) = 1 through a(8) = 10 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (21) (22) (221) (33) (421) (44)
(111) (211) (2111) (42) (2221) (422)
(1111) (11111) (222) (3211) (2222)
(2211) (22111) (4211)
(21111) (211111) (22211)
(111111) (1111111) (32111)
(221111)
(2111111)
(11111111)
The strict case (no differences of 0) appears to be
A154402.
Starting with the distinct parts gives
A342337.
For subsets instead of submultisets we have
A364673.
A325325 counts partitions with distinct first differences.
Cf.
A002865,
A007862,
A108917,
A229816,
A237667,
A237668,
A320347,
A363225,
A364272,
A364345,
A364466.
-
submultQ[cap_,fat_] := And@@Function[i,Count[fat,i] >= Count[cap,i]] /@ Union[List@@cap];
Table[Length[Select[IntegerPartitions[n], submultQ[Differences[Union[#]],#]&]], {n,0,30}]
A113474
a(n) = a(floor(n/2)) + floor(n/2) with a(1) = 1.
Original entry on oeis.org
1, 2, 2, 4, 4, 5, 5, 8, 8, 9, 9, 11, 11, 12, 12, 16, 16, 17, 17, 19, 19, 20, 20, 23, 23, 24, 24, 26, 26, 27, 27, 32, 32, 33, 33, 35, 35, 36, 36, 39, 39, 40, 40, 42, 42, 43, 43, 47, 47, 48, 48, 50, 50, 51, 51, 54, 54, 55, 55, 57, 57, 58, 58, 64, 64, 65, 65, 67, 67, 68, 68, 71, 71
Offset: 1
-
A113474:= func< n | n+1-Multiplicity(Intseq(n, 2), 1) >;
[A113474(n): n in [1..90]]; // G. C. Greubel, Sep 28 2024
-
a[1]=1;a[n_]:=a[n]=a[Floor[n/2]]+Floor[n/2]; Table[a[n], {n, 100}]
-
for(n=1, 90, print1(1 - n + sum(k=0,n, n\2^k), ", ")) \\ G. C. Greubel, Mar 11 2017
-
a(n)=sum(k=1,logint(n,2), n>>k)+1 \\ Charles R Greathouse IV, Mar 12 2017
-
a(n)=n+1-hammingweight(n) \\ Charles R Greathouse IV, Dec 29 2022
-
def A113474(n): return n+1 - sum((n+0).digits(2))
[A113474(n) for n in range(1,90)] # G. C. Greubel, Sep 28 2024
A077070
Triangle read by rows: T(n,k) is the power of 2 in denominator of coefficients of Legendre polynomials, where n >= 0 and 0 <= k <= n.
Original entry on oeis.org
0, 1, 1, 3, 2, 3, 4, 4, 4, 4, 7, 5, 6, 5, 7, 8, 8, 7, 7, 8, 8, 10, 9, 10, 8, 10, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 15, 12, 13, 12, 14, 12, 13, 12, 15, 16, 16, 14, 14, 15, 15, 14, 14, 16, 16, 18, 17, 18, 15, 17, 16, 17, 15, 18, 17, 18, 19, 19, 19, 19, 18, 18, 18, 18, 19, 19, 19, 19, 22, 20, 21, 20, 22, 19, 20, 19, 22, 20, 21, 20, 22
Offset: 0
Triangle T(n,k) (with rows n >= 0 and columns k >= 0) begins as follows:
0;
1, 1;
3, 2, 3;
4, 4, 4, 4;
7, 5, 6, 5, 7;
8, 8, 7, 7, 8, 8;
10, 9, 10, 8, 10, 9, 10;
...
-
T:= n-> (p-> seq(padic[ordp](denom(coeff(p, x, i)), 2)
, i=0..2*n, 2))(orthopoly[P](2*n, x)):
seq(T(n), n=0..12); # Alois P. Heinz, Jan 25 2022
-
T[n_, k_] := IntegerExponent[Denominator[Coefficient[LegendreP[2n, x], x, 2k]], 2]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 28 2017 *)
-
{T(n, k) = if( k<0 || k>n, 0, -valuation( polcoeff( pollegendre(2*n), 2*k), 2))}
-
T(n,k) = 2*n - hammingweight(n-k) - hammingweight(k); \\ Kevin Ryde, Jan 29 2022
A118319
a(n) = (highest power of 2 dividing n)th integer among those positive integers not occurring in {a(1),a(2),a(3),...,a(n-1)}.
Original entry on oeis.org
1, 3, 2, 7, 4, 6, 5, 15, 8, 10, 9, 14, 11, 13, 12, 31, 16, 18, 17, 22, 19, 21, 20, 30, 23, 25, 24, 29, 26, 28, 27, 63, 32, 34, 33, 38, 35, 37, 36, 46, 39, 41, 40, 45, 42, 44, 43, 62, 47, 49, 48, 53, 50, 52, 51, 61, 54, 56, 55, 60, 57, 59, 58, 127, 64, 66, 65, 70, 67, 69, 68, 78
Offset: 1
4 is the highest power of 2 dividing 12. Those positive integers not occurring among the first 11 terms of the sequence form the sequence 11, 12, 13, 14, 16,... Now 14 is the 4th of these integers, so a(12) = 14.
-
A118319 := proc(nmin) local a,anxt,i,n ; a := [1] ; while nops(a) < nmin do n := nops(a)+1 ; i := 2^A007814(n); anxt := 0 ; while i > 0 do anxt := anxt+1 ; while anxt in a do anxt := anxt+1 ; od ; i := i-1; od ; a := [op(a),anxt] ; od; a ; end: A118319(80) ; # R. J. Mathar, Sep 06 2007
a := n -> n + 2^padic[ordp](n, 2) - add(convert(n, base, 2)): seq(a(n), n = 1..72); # Peter Luschny, Mar 08 2025
-
a[1] := 1; a[n_] := a[n] = Part[ Complement[ Range[2 n], Table[a[i], {i, n - 1}]], 2^IntegerExponent[n, 2]]; Array[a, 100] (* Birkas Gyorgy, Jul 09 2012 *)
-
a(n) = n + 1<Kevin Ryde, Mar 02 2025
A144816
Denominators of triangle T(n,k), n>=0, 0<=k<=n, read by rows: T(n,k) is the coefficient of x^(2*k+1) in polynomial t_n(x), used to define continuous and n times differentiable sigmoidal transfer functions.
Original entry on oeis.org
1, 2, 2, 8, 4, 8, 16, 16, 16, 16, 128, 32, 64, 32, 128, 256, 256, 128, 128, 256, 256, 1024, 512, 1024, 256, 1024, 512, 1024, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 32768, 4096, 8192, 4096, 16384, 4096, 8192, 4096, 32768, 65536, 65536, 16384, 16384, 32768, 32768, 16384, 16384, 65536, 65536
Offset: 0
Triangle begins:
1;
2, 2;
8, 4, 8;
16, 16, 16, 16;
128, 32, 64, 32, 128;
...
See
A144815 for more information on T(n,k).
Main diagonal and column k=0 gives
A046161.
-
# Function T(n,k) defined in A144815.
seq(seq(denom(T(n,k)), k=0..n), n=0..10);
-
row[n_] := Module[{f, a, eq}, f = Function[x, Sum[a[2*k+1]*x^(2*k+1), {k, 0, n}]]; eq = Table[Derivative[k][f][1] == If[k == 0, 1, 0], {k, 0, n}]; Table[a[2*k+1], {k, 0, n}] /. Solve[eq] // First]; Table[row[n] // Denominator, {n, 0, 10}] // Flatten (* Jean-François Alcover, Feb 03 2014 *)
A273926
Given G(x) such that G( G(x)^2 - G(x)^3 ) = x^2, then G(x) = Sum_{n>=1} A273925(n)*x^n / 2^a(n).
Original entry on oeis.org
0, 1, 3, 2, 7, 4, 10, 5, 15, 8, 18, 9, 22, 11, 25, 12, 31, 16, 34, 17, 38, 19, 41, 20, 46, 23, 49, 24, 53, 26, 56, 27, 63, 32, 66, 33, 70, 35, 73, 36, 78, 39, 81, 40, 85, 42, 88, 43, 94, 47, 97, 48, 101, 50, 104, 51, 109, 54, 112, 55, 116, 57, 119, 58, 127, 64, 130, 65, 134, 67, 137, 68, 142, 71, 145, 72, 149, 74, 152, 75, 158, 79, 161, 80, 165, 82, 168, 83, 173, 86, 176, 87, 180, 89, 183, 90, 190, 95, 193, 96, 197, 98, 200, 99, 205, 102, 208, 103, 212, 105, 215, 106, 221, 110, 224, 111, 228, 113, 231, 114
Offset: 1
G.f.: G(x) = x + 1/2*x^2 + 3/8*x^3 + 3/4*x^4 + 175/128*x^5 + 41/16*x^6 + 4947/1024*x^7 + 321/32*x^8 + 687611/32768*x^9 + 11403/256*x^10 + 25132181/262144*x^11 + 107305/512*x^12 + 1941554203/4194304*x^13 + 2111325/2048*x^14 + 77643067507/33554432*x^15 + 21427329/4096*x^16 + 25549683166419/2147483648*x^17 + 1782548851/65536*x^18 + 1073363084982753/17179869184*x^19 + 18891311061/131072*x^20 + 91744420207896017/274877906944*x^21 + 406630578535/524288*x^22 + 3975787925128277349/2199023255552*x^23 + 4432136534071/1048576*x^24 +...+ A273925(n)*x^n / 2^a(n) +...
such that G( G(x)^2 - G(x)^3 ) = x^2.
The bisections of this sequence begin:
odd bisection (cf. A120738): [0, 3, 7, 10, 15, 18, 22, 25, 31, 34, 38, 41, 46, 49, 53, 56, 63, 66, 70, 73, 78, 81, 85, 88, 94, 97, 101, 104, 109, 112, 116, 119, 127, 130, 134, 137, 142, 145, 149, 152, 158, 161, 165, 168, 173, 176, 180, 183, 190, 193, 197, 200, 205, 208, 212, 215, 221, 224, 228, 231, 236, 239, 243, 246, 255, ...].
even bisection (cf. A101925): [1, 2, 4, 5, 8, 9, 11, 12, 16, 17, 19, 20, 23, 24, 26, 27, 32, 33, 35, 36, 39, 40, 42, 43, 47, 48, 50, 51, 54, 55, 57, 58, 64, 65, 67, 68, 71, 72, 74, 75, 79, 80, 82, 83, 86, 87, 89, 90, 95, 96, 98, 99, 102, 103, 105, 106, 110, 111, 113, 114, 117, 118, 120, 121, 128, ...].
-
{a(n) = my(A=x); for(i=0,n, A = serreverse( sqrt(subst(A,x,x^2 - x^3 +x^2*O(x^n) )) )); valuation(denominator(polcoeff(A,n)),2)}
for(n=1,60,print1(a(n),", "))
Showing 1-10 of 13 results.
Comments