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.

Showing 1-10 of 31 results. Next

A033484 a(n) = 3*2^n - 2.

Original entry on oeis.org

1, 4, 10, 22, 46, 94, 190, 382, 766, 1534, 3070, 6142, 12286, 24574, 49150, 98302, 196606, 393214, 786430, 1572862, 3145726, 6291454, 12582910, 25165822, 50331646, 100663294, 201326590, 402653182, 805306366, 1610612734, 3221225470
Offset: 0

Views

Author

Keywords

Comments

Number of nodes in rooted tree of height n in which every node (including the root) has valency 3.
Pascal diamond numbers: reflect Pascal's n-th triangle vertically and sum all elements. E.g., a(3)=1+(1+1)+(1+2+1)+(1+1)+1. - Paul Barry, Jun 23 2003
Number of 2 X n binary matrices avoiding simultaneously the right-angled numbered polyomino patterns (ranpp) (00;1), (10;0) and (11;0). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1 < i2 and j1 < j2 and these elements are in the same relative order as those in the triple (x,y,z). - Sergey Kitaev, Nov 11 2004
Binomial and inverse binomial transform are in A001047 (shifted) and A122553. - R. J. Mathar, Sep 02 2008
a(n) = (Sum_{k=0..n-1} a(n)) + (2*n + 1); e.g., a(3) = 22 = (1 + 4 + 10) + 7. - Gary W. Adamson, Jan 21 2009
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if either 0) x is a proper subset of y or y is a proper subset of x and x and y are disjoint, or 1) x equals y. Then a(n) = |R|. - Ross La Haye, Mar 19 2009
Equals the Jacobsthal sequence A001045 convolved with (1, 3, 4, 4, 4, 4, 4, ...). - Gary W. Adamson, May 24 2009
Equals the eigensequence of a triangle with the odd integers as the left border and the rest 1's. - Gary W. Adamson, Jul 24 2010
An elephant sequence, see A175655. For the central square four A[5] vectors, with decimal values 58, 154, 178 and 184, lead to this sequence. For the corner squares these vectors lead to the companion sequence A097813. - Johannes W. Meijer, Aug 15 2010
a(n+2) is the integer with bit string "10" * "1"^n * "10".
a(n) = A027383(2n). - Jason Kimberley, Nov 03 2011
a(n) = A153893(n)-1 = A083416(2n+1). - Philippe Deléham, Apr 14 2013
a(n) = A082560(n+1,A000079(n)) = A232642(n+1,A128588(n+1)). - Reinhard Zumkeller, May 14 2015
a(n) is the sum of the entries in the n-th and (n+1)-st rows of Pascal's triangle minus 2. - Stuart E Anderson, Aug 27 2017
Also the number of independent vertex sets and vertex covers in the complete tripartite graph K_{n,n,n}. - Eric W. Weisstein, Sep 21 2017
Apparently, a(n) is the least k such that the binary expansion of A000045(k) ends with exactly n+1 ones. - Rémy Sigrist, Sep 25 2021
a(n) is the number of root ancestral configurations for a pair consisting of a matching gene tree and species tree with the modified lodgepole shape and n+1 cherry nodes. - Noah A Rosenberg, Jan 16 2025

Examples

			Binary: 1, 100, 1010, 10110, 101110, 1011110, 10111110, 101111110, 1011111110, 10111111110, 101111111110, 1011111111110, 10111111111110,
G.f. = 1 + 4*x + 10*x^2 + 22*x^3 + 46*x^4 + 94*x^5 + 190*x^6 + 382*x^7 + ...
		

References

  • J. Riordan, Series-parallel realization of the sum modulo 2 of n switching variables, in Claude Elwood Shannon: Collected Papers, edited by N. J. A. Sloane and A. D. Wyner, IEEE Press, NY, 1993, pp. 877-878.

Crossrefs

Programs

  • GAP
    List([0..35], n-> 3*2^n -2); # G. C. Greubel, Nov 18 2019
  • Haskell
    a033484 = (subtract 2) . (* 3) . (2 ^)
    a033484_list = iterate ((subtract 2) . (* 2) . (+ 2)) 1
    -- Reinhard Zumkeller, Apr 23 2013
    
  • Magma
    [3*2^n-2: n in [1..36]]; // Vincenzo Librandi, Nov 22 2010
    
  • Maple
    with(combinat):a:=n->stirling2(n,2)+stirling2(n+1,2): seq(a(n), n=1..35); # Zerinvary Lajos, Oct 07 2007
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=(a[n-1]+1)*2 od: seq(a[n], n=1..35); # Zerinvary Lajos, Feb 22 2008
  • Mathematica
    Table[3 2^n - 2, {n, 0, 35}] (* Vladimir Joseph Stephan Orlovsky, Dec 16 2008 *)
    (* Start from Eric W. Weisstein, Sep 21 2017 *)
    3*2^Range[0, 35] - 2
    LinearRecurrence[{3, -2}, {1, 4}, 36]
    CoefficientList[Series[(1+x)/(1-3x+2x^2), {x, 0, 35}], x] (* End *)
  • PARI
    a(n) = 3<Charles R Greathouse IV, Nov 02 2011
    
  • Sage
    [3*2^n -2 for n in (0..35)] # G. C. Greubel, Nov 18 2019
    

Formula

G.f.: (1+x)/(1-3*x+2*x^2).
a(n) = 2*(a(n-1) + 1) for n>0, with a(0)=1.
a(n) = A007283(n) - 2.
G.f. is equivalent to (1-2*x-3*x^2)/((1-x)*(1-2*x)*(1-3*x)). - Paul Barry, Apr 28 2004
From Reinhard Zumkeller, Oct 09 2004: (Start)
A099257(a(n)) = A099258(a(n)) = a(n).
a(n) = 2*A055010(n) = (A068156(n) - 1)/2. (End)
Row sums of triangle A130452. - Gary W. Adamson, May 26 2007
Row sums of triangle A131110. - Gary W. Adamson, Jun 15 2007
Binomial transform of (1, 3, 3, 3, ...). - Gary W. Adamson, Oct 17 2007
Row sums of triangle A051597 (a triangle generated from Pascal's rule given right and left borders = 1, 2, 3, ...). - Gary W. Adamson, Nov 04 2007
Equals A132776 * [1/1, 1/2, 1/3, ...]. - Gary W. Adamson, Nov 16 2007
a(n) = Sum_{k=0..n} A112468(n,k)*3^k. - Philippe Deléham, Feb 23 2014
a(n) = -(2^n) * A036563(1-n) for all n in Z. - Michael Somos, Jul 04 2017
E.g.f.: 3*exp(2*x) - 2*exp(x). - G. C. Greubel, Nov 18 2019

A264977 a(0) = 0, a(1) = 1, a(2*n) = 2*a(n), a(2*n+1) = a(n) XOR a(n+1).

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 6, 7, 8, 5, 2, 7, 12, 1, 14, 15, 16, 13, 10, 7, 4, 5, 14, 11, 24, 13, 2, 15, 28, 1, 30, 31, 32, 29, 26, 7, 20, 13, 14, 3, 8, 1, 10, 11, 28, 5, 22, 19, 48, 21, 26, 15, 4, 13, 30, 19, 56, 29, 2, 31, 60, 1, 62, 63, 64, 61, 58, 7, 52, 29, 14, 19, 40, 25, 26, 3, 28, 13, 6, 11, 16, 9, 2, 11, 20, 1, 22
Offset: 0

Views

Author

Antti Karttunen, Dec 10 2015

Keywords

Comments

a(n) is the n-th Stern polynomial (cf. A260443, A125184) evaluated at X = 2 over the field GF(2).
For n >= 1, a(n) gives the index of the row where n occurs in array A277710.

Examples

			In this example, binary numbers are given zero-padded to four bits.
a(2) = 2a(1) = 2 * 1 = 2.
a(3) = a(1) XOR a(2) = 1 XOR 2 = 0001 XOR 0010 = 0011 = 3.
a(4) = 2a(2) = 2 * 2 = 4.
a(5) = a(2) XOR a(3) = 2 XOR 3 = 0010 XOR 0011 = 0001 = 1.
a(6) = 2a(3) = 2 * 3 = 6.
a(7) = a(3) XOR a(4) = 3 XOR 4 = 0011 XOR 0100 = 0111 = 7.
		

Crossrefs

Cf. A023758 (the fixed points).
Cf. also A068156, A168081, A265407.
Cf. A277700 (binary weight of terms).
Cf. A277701, A277712, A277713 (positions of 1's, 2's and 3's in this sequence).
Cf. A277711 (position of the first occurrence of each n in this sequence).
Cf. also arrays A277710, A099884.

Programs

  • Mathematica
    recurXOR[0] = 0; recurXOR[1] = 1; recurXOR[n_] := recurXOR[n] = If[EvenQ[n], 2recurXOR[n/2], BitXor[recurXOR[(n - 1)/2 + 1], recurXOR[(n - 1)/2]]]; Table[recurXOR[n], {n, 0, 100}] (* Jean-François Alcover, Oct 23 2016 *)
  • Python
    class Memoize:
        def _init_(self, func):
            self.func=func
            self.cache={}
        def _call_(self, arg):
            if arg not in self.cache:
                self.cache[arg] = self.func(arg)
            return self.cache[arg]
    @Memoize
    def a(n): return n if n<2 else 2*a(n//2) if n%2==0 else a((n - 1)//2)^a((n + 1)//2)
    print([a(n) for n in range(51)]) # Indranil Ghosh, Jul 27 2017

Formula

a(0) = 0, a(1) = 1, a(2*n) = 2*a(n), a(2*n+1) = a(n) XOR a(n+1).
a(n) = A248663(A260443(n)).
a(n) = A048675(A277330(n)). - Antti Karttunen, Oct 27 2016
Other identities. For all n >= 0:
a(n) = n - A265397(n).
From Antti Karttunen, Oct 28 2016: (Start)
A000035(a(n)) = A000035(n). [Preserves the parity of n.]
A010873(a(n)) = A010873(n). [a(n) mod 4 = n mod 4.]
A001511(a(n)) = A001511(n) = A055396(A277330(n)). [In general, the 2-adic valuation of n is preserved.]
A010060(a(n)) = A011655(n).
a(n) <= n.
For n >= 2, a((2^n)+1) = (2^n) - 3.
The following two identities are so far unproved:
For n >= 2, a(3*A000225(n)) = a(A068156(n)) = 5.
For n >= 2, a(A068156(n)-2) = A062709(n) = 2^n + 3.
(End)

A324543 Möbius transform of A323243, where A323243(n) = sigma(A156552(n)).

Original entry on oeis.org

0, 1, 3, 3, 7, 2, 15, 4, 9, 5, 31, 3, 63, 2, 8, 16, 127, -1, 255, 4, 21, 16, 511, 8, 21, 20, 12, 27, 1023, 6, 2047, 8, 20, 48, 20, 20, 4095, 2, 78, 32, 8191, -6, 16383, 17, 9, 288, 32767, 8, 45, -3, 122, 45, 65535, 4, 53, 20, 270, 278, 131071, 2, 262143, 688, 12, 72, 56, 23, 524287, 125, 260, -8, 1048575, 20, 2097151, 260, 3, 363, 44, -7, 4194303
Offset: 1

Views

Author

Antti Karttunen, Mar 07 2019

Keywords

Comments

The first four zeros after a(1) occur at n = 192, 288, 3645, 6075.
There are 1562 negative terms among the first 10000 terms.
Applying this function to the divisors of the first four terms of A324201 reveals the following pattern:
----------------------------------------------------------------------------------
A324201 divisors a(n) applied to each: Sum
9: [1, 3, 9] -> [0, 3, 9] 12 = 2*6
125: [1, 5, 25, 125] -> [0, 7, 21, 28] 56 = 2*28
161051: [1, 11, 121, 1331, 14641, 161051] -> [0, 31, 93, 124, 496, 248] 992 = 2*496
410338673: [1, 17, 289, 4913, 83521, 1419857, 24137569, 410338673]
-> [0, 127, 381, 508, 2032, 1016, 9144, 3048] 16256 = 2*8128
The second term (the first nonzero) of the latter list = A000668(n), and the sum is always twice the corresponding perfect number, which forces either it or at least many of its divisors to be present. For example, in the fourth case, although 8128 = A000396(4) itself is not present, we still have 127, 508, 1016 and 2032 in the list. See also A329644.

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, MoebiusMu[n/#] If[# == 1, 0, DivisorSigma[1, Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ #]]]] &], {n, 79}] (* Michael De Vlieger, Mar 11 2019 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));
    memoA323243 = Map();
    A323243(n) = if(1==n, 0, my(v); if(mapisdefined(memoA323243,n,&v),v, v=sigma(A156552(n)); mapput(memoA323243,n,v); (v)));
    A324543(n) = sumdiv(n,d,moebius(n/d)*A323243(d));

Formula

a(n) = Sum_{d|n} A008683(n/d) * A323243(d).
a(A000040(n)) = A000225(n).
a(A001248(n)) = A173033(n) - A000225(n) = A068156(n) = 3*(2^n - 1).
a(2*A000040(n)) = A324549(n).
a(A002110(n)) = A324547(n).
a(n) = 2*A297112(n) - A329644(n), and for n > 1, a(n) = 2^A297113(n) - A329644(n). - Antti Karttunen, Dec 08 2019

A233308 Number A(n,k) of tilings of a k X k X n box using k*n bricks of shape k X 1 X 1; square array A(n,k), n>=0, k>=1, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 9, 1, 1, 2, 4, 32, 1, 1, 2, 4, 21, 121, 1, 1, 2, 4, 8, 92, 450, 1, 1, 2, 4, 8, 45, 320, 1681, 1, 1, 2, 4, 8, 16, 248, 1213, 6272, 1, 1, 2, 4, 8, 16, 93, 1032, 4822, 23409, 1, 1, 2, 4, 8, 16, 32, 668, 3524, 18556, 87362, 1, 1, 2, 4, 8, 16, 32, 189, 3440, 13173, 70929, 326041, 1
Offset: 0

Views

Author

Alois P. Heinz, Dec 07 2013

Keywords

Examples

			Square array A(n,k) begins:
  1,     1,     1,     1,     1,     1, ...
  1,     2,     2,     2,     2,     2, ...
  1,     9,     4,     4,     4,     4, ...
  1,    32,    21,     8,     8,     8, ...
  1,   121,    92,    45,    16,    16, ...
  1,   450,   320,   248,    93,    32, ...
  1,  1681,  1213,  1032,   668,   189, ...
  1,  6272,  4822,  3524,  3440,  1832, ...
  1, 23409, 18556, 13173, 13728, 11976, ...
		

Crossrefs

Columns k=1-6 give: A000012, A006253, A233289, A233291, A233294, A233424.
Diagonals include: A000079, A068156.

Programs

  • Maple
    b:= proc(n, l) option remember; local d, t, k; d:= isqrt(nops(l));
          if max(l[])>n then 0 elif n=0 then 1
        elif min(l[])>0 then t:=min(l[]); b(n-t, map(x->x-t, l))
        else for k while l[k]>0 do od; b(n, subsop(k=d, l))+
             `if`(irem(k,d)=1 and {seq(l[k+j], j=1..d-1)}={0},
             b(n, [seq(`if`(h-k=0, 1, l[h]), h=1..nops(l))]), 0)+
             `if`(k<=d and {seq(l[k+d*j], j=1..d-1)}={0},
             b(n, [seq(`if`(irem(h-k, d)=0, 1, l[h]), h=1..nops(l))]), 0)
          fi
        end:
    A:= (n, k)-> `if`(k>n, 2^n, b(n, [0$k^2])):
    seq(seq(A(n, 1+d-n), n=0..d), d=0..11);
  • Mathematica
    b[n_, l_] := b[n, l] = Module[{d, t, k}, d= Sqrt[Length[l]]; Which[ Max[l]>n, 0, n==0, 1, Min[l]>0, t=Min[l]; b[n-t, l-t], True, k=Position[l, 0, 1][[1, 1]]; b[n, ReplacePart[l, k->d]]+ If[Mod[k, d]==1 && Union[ Table[ l[[k+j]], {j, 1, d-1}]] == {0}, b[n, Table[ If [h-k=0, 1, l[[h]] ], {h, 1, Length[l]}]], 0]+ If[k <= d && Union[ Table[ l[[k+d*j]], {j, 1, d-1}]] == {0}, b[n, Table[ If[ Mod[h-k, d] == 0, 1, l[[h]] ], {h, 1, Length[l]}]], 0] ] ]; a[n_, k_]:= If[k>n, 2^n, b[n, Array[0&, k^2]]]; Table[Table[a[n, 1+d-n], {n, 0, d}], {d, 0, 11}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from Maple *)

Formula

A(n,k) = 2^n = A000079(n) for k>n.
A(n,n) = A068156(n) for n>1.

A175164 a(n) = 16*(2^n - 1).

Original entry on oeis.org

0, 16, 48, 112, 240, 496, 1008, 2032, 4080, 8176, 16368, 32752, 65520, 131056, 262128, 524272, 1048560, 2097136, 4194288, 8388592, 16777200, 33554416, 67108848, 134217712, 268435440
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 28 2010

Keywords

Crossrefs

Sequences of the form m*(2^n - 1): A000225 (m=1), A000918 (m=2), A068156 (m=3), A028399 (m=4), A068293 (m=6), A159741 (m=8), this sequence (m=16), A175165 (m=32), A175166 (m=64).

Programs

  • Magma
    I:=[0,16]; [n le 2 select I[n] else 3*Self(n-1) - 2*Self(n-2): n in [1..41]]; // G. C. Greubel, Jul 08 2021
    
  • Mathematica
    16*(2^Range[0,40] - 1) (* G. C. Greubel, Jul 08 2021 *)
  • Python
    def A175164(n): return (1<Chai Wah Wu, Jun 27 2023
  • Sage
    [16*(2^n -1) for n in (0..40)] # G. C. Greubel, Jul 08 2021
    

Formula

a(n) = 2^(n+4) - 16.
a(n) = A173787(n+4, 4).
a(2*n) = A140504(n+2)*A028399(n).
a(n) = 3*a(n-1) - 2*a(n-2), a(0)=0, a(1)=16. - Vincenzo Librandi, Dec 28 2010
From G. C. Greubel, Jul 08 2021: (Start)
G.f.: 16*x/((1-x)*(1-2*x)).
E.g.f.: 16*(exp(2*x) - exp(x)). (End)

A175166 a(n) = 64*(2^n - 1).

Original entry on oeis.org

0, 64, 192, 448, 960, 1984, 4032, 8128, 16320, 32704, 65472, 131008, 262080, 524224, 1048512, 2097088, 4194240, 8388544, 16777152, 33554368, 67108800, 134217664, 268435392, 536870848, 1073741760
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 28 2010

Keywords

Crossrefs

Sequences of the form m*(2^n - 1): A000225 (m=1), A000918 (m=2), A068156 (m=3), A028399 (m=4), A068293 (m=6), A159741 (m=8), A175164 (m=16), A175165 (m=32), this sequence (m=64).

Programs

  • Magma
    I:=[0,64]; [n le 2 select I[n] else 3*Self(n-1) - 2*Self(n-2): n in [1..41]]; // G. C. Greubel, Jul 08 2021
    
  • Mathematica
    LinearRecurrence[{3,-2},{0,64},30] (* Harvey P. Dale, Apr 08 2015 *)
  • Python
    def A175166(n): return (1<Chai Wah Wu, Jun 27 2023
  • Sage
    [64*(2^n -1) for n in (0..40)] # G. C. Greubel, Jul 08 2021
    

Formula

a(n) = 2^(n+6) - 64.
a(n) = A173787(n+6, 6).
a(2*n) = A175161(n)*A159741(n) for n > 0.
a(n) = 3*a(n-1) - 2*a(n-2), a(0)=0, a(1)=64. - Vincenzo Librandi, Dec 28 2010
From G. C. Greubel, Jul 08 2021: (Start)
G.f.: 64*x/((1-x)*(1-2*x)).
E.g.f.: 64*(exp(2*x) - exp(x)). (End)

A241717 The number of P-positions in the game of Nim with up to 3 piles, allowing for piles of zero, such that the number of objects in the largest pile is n.

Original entry on oeis.org

1, 3, 3, 9, 3, 9, 15, 21, 3, 9, 15, 21, 27, 33, 39, 45, 3, 9, 15, 21, 27, 33, 39, 45, 51, 57, 63, 69, 75, 81, 87, 93, 3, 9, 15, 21, 27, 33, 39, 45, 51, 57, 63, 69, 75, 81, 87, 93, 99, 105, 111, 117, 123, 129, 135, 141, 147, 153, 159, 165, 171
Offset: 0

Views

Author

Tanya Khovanova and Joshua Xiong, Apr 27 2014

Keywords

Comments

This is the finite difference of A236305.
Starting from index 1 all elements are divisible by 3, and can be grouped into sets of size 2^k of an arithmetic progression 6n-3.
It appears that the sum of all terms of the first n rows of triangle gives A000302(n-1), see Example section. - Omar E. Pol, May 01 2015

Examples

			If the largest number is 1, then there should be exactly two piles of size 1 and one empty pile. There are 3 ways to permute this configuration, so a(1)=3.
From _Omar E. Pol_, Feb 26 2015: (Start)
Also written as an irregular triangle in which the row lengths are the terms of A011782, the sequence begins:
1;
3;
3, 9;
3, 9, 15, 21;
3, 9, 15, 21, 27, 33, 39, 45;
3, 9, 15, 21, 27, 33, 39, 45, 51, 57, 63, 69, 75, 81, 87, 93;
...
Observation: the first six terms of the right border coincide with the first six terms of A068156.
(End)
From _Omar E. Pol_, Apr 20 2015: (Start)
An illustration of initial terms in the fourth quadrant of the square grid:
---------------------------------------------------------------------------
n   a(n)             Compact diagram
---------------------------------------------------------------------------
.            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0    1      |_| |_  |_ _ _  |_ _ _ _ _ _ _  |
1    3      |_ _| | |_ _  | |_ _ _ _ _ _  | |
2    3      | |_ _| |_  | | |_ _ _ _ _  | | |
3    9      |_ _ _ _| | | | |_ _ _ _  | | | |
4    3      | | | |_ _| | | |_ _ _  | | | | |
5    9      | | |_ _ _ _| | |_ _  | | | | | |
6   15      | |_ _ _ _ _ _| |_  | | | | | | |
7   21      |_ _ _ _ _ _ _ _| | | | | | | | |
8    3      | | | | | | | |_ _| | | | | | | |
9    9      | | | | | | |_ _ _ _| | | | | | |
10  15      | | | | | |_ _ _ _ _ _| | | | | |
11  21      | | | | |_ _ _ _ _ _ _ _| | | | |
12  27      | | | |_ _ _ _ _ _ _ _ _ _| | | |
13  33      | | |_ _ _ _ _ _ _ _ _ _ _ _| | |
14  39      | |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |
15  45      |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
.
It appears that a(n) is also the number of cells in the n-th region of the diagram, and A236305(n) is also the total number of cells after n-th stage.
(End)
		

Crossrefs

Cf. A011782, A068156, A236305 (partial sums), A241718 (4 piles), A241731 (5 piles).

Programs

  • Mathematica
    Table[Length[Select[Flatten[Table[{n, k, BitXor[n, k]}, {n, 0, a}, {k, 0, a}], 1], Max[#] == a &]], {a, 0, 100}]

Formula

If b = floor(log_2(n)) is the number of digits in the binary representation of n and c = n + 1 - 2^b, then a(n) = 6*c-3.

A277715 Row 5 of A277710: Positions of 5's in A264977; positions of 10's in A277330.

Original entry on oeis.org

9, 21, 45, 93, 189, 381, 657, 765, 873, 1317, 1533, 1749, 2457, 2637, 3069, 3501, 4329, 4917, 5241, 5277, 5745, 6141, 6345, 7005, 8661, 9561, 9837, 10017, 10485, 10557, 11493, 12285, 12693, 14013, 15129, 17325, 17985, 19125, 19677, 20037, 20973, 21117, 21969, 22989, 24573, 25389, 26793, 28029, 30261, 31545, 34653, 35973
Offset: 1

Views

Author

Antti Karttunen, Oct 29 2016

Keywords

Comments

Positions in A260443 of terms that are ten times a perfect square (terms in A033583, although not all of them are present in A260443).
It seems that A068156 from 9 onward is a subsequence, which (if true) would also be a sufficient condition for this sequence to be infinite.

Crossrefs

Formula

A277716(n) = a(n)/3.

A175165 a(n) = 32*(2^n - 1).

Original entry on oeis.org

0, 32, 96, 224, 480, 992, 2016, 4064, 8160, 16352, 32736, 65504, 131040, 262112, 524256, 1048544, 2097120, 4194272, 8388576, 16777184, 33554400, 67108832, 134217696, 268435424, 536870880
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 28 2010

Keywords

Crossrefs

Sequences of the form m*(2^n - 1): A000225 (m=1), A000918 (m=2), A068156 (m=3), A028399 (m=4), A068293 (m=6), A159741 (m=8), A175164 (m=16), this sequence (m=32), A175166 (m=64).
Cf. A173787.

Programs

  • Magma
    I:=[0,32]; [n le 2 select I[n] else 3*Self(n-1) - 2*Self(n-2): n in [1..41]]; // G. C. Greubel, Jul 08 2021
    
  • Mathematica
    32(2^Range[0,30] -1) (* or *) LinearRecurrence[{3,-2},{0,32},30] (* Harvey P. Dale, Mar 23 2015 *)
  • Python
    def A175165(n): return (1<Chai Wah Wu, Jun 27 2023
  • Sage
    [32*(2^n -1) for n in (0..40)] # G. C. Greubel, Jul 08 2021
    

Formula

a(n) = 2^(n+5) - 32.
a(n) = A173787(n+5, 5).
a(n) = 3*a(n-1) - 2*a(n-2); a(0)=0, a(1)=32. - Vincenzo Librandi, Dec 28 2010
From G. C. Greubel, Jul 08 2021: (Start)
G.f.: 32*x/((1-x)*(1-2*x)).
E.g.f.: 32*(exp(2*x) - exp(x)). (End)

A256994 a(n) = n + 1 when n <= 3, otherwise a(n) = 2^(n-2) + 3; also iterates of A005187 starting from a(1) = 2.

Original entry on oeis.org

2, 3, 4, 7, 11, 19, 35, 67, 131, 259, 515, 1027, 2051, 4099, 8195, 16387, 32771, 65539, 131075, 262147, 524291, 1048579, 2097155, 4194307, 8388611, 16777219, 33554435, 67108867, 134217731, 268435459, 536870915, 1073741827, 2147483651, 4294967299, 8589934595, 17179869187, 34359738371, 68719476739, 137438953475, 274877906947
Offset: 1

Views

Author

Antti Karttunen, Apr 15 2015

Keywords

Comments

Note that if we instead iterated function b(n) = 1+A005187(n), from b(1) onward, we would get the powers of two, A000079.

Crossrefs

Topmost row of A256995, leftmost column of A256997.

Programs

  • Mathematica
    Table[If[n<4,n+1,2^(n-2)+3],{n,40}] (* Harvey P. Dale, May 14 2019 *)
  • PARI
    A256994(n) = if(n < 4, n+1, 2^(n-2) + 3);
    
  • PARI
    \\ By iterating A005187:
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    i=1; k=2; print1(k); while(i <= 40, k = A005187(k); print1(", ", k); i++);
    
  • Scheme
    (define (A256994 n) (if (< n 4) (+ n 1) (+ (A000079 (- n 2)) 3)))
    
  • Scheme
    ;; The following uses memoization-macro definec:
    (definec (A256994 n) (if (= 1 n) 2 (A005187 (A256994 (- n 1)))))

Formula

If n < 4, a(n) = n + 1, otherwise a(n) = 2^(n-2) + 3 = A062709(n-2).
a(1) = 2; for n > 1, a(n) = A005187(a(n-1)).
Showing 1-10 of 31 results. Next