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.

Previous Showing 81-90 of 110 results. Next

A163978 a(n) = 2*a(n-2) for n > 2; a(1) = 3, a(2) = 4.

Original entry on oeis.org

3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 32768, 49152, 65536, 98304, 131072, 196608, 262144, 393216, 524288, 786432, 1048576, 1572864, 2097152, 3145728
Offset: 1

Views

Author

Klaus Brockhaus, Aug 07 2009

Keywords

Comments

Interleaving of A007283 and A000079 without initial terms 1 and 2.
Equals A029744 without first two terms. Agrees with A145751 for all terms listed there (up to 65536).
Binomial transform is A078057 without initial 1, second binomial transform is A048580, third binomial transform is A163606, fourth binomial transform is A163604, fifth binomial transform is A163605.
a(n) is the number of vertices of the (n-1)-iterated line digraph L^{n-1}(G) of the digraph G(=L^0(G)) with vertices u,v,w and arcs u->v, v->u, v->w, w->v. - Miquel A. Fiol, Jun 08 2024

Crossrefs

Programs

  • Magma
    [ n le 2 select n+2 else 2*Self(n-2): n in [1..41] ];
    
  • Mathematica
    LinearRecurrence[{0,2}, {3,4}, 52] (* or *) Table[(1/2)*(5-(-1)^n )*2^((2*n-1+(-1)^n)/4), {n,50}] (* G. C. Greubel, Aug 24 2017 *)
  • PARI
    my(x='x+O('x^50)); Vec(x*(3+4*x)/(1-2*x^2)) \\ G. C. Greubel, Aug 24 2017
    
  • SageMath
    [(2+(n%2))*2^((n-(n%2))//2) for n in range(1,41)] # G. C. Greubel, Jun 13 2024

Formula

a(n) = A027383(n-1) + 2.
a(n) = A052955(n) + 1 for n >= 1.
a(n) = (1/2)*(5 - (-1)^n)*2^((2*n - 1 + (-1)^n)/4).
G.f.: x*(3+4*x)/(1-2*x^2).
a(n) = A090989(n-1).
E.g.f.: (1/2)*(4*cosh(sqrt(2)*x) + 3*sqrt(2)*sinh(sqrt(2)*x) - 4). - G. C. Greubel, Aug 24 2017
a(n) = A063759(n), n >= 1. - R. J. Mathar, Jan 25 2023

A166278 Square array A(n,k), n,k>=0, read by antidiagonals: A(n,k) is the total element sum of the k-fold f transform applied to the length n sequence of 1's. And f returns a sorted result after multiplying the elements in its input sequence with 1, 2, 3,... in descending size order.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 3, 3, 0, 1, 4, 6, 4, 0, 1, 6, 10, 10, 5, 0, 1, 8, 19, 20, 15, 6, 0, 1, 12, 33, 46, 35, 21, 7, 0, 1, 16, 63, 100, 94, 56, 28, 8, 0, 1, 24, 111, 220, 242, 172, 84, 36, 9, 0, 1, 32, 201, 488, 633, 514, 290, 120, 45, 10, 0, 1, 48, 369, 1104, 1643, 1518, 984, 460, 165, 55, 11
Offset: 0

Views

Author

Alois P. Heinz, Oct 10 2009

Keywords

Examples

			A(3,4) = 33, because f([1,1,1]) = [1,2,3], (f^2)([1,1,1]) = [3,3,4], (f^3)([1,1,1]) = [4,6,9], (f^4)([1,1,1]) = [9,12,12], and 9+12+12 = 33.
Square array A(n,k) begins:
  0,  0,  0,  0,   0,   0, ...
  1,  1,  1,  1,   1,   1, ...
  2,  3,  4,  6,   8,  12, ...
  3,  6, 10, 19,  33,  63, ...
  4, 10, 20, 46, 100, 220, ...
  5, 15, 35, 94, 242, 633, ...
		

Crossrefs

Columns k=0-3 give: A001477, A000217, A000292, A070893.
Rows n=0-2 give: A000004, A000012, A029744(k+2).
Main diagonal gives A261490.

Programs

  • Maple
    f:= l-> sort([seq(sort(l, `>`)[i]*i, i=1..nops(l))]):
    A:= (n, k)-> add(i, i=(f@@k)([1$n])):
    seq(seq(A(n, d-n), n=0..d), d=0..15);
  • Mathematica
    f[L_List] := f[L] = Sort[Reverse[Sort[L]]*Range[Length[L]]];
    A[0, ] = 0; A[n, 0] := n; A[n_, k_] := Total[Nest[f, Range[n], k-1]];
    Table[A[n, k-n], {k, 0, 15}, {n, 0, k}] // Flatten (* Jean-François Alcover, Jun 07 2016 *)

A185333 Number of binary necklaces of n beads for which a cut exists producing a palindrome.

Original entry on oeis.org

2, 2, 4, 3, 8, 6, 16, 9, 32, 20, 64, 34, 128, 72, 256, 129, 512, 272, 1024, 516, 2048, 1056, 4096, 2050, 8192, 4160, 16384, 8200, 32768, 16512, 65536, 32769, 131072, 65792, 262144, 131088, 524288, 262656, 1048576, 524292, 2097152
Offset: 1

Views

Author

Tony Bartoletti, Feb 20 2011

Keywords

Comments

For odd n, this corresponds to A029744, necklaces of n beads that are the same when turned over. For even n, consider the necklace "01", which satisfies A029744 but cannot be cut to produce a palindrome.

Crossrefs

Cf. A185376, A025480. - Hugo Pfoertner, Jul 30 2011

Programs

  • Mathematica
    f[n_] := If[OddQ@ n, 2^(n/2 + 1/2), Block[{k = IntegerExponent[n, 2] - 1}, 2^(n/2 - 1) + 2^((n/2 - 2^k)/(2^(k + 1)))]]; Array[f, 41] (* Robert G. Wilson v, Aug 08 2011 *)
  • Python
    def a(n):
        if n%2: return 2**((n + 1)//2)
        k=bin(n - 1)[2:].count('1') - bin(n)[2:].count('1')
        return 2**(n//2 - 1) + 2**((n//2 - 2**k)//(2**(k + 1)))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 29 2017

A339893 a(n) = A000523(n) - A001222(n); floor(log_2(n)) minus the number of prime divisors of n, counted with multiplicity.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 2, 1, 1, 0, 3, 1, 3, 1, 2, 2, 3, 0, 2, 2, 1, 1, 3, 1, 3, 0, 3, 3, 3, 1, 4, 3, 3, 1, 4, 2, 4, 2, 2, 3, 4, 0, 3, 2, 3, 2, 4, 1, 3, 1, 3, 3, 4, 1, 4, 3, 2, 0, 4, 3, 5, 3, 4, 3, 5, 1, 5, 4, 3, 3, 4, 3, 5, 1, 2, 4, 5, 2, 4, 4, 4, 2, 5, 2, 4, 3, 4, 4, 4, 0, 5, 3, 3, 2, 5, 3, 5, 2, 3
Offset: 1

Views

Author

Antti Karttunen, Dec 21 2020

Keywords

Crossrefs

Cf. A000523, A001222, A029744 (positions of 0's), A339895.
Cf. also A339823, A342657 [= a(A156552(n))].

Programs

  • PARI
    A339893(n) = (#binary(n) - 1 - bigomega(n));

Formula

a(n) = A000523(n) - A001222(n).
a(n) = A339895(A122111(n)).

A356880 Squares that can be expressed as the sum of two powers of two (2^x + 2^y).

Original entry on oeis.org

4, 9, 16, 36, 64, 144, 256, 576, 1024, 2304, 4096, 9216, 16384, 36864, 65536, 147456, 262144, 589824, 1048576, 2359296, 4194304, 9437184, 16777216, 37748736, 67108864, 150994944, 268435456, 603979776, 1073741824, 2415919104, 4294967296, 9663676416, 17179869184
Offset: 1

Views

Author

Karl-Heinz Hofmann, Sep 02 2022

Keywords

Comments

If x is even, y = x + 3; if x is odd, y = x.
Proof for odd x: (2^odd + 2^odd) = 2^(odd + 1) = 2^even --> must be a square.
Proof for even x: 2^even + 2^(even + 3) = 1*(2^even) + (2^even * 2^3) = 1*(2^even) + (2^even * 8) = 1*(2^even) + 8*(2^even) = 9*(2^even); since 9 is a square and 2^even is a square, the multiplication result must be a square too.
And 9 is the only square that can be written as 1 + a power of 2.
Note that a(n) = A272711(n+1) for n=1..23, but beyond it differs more and more.

Examples

			2^4 + 2^7 = 144, a square, thus 144 is a term.
		

Crossrefs

Intersection of A000290 and A048645\{1}.
Cf. A272711, A270473 (squares that can be expressed as 3^x + 3^y).
Cf. A220221.

Programs

  • Maple
    seq(`if`(n::even, 9*2^(n-2), 2^(n+1)),n=1..50); # Robert Israel, Sep 15 2022
  • Mathematica
    Select[Range[2, 2^17]^2, DigitCount[#, 2, 1] <= 2 &] (* Amiram Eldar, Sep 03 2022 *)
  • PARI
    a(n) = if (n%2, 2^(n+1), 9*2^(n-2)); \\ Michel Marcus, Sep 15 2022
  • Python
    def A356880(n):
        if n % 2 == 0: return 9*2**(n-2)
        else: return 2**(n+1)
    

Formula

a(n) = A029744(n+1)^2.
a(n) = 9 * 2^(n-2) if n is even (see A002063).
a(n) = 2^(n+1) if n is odd (see A000302).
From Stefano Spezia, Sep 09 2022: (Start)
G.f.: x*(4 + 9*x)/(1 - 4*x^2).
E.g.f.: (9*(cosh(2*x) - 1) + 8*sinh(2*x))/4. (End)

A364956 Numbers k such that A163511(k) is either k itself or its descendant in Doudna-tree, A005940 (or equally, in A163511-tree).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 32768, 49152, 65536, 98304, 131072, 196608, 262144, 341887, 393216, 524288, 683774, 786432, 1048576, 1572864, 2097152, 2495625, 3145728, 4194304, 4991250, 6291456
Offset: 1

Views

Author

Antti Karttunen, Sep 02 2023

Keywords

Comments

Numbers k such that A252464(k) = A364954(k), where A364954(n) is the length of the common prefix in the binary expansions of A156552(n) and A156552(A163511(n)).

Examples

			For n = 341887, A156552(n) = 1736, "11011001000" in binary, and A163511(n) = 1830711541, with A156552(A163511(n)) = 444544, "1101100100010000000" in binary, and as the former binary expansion is a prefix of the latter, 341887 is included in this sequence. In this case, 1830711541 = A003961^7(2*341887), where A003961^7 indicates a prime shift by seven steps towards larger primes.
For n = 683774 = 2*341887, A156552(n) = 3473 = "110110010001", and A163511(n) = 3661423082 = 2*1830711541, with A156552(A163511(n)) = 889089, "11011001000100000001", and as the former binary expansion is a prefix of the latter, 683774 is included in this sequence.
For n = 1367548 = 4*341887, A156552(n) = 6947, "1101100100011" in binary, and A163511(n) = 7322846164 = 2*3661423082 with A156552(A163511(n)) = 1778179, "110110010001000000011" in binary, as the former binary expansion is NOT a prefix of the latter, 1367548 is NOT included in this sequence.
		

Crossrefs

Positions of 0's in A364955.
Cf. A029744 (subsequence).
Cf. also A364960.

A377000 Array read by ascending antidiagonals: T(n,k) = number of n-esthetic numbers with k digits.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 5, 4, 1, 5, 7, 8, 6, 1, 6, 9, 12, 13, 8, 1, 7, 11, 16, 21, 21, 12, 1, 8, 13, 20, 29, 36, 34, 16, 1, 9, 15, 24, 37, 52, 63, 55, 24, 1, 10, 17, 28, 45, 68, 94, 108, 89, 32, 1, 11, 19, 32, 53, 84, 126, 169, 189, 144, 48, 1, 12, 21, 36, 61, 100, 158, 232, 305, 324, 233, 64, 1
Offset: 2

Views

Author

Paolo Xausa, Oct 12 2024

Keywords

Comments

A number is n-esthetic if, when written in base n, adjacent digits differ by 1: see De Koninck and Doyon (2009), where T(n,k) is denoted by N_q(r).

Examples

			Array begins (cf. De Koninck and Doyon (2009), table on p. 155):
  n\k| 1   2   3   4    5    6    7    8     9    10  ...
  -------------------------------------------------------
   2 | 1,  1,  1,  1,   1,   1,   1,   1,    1,    1, ... = A000012
   3 | 2,  3,  4,  6,   8,  12,  16,  24,   32,   48, ... = A029744 (from n = 2)
   4 | 3,  5,  8, 13,  21,  34,  55,  89,  144,  233, ... = A000045 (from n = 4)
   5 | 4,  7, 12, 21,  36,  63, 108, 189,  324,  567, ... = A228879
   6 | 5,  9, 16, 29,  52,  94, 169, 305,  549,  990, ...
   7 | 6, 11, 20, 37,  68, 126, 232, 430,  792, 1468, ...
   8 | 7, 13, 24, 45,  84, 158, 296, 557, 1045, 1966, ...
   9 | 8, 15, 28, 53, 100, 190, 360, 685, 1300, 2475, ...
  10 | 9, 17, 32, 61, 116, 222, 424, 813, 1556, 2986, ... = A090994
  ...                                               \______ A152086 (main diagonal)
		

Crossrefs

Cf. A000012 (row n = 2), A029744 (row n = 3), A000045 (row n = 4), A228879 (row n = 5), A090994 (row n = 10).
Cf. A102699, A152086 (main diagonal).
Diagonal above the main diagonal appears to be A206603.

Programs

  • Mathematica
    A377000[n_, k_] := Round[2^k/(n+1)*Sum[If[m != (n+1)/2, Cos[#]^k*(Cot[#] + Csc[#])^2 & [Pi*m/(n+1)], 0], {m, 1, n, 2}]];
    Table[A377000[n-k+1, k], {n, 2, 15}, {k, n-1}]
  • Python
    from itertools import count, islice
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A377000_N(q,r,i):
        if r==1 and i==0: return 0
        if r==1: return 1
        if q==2: return r+i&1^1
        if i == 0: return A377000_N(q,r-1,1)
        if i == q-1: return A377000_N(q,r-1,q-2)
        return A377000_N(q,r-1,i-1)+A377000_N(q,r-1,i+1)
    def A377000_T(n,k): return sum(A377000_N(n,k,i) for i in range(n))
    def A377000_gen(): # generator of terms
        for n in count(2):
            for k in range(1,n):
                yield A377000_T(n-k+1,k)
    A377000_list = list(islice(A377000_gen(),100)) # Chai Wah Wu, Oct 21 2024

Formula

All of the following formulas are taken from De Koninck and Doyon (2009).
T(n,k) = 2^k/(n+1) * Sum_{m=1..n, m odd, m != (n+1)/2} cos(p)^k*(cot(p) + csc(p))^2, where p = Pi*m/(n+1).
T(n,1) = n - 1.
T(2,k) = 1.
T(3,k) = 2^((k+1)/2) if k is odd, 3*2^((k-2)/2) if k is even = A029744(k+1).
T(4,k) = A000045(k+3).
T(5,k) = 4*3^((k-1)/2) if k is odd, 7*3^((k-2)/2) if k is even = A228879(k-1).
Conjectures from Chai Wah Wu, Oct 21 2024: (Start)
Conjecture 1: For even n, T(n,k) is the number of meaningful differential operations of the k-th order on the space R^(n-1).
Conjecture 2: For each n, the row T(n,k) satisfies a linear recurrence. For example:
T(6,k) = T(6,k-1) + 2*T(6,k-2) - T(6,k-3) for k > 3 (A090990).
T(7,k) = 4*T(7,k-2) - 2*T(7,k-4) for k > 4.
T(8,k) = T(8,k-1) + 3*T(8,k-2) - 2*T(8,k-3) - T(8,k-4) for k > 4 (A090992).
T(9,k) = 5*T(9,k-2) - 5*T(9,k-4) for k > 4.
T(10,k) = T(10,k-1) + 4*T(10,k-2) - 3*T(10,k-3) - 3*T(10,k-4) + T(10,k-5) for k > 5.
T(11,k) = 6*T(11,k-2) - 9*T(11,k-4) + 2*T(11,k-6) for k > 6.
T(12,k) = T(12,k-1) + 5*T(12,k-2) - 4*T(12,k-3) - 6*T(12,k-4) + 3*T(12,k-5) + T(12,k-6) for k > 6 (A129638).
...
Note that for even n, Conjecture 1 implies Conjecture 2 due to (Malesevic, 1998).
Conjecture 3: T(n,n-2) = A182555(n-2). (End)

A258209 Numbers k for which A256999(A059893(k)) = k.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 12, 14, 15, 16, 24, 26, 28, 30, 31, 32, 48, 52, 56, 58, 60, 62, 63, 64, 96, 100, 104, 106, 112, 118, 120, 122, 124, 126, 127, 128, 192, 200, 208, 212, 224, 228, 234, 236, 240, 246, 248, 250, 252, 254, 255, 256, 384, 392, 400, 416, 420, 424, 426, 448, 460, 466, 472, 474, 480, 484, 490, 494, 496, 502, 504, 506, 508, 510, 511, 512
Offset: 0

Views

Author

Antti Karttunen, May 31 2015

Keywords

Comments

Indexing starts from zero, because a(0) = 0 is a special case.
These numbers correspond to the maximal (lexicographically largest) representatives selected from each equivalence class of those binary necklaces that stay the same (in the same equivalence class) when flipped over (which thus have a bilateral symmetry, please see the examples). A029744(n) gives the number of terms with n significant bits in their binary representation.

Examples

			28 ("11100" in binary) is in sequence, because after removing the most significant bit, the binary string "1100" when reversed, "0011", can then be rotated (two steps in either direction) to give "1100" again and "1100" is the lexicographically largest of these rotations.
114 ("1110010" in binary) is NOT in the sequence, because after removing the most significant bit, the binary string "110010" when reversed, "010011", does not yield "110010" no matter how many steps it is rotated (even though it is the lexicographically largest rotation of its class). Thus although 114 is in A257250 (a supersequence of this sequence), it is not included here.
		

Crossrefs

Subsequence of A257250.
Differs from A257250 for the first time at n=31, where a(31) = 118, while A257250(31) = 114.

A265887 T(n,k)=Number of nXk 0..2 arrays with the sum of the absolute differences of each element with its horizontal and vertical neighbors equal to the number of neighbors.

Original entry on oeis.org

3, 4, 4, 6, 12, 6, 8, 16, 16, 8, 12, 32, 68, 32, 12, 16, 64, 128, 128, 64, 16, 24, 128, 384, 664, 384, 128, 24, 32, 256, 1024, 2048, 2048, 1024, 256, 32, 48, 512, 3072, 8192, 13672, 8192, 3072, 512, 48, 64, 1024, 8192, 32768, 65536, 65536, 32768, 8192, 1024, 64, 96
Offset: 1

Views

Author

R. H. Hardin, Dec 17 2015

Keywords

Comments

Table starts
..3....4.....6.......8.......12.........16..........24............32
..4...12....16......32.......64........128.........256...........512
..6...16....68.....128......384.......1024........3072..........8192
..8...32...128.....664.....2048.......8192.......32768........131072
.12...64...384....2048....13672......65536......393216.......2097152
.16..128..1024....8192....65536.....560512.....4194304......33554432
.24..256..3072...32768...393216....4194304....51483264.....536870912
.32..512..8192..131072..2097152...33554432...536870912....8726974464
.48.1024.24576..524288.12582912..268435456..6442450944..137438953472
.64.2048.65536.2097152.67108864.2147483648.68719476736.2199023255552

Examples

			Some solutions for n=4 k=4
..2..1..2..1....0..0..1..0....1..2..1..0....1..2..1..2....2..1..2..1
..1..2..1..2....2..2..2..1....0..1..2..1....0..1..0..1....1..2..1..0
..2..1..2..1....1..0..0..2....1..2..1..2....1..2..1..0....0..1..2..1
..1..2..1..0....2..1..0..2....0..1..0..1....2..1..2..1....1..2..1..0
		

Crossrefs

Column 1 is A029744(n+2).

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-2)
k=2: a(n) = 2*a(n-1) for n>3
k=3: a(n) = 8*a(n-2) for n>5
k=4: a(n) = 4*a(n-1) for n>5
k=5: a(n) = 32*a(n-2) for n>7
k=6: a(n) = 8*a(n-1) for n>7
k=7: a(n) = 128*a(n-2) for n>9

A272711 Square numbers whose binary reversal is also square.

Original entry on oeis.org

1, 4, 9, 16, 36, 64, 144, 256, 576, 1024, 2304, 4096, 9216, 16384, 36864, 65536, 147456, 262144, 589824, 1048576, 2359296, 4194304, 9437184, 16777216, 20457529, 37748736, 67108864, 81830116, 143784081, 150994944, 268435456, 327320464, 331130809, 575136324, 603979776
Offset: 1

Views

Author

Benjamin Przybocki, May 04 2016

Keywords

Comments

The first term in this sequence whose binary reversal is not 1 or 9 is 20457529 (which is a binary palindrome).
The previous comment means that the sequence does not just contain the squares of numbers in A029744. - R. J. Mathar, May 06 2016
If k is a term, then so is 4*k. - Robert Israel, Jun 06 2023

Crossrefs

Cf. A061457 (analogous in base 10).

Programs

  • Maple
    rev:= proc(n) local L,i;
      L:= convert(n,base,2);
      add(L[-i]*2^(i-1),i=1..nops(L))
    end proc:
    select(n -> issqr(rev(n)), [seq(i^2,i=1..100000)]); # Robert Israel, Jun 06 2023
  • Mathematica
    Select[Range[10^5]^2, IntegerQ@ Sqrt@ FromDigits[ Reverse@ IntegerDigits[#, 2], 2] &] (* Giovanni Resta, May 05 2016 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (issquare(subst(Polrev(binary(n^2)), x, 2)), print1(n^2, ", ")););} \\ Michel Marcus, May 05 2016
Previous Showing 81-90 of 110 results. Next