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 11-20 of 24 results. Next

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)

A056120 a(n) = (3^3)*4^(n-3) with a(0)=1, a(1)=1 and a(2)=7.

Original entry on oeis.org

1, 1, 7, 27, 108, 432, 1728, 6912, 27648, 110592, 442368, 1769472, 7077888, 28311552, 113246208, 452984832, 1811939328, 7247757312, 28991029248, 115964116992, 463856467968, 1855425871872
Offset: 0

Views

Author

Barry E. Williams, Jul 05 2000

Keywords

Comments

For n>=3, a(n) is equal to the number of functions f:{1,2,...,n}->{1,2,3,4} such that for fixed, different x_1, x_2, x_3 in {1,2,...,n} and fixed y_1, y_2, y_3 in {1,2,3,4} we have f(x_i)<>y_i, (i=1,2,...,n). - Milan Janjic, May 13 2007

Crossrefs

Cf. A055841.
First differences of A002063.

Programs

  • GAP
    Concatenation([1,1,7], List([3..25], n-> 27*4^(n-3) )); # G. C. Greubel, Jan 18 2020
  • Magma
    [1,1,7] cat [27*4^(n-3): n in [3..25]]; // G. C. Greubel, Jan 18 2020
    
  • Maple
    1,1,7, seq( 27*4^(n-3), n=3..25); # G. C. Greubel, Jan 18 2020
  • Mathematica
    Table[If[n<2, 1, If[n==2, 7, 27*4^(n-3)]], {n,0,25}] (* G. C. Greubel, Jan 18 2020 *)
  • PARI
    vector(26, n, if(n<2, 1, if(n==2, 7, 27*4^(n-3))) ) \\ G. C. Greubel, Jan 18 2020
    
  • Sage
    [1,1,7]+[27*4^(n-3) for n in (3..25)] # G. C. Greubel, Jan 18 2020
    

Formula

a(n) = 4*a(n-1) + (-1)^n*binomial(3, 3-n).
G.f.: (1-x)^3/(1-4*x).
E.g.f.: (37 - 44*x + 8*x^2 + 27*exp(4*x))/64. - G. C. Greubel, Jan 18 2020

Extensions

a(21) corrected by R. J. Mathar, Dec 03 2014

A084431 Expansion of g.f. (1 + 6*x + 5*x^2)/((1-2*x)*(1+2*x)).

Original entry on oeis.org

1, 6, 9, 24, 36, 96, 144, 384, 576, 1536, 2304, 6144, 9216, 24576, 36864, 98304, 147456, 393216, 589824, 1572864, 2359296, 6291456, 9437184, 25165824, 37748736, 100663296, 150994944, 402653184, 603979776, 1610612736, 2415919104
Offset: 0

Views

Author

Paul Barry, Jun 26 2003

Keywords

Comments

Binomial transform is A085287.

Crossrefs

Bisections are A002023 and A002063.
Cf. A085287.

Programs

  • Magma
    [(-10*0^n-3*(-2)^n+21*2^n)/8: n in [0..30]]; // Vincenzo Librandi, Nov 16 2011
  • Mathematica
    CoefficientList[Series[(1+6x+5x^2)/((1-2x)(1+2x)),{x,0,30}],x] (* or *) Join[{1},Flatten[NestList[4#&,{6,9},15]]] (* Harvey P. Dale, Nov 05 2011 *)

Formula

a(n) = (-10*0^n - 3*(-2)^n + 21*2^n)/8.
a(n) = 4*a(n-2), n > 1. - Harvey P. Dale, Nov 05 2011
E.g.f.: (9*cosh(2*x) + 12*sinh(2*x) - 5)/4. - Stefano Spezia, Sep 20 2023

A153465 a(n) = 9*4^n - 2.

Original entry on oeis.org

34, 142, 574, 2302, 9214, 36862, 147454, 589822, 2359294, 9437182, 37748734, 150994942, 603979774, 2415919102, 9663676414, 38654705662, 154618822654, 618475290622, 2473901162494, 9895604649982, 39582418599934, 158329674399742, 633318697598974, 2533274790395902
Offset: 1

Views

Author

Vincenzo Librandi, Dec 27 2008

Keywords

Crossrefs

Cf. A002063.

Programs

  • Magma
    I:=[34, 142]; [n le 2 select I[n] else 5*Self(n-1)-4*Self(n-2): n in [1..50]]; // Vincenzo Librandi, Feb 22 2012
  • Mathematica
    LinearRecurrence[{5, -4}, {34, 142}, 50] (* Vincenzo Librandi, Feb 22 2012 *)
    CoefficientList[Series[(34 - 28 x )/((1 - x) (1 - 4 x)), {x, 0, 30}], x] (* Vincenzo Librandi, May 03 2014 *)
  • PARI
    a(n)=9*4^n-2; \\ Charles R Greathouse IV, Jan 11 2012
    

Formula

a(n) = A002063(n) - 2. - R. J. Mathar, Jan 03 2009
a(n) = 5*a(n-1) - 4*a(n-2).
G.f.: x*(34-28*x)/((1-x)*(1-4*x)). - Vincenzo Librandi, May 03 2014
E.g.f.: 9*exp(4*x) - 2*exp(x) - 7. - Stefano Spezia, Sep 14 2024

A175880 a(1)=1, a(2)=2. If n >= 3: if n/2 is in the sequence, a(n)=0, otherwise a(n)=n.

Original entry on oeis.org

1, 2, 3, 0, 5, 0, 7, 8, 9, 0, 11, 12, 13, 0, 15, 0, 17, 0, 19, 20, 21, 0, 23, 0, 25, 0, 27, 28, 29, 0, 31, 32, 33, 0, 35, 36, 37, 0, 39, 0, 41, 0, 43, 44, 45, 0, 47, 48, 49, 0, 51, 52, 53, 0, 55, 0, 57, 0, 59, 60, 61, 0, 63, 0, 65, 0, 67, 68, 69, 0, 71, 0, 73, 0, 75, 76, 77, 0, 79, 80
Offset: 1

Views

Author

Adriano Caroli, Dec 05 2010

Keywords

Comments

If n > 0 and n is in the sequence, then a(2*n) = 0. Example: 5 is in the sequence, so a(2*5) = a(10) = 0.
Is this a(n) = n*A039982(n-1), n > 1? [R. J. Mathar, Dec 07 2010]

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a175880 n = a175880_list !! (n-1)
    a175880_list = 1 : f [2..] [2..] where
       f (x:xs) (y:ys) | x == y    = x : (f xs $ delete (2*x) ys)
                       | otherwise = 0 : (f xs (y:ys))
    for_bFile = take 10000 a175880_list
    -- Reinhard Zumkeller, Feb 09 2011
  • Maple
    A110654 := proc(n) 2*n+1-(-1)^n ; %/4 ;end proc:
    A175880 := proc(n) if n <=2 then n; else if type(n,'even') then n-2*procname(A110654(n)) ; else n; end if; end if; end proc:
    seq(A175880(n),n=1..40) ; # R. J. Mathar, Dec 07 2010

Formula

a(n) = n - (1 + (-1)^n) * a((2*n + 1 - (-1)^n)/4), n >= 3.
a(n) = n - A010673(n+1)*a(A110654(n)).

A204106 T(n,k)=Number of (n+1)X(k+1) 0..2 arrays with column and row pair sums b(i,j)=a(i,j)+a(i,j-1) and c(i,j)=a(i,j)+a(i-1,j) such that b(i,j)*b(i-1,j)-c(i,j)*c(i,j-1) is nonzero.

Original entry on oeis.org

36, 144, 144, 576, 864, 576, 2304, 5184, 5184, 2304, 9216, 31104, 46656, 31104, 9216, 36864, 186624, 419904, 419904, 186624, 36864, 147456, 1119744, 3779136, 5738688, 3779136, 1119744, 147456, 589824, 6718464, 34012224, 78428736, 78428736
Offset: 1

Views

Author

R. H. Hardin Jan 10 2012

Keywords

Comments

Also 0..2 arrays with no 2X2 subblock having equal diagonal elements or equal antidiagonal elements
Table starts
.....36......144........576.........2304...........9216............36864
....144......864.......5184........31104.........186624..........1119744
....576.....5184......46656.......419904........3779136.........34012224
...2304....31104.....419904......5738688.......78428736.......1073134656
...9216...186624....3779136.....78428736.....1631513664......34026967296
..36864..1119744...34012224...1073134656....34026967296....1084257353088
.147456..6718464..306110016..14683622976...710001723456...34589078037504
.589824.40310784.2754990144.200937920832.14819050600704.1104253773912576

Examples

			Some solutions for n=5 k=3
..0..1..0..1....1..2..0..1....0..1..2..1....2..2..0..1....2..2..2..1
..2..1..2..1....1..2..0..1....2..1..0..0....0..1..0..2....0..0..0..1
..0..0..0..1....1..2..0..2....2..1..2..1....2..1..0..1....2..2..2..2
..1..1..2..1....1..2..0..1....2..0..2..0....2..1..2..2....0..0..0..1
..0..0..2..0....1..2..0..1....1..0..2..0....0..0..0..0....2..2..2..2
..1..1..1..1....0..2..0..1....1..0..1..1....1..2..1..2....1..0..0..1
		

Crossrefs

Column 1 is A002063
Column 2 is A067411(n+2)
Column 3 is A055995(n+2)

Formula

Empirical for column k:
k=1: T(n,k)=4*T(n-1,k)
k=2: T(n,k)=6*T(n-1,k)
k=3: T(n,k)=9*T(n-1,k)
k=4: T(n,k)=15*T(n-1,k)-270*T(n-3,k)+324*T(n-4,k)
k=5: T(n,k)=25*T(n-1,k)-45*T(n-2,k)-963*T(n-3,k)+2025*T(n-4,k)+3645*T(n-5,k)-6561*T(n-6,k)
k=6: (order 15)
k=7: (order 45)

A365327 Triangle read by rows: T(n,k) is the number of spanning subgraphs of the n-cycle graph with domination number k.

Original entry on oeis.org

2, 3, 1, 4, 3, 1, 0, 11, 4, 1, 0, 11, 15, 5, 1, 0, 10, 26, 21, 6, 1, 0, 0, 43, 49, 28, 7, 1, 0, 0, 33, 98, 80, 36, 8, 1, 0, 0, 22, 126, 189, 120, 45, 9, 1, 0, 0, 0, 141, 322, 325, 170, 55, 10, 1, 0, 0, 0, 89, 462, 671, 517, 231, 66, 11, 1, 0, 0, 0, 46, 480, 1162, 1236, 777, 304, 78, 12, 1, 0, 0, 0, 0, 417, 1586, 2483, 2093, 1118, 390, 91, 13, 1
Offset: 1

Views

Author

Roman Hros, Sep 01 2023

Keywords

Comments

For n >= 3 the n-cycle graph is a simple graph. In the case of n=1 the graph is a loop and for n=2 a double edge.
The number of spanning subgraphs of the n-cycle graph is given by 2^n which is also the sum of the n-th row Sum_{k=1..n} T(n,k).
The average domination number is given by (Sum_{k=1..n} k*T(n,k))/2^n.
The relative average domination number is given by ((Sum_{k=1..n} k*T(n,k))/2^n)/n.

Examples

			Example of spanning subgraphs of cycle with 2 vertices:
Domination number: 2      1      1      1
                          /\            /\
                  .  .   .  .   .  .   .  .
                                 \/     \/
The triangle T(n,k) begins:
n\k 1   2   3    4    5     6     7    8    9  10  11  12 ...
1:  2
2:  3   1
3:  4   3   1
4:  0  11   4    1
5:  0  11  15    5    1
6:  0  10  26   21    6     1
7:  0   0  43   49   28     7     1
8:  0   0  33   98   80    36     8    1
9:  0   0  22  126  189   120    45    9    1
10: 0   0   0  141  322   325   170   55   10   1
11: 0   0   0   89  462   671   517  231   66  11   1
12: 0   0   0   46  480  1162  1236  777  304  78  12   1
		

Crossrefs

Row sums are A000079.
Column sums are A002063(k-1).
Cf. A373436.

Formula

T(n,n) = 1 for n > 1.
T(n,n-1) = T(n-1, n-2) + 1 for n > 3.
T(n,n-2) = T(n-1, n-3) + T(n, n-1) for n > 5.
T(n,n-3) = T(n-1, n-4) + T(n, n-2) - 5 for n > 6.
T(n,n-4) = T(n-1, n-5) + T(n-1, n-4) + 11 + Sum_{i=1..n-9} (i+4) for n > 8.
G.f.:
For n > 3; G(n) = x*(G(n-1) + G(n-2) + 2*G(n-3)) + g(n); where
2*(1-x)*x^(n/3) for n mod 3 = 0.
g(n) = { 0 for n mod 3 = 1.
(1-x)*x^((n+1)/3) for n mod 3 = 2.
For n mod 3 = 0:
T(n,k) = 2*T(n-3,k-1) + T(n-2,k-1) + T(n-1,k-1) + 2 for k = n/3.
T(n,k) = 2*T(n-3,k-1) + T(n-2,k-1) + T(n-1,k-1) - 2 for k = n/3 + 1.
T(n,k) = 2*T(n-3,k-1) + T(n-2,k-1) + T(n-1,k-1) for k >= n/3 + 2.
For n mod 3 = 1:
T(n,k) = 2*T(n-3,k-1) + T(n-2,k-1) + T(n-1,k-1) for k >= (n+2)/3.
For n mod 3 = 2:
T(n,k) = 2*T(n-3,k-1) + T(n-2,k-1) + T(n-1,k-1) + 1 for k = (n+1)/3.
T(n,k) = 2*T(n-3,k-1) + T(n-2,k-1) + T(n-1,k-1) - 1 for k = (n+1)/3 + 1.
T(n,k) = 2*T(n-3,k-1) + T(n-2,k-1) + T(n-1,k-1) for k >= (n+1)/3 + 2.

A159018 a(0)=5; a(n) = a(n-1) + floor(sqrt(a(n-1))), n > 0.

Original entry on oeis.org

5, 7, 9, 12, 15, 18, 22, 26, 31, 36, 42, 48, 54, 61, 68, 76, 84, 93, 102, 112, 122, 133, 144, 156, 168, 180, 193, 206, 220, 234, 249, 264, 280, 296, 313, 330, 348, 366, 385, 404, 424, 444, 465, 486, 508, 530, 553, 576, 600, 624, 648, 673, 698, 724, 750, 777, 804, 832, 860, 889, 918, 948, 978
Offset: 0

Views

Author

Philippe Deléham, Apr 02 2009

Keywords

Comments

Row 1 in square array A159016.
This sequence contains an infinity of squares. - Philippe Deléham, Apr 04 2009
Intersection of the sequence with A000290 generates A002063. - Vincenzo Librandi, Apr 10 2009, clarified by R. J. Mathar, Dec 03 2010

Crossrefs

Cf. A028392.

Programs

  • Maple
    A:= Array(0..100):
    A[0]:= 5:
    for n from 1 to 100 do A[n]:= A[n-1]+floor(sqrt(A[n-1])) od:
    convert(A,list); # Robert Israel, Nov 26 2020

A164032 Number of "ON" cells in a certain 2-dimensional cellular automaton.

Original entry on oeis.org

1, 9, 4, 36, 4, 36, 16, 144, 4, 36, 16, 144, 16, 144, 64, 576, 4, 36, 16, 144, 16, 144, 64, 576, 16, 144, 64, 576, 64, 576, 256, 2304, 4, 36, 16, 144, 16, 144, 64, 576, 16, 144, 64, 576, 64, 576, 256, 2304, 16, 144, 64, 576, 64, 576, 256, 2304, 64, 576, 256, 2304, 256
Offset: 1

Views

Author

John W. Layman, Aug 08 2009

Keywords

Comments

This automaton starts with one ON cell and evolves according to the rule that a cell is ON in a given generation if and only if the number of ON cells, among the cell itself and its eight nearest neighbors, was exactly one in the preceding generation.

Examples

			Can be arranged into blocks of length 2^k:
1,
9,
4, 36,
4, 36, 16, 144,
4, 36, 16, 144, 16, 144, 64, 576,
4, 36, 16, 144, 16, 144, 64, 576, 16, 144, 64, 576, 64, 576, 256, 2304,
4, 36, 16, 144, 16, 144, 64, 576, 16, 144, 64, 576, 64, 576, 256, 2304, 16, 144, 64, 576, 64, 576, 256, 2304, 64, 576, 256, 2304, 256, ...
...
		

Crossrefs

Cf. A000120, A048883, A079315, A122108, A160239, A002063 (last entry in each block)

Programs

  • Mathematica
    wt[i_] := DigitCount[i, 2, 1];
    a[n_] := If[OddQ[n], 1, 9] 4^wt[Floor[(n-1)/2]];
    Array[a, 61] (* Jean-François Alcover, Oct 08 2018, after N. J. A. Sloane *)
  • PARI
    a(n) = 4^hammingweight((n-1)\2) * if(n%2, 1, 9); \\ Michel Marcus, Oct 08 2018

Formula

It appears that this is the self-generating sequence defined by the following process: start with s={1,9} and repeatedly extend by concatenating s with 4*s, thus obtaining {1,9} -> {1,9,4,36} -> {1,9,4,36,4,36,16,144},... , etc.
Also, it appears that if n=2^k+j, with n>2 and 1<=j<=2^k, then a(n)=4a(j), with a(1)=1, a(2)=9.
From N. J. A. Sloane, Jul 21 2014: (Start)
Both of these assertions are not difficult to prove. At generation G = 2^k (k>=1) the ON cells are bounded by a box of edge 2G-1, and in that box there are (G/2)^2 3X3 blocks each containing 9 ON cells (separated by rows of OFF cells of width 1), so a total of a(2^k) = 9*2^(2k-2) ON cells (cf. A002063).
This box is full (more precisely, every cell in it has more than one ON neighbor), and at generation G+1 we have just 4 ON cells which are now at the corners of a box of edge 2G+1. Until the next power of 2 there is no interaction between the configurations that grow at the four corners, and so a(2^k+j) = 4a(j), as conjectured.
In fact this implies an explicit formula for a(n):
a(n) = c*4^wt(floor((n-1)/2)),
where c=1 if n is odd, c=9 if n is even, and wt(i) = A000120(i) is the binary weight function. For example, if n=20, [(n-1)/2]=9 which has weight 2, so a(20) = 9*4^2 = 144. (End)

A164093 a(n) = 9*4^n + 2.

Original entry on oeis.org

38, 146, 578, 2306, 9218, 36866, 147458, 589826, 2359298, 9437186, 37748738, 150994946, 603979778, 2415919106, 9663676418, 38654705666, 154618822658, 618475290626, 2473901162498, 9895604649986, 39582418599938, 158329674399746, 633318697598978, 2533274790395906
Offset: 1

Views

Author

Vincenzo Librandi, Aug 10 2009

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,-4},{38,146},50] (* Vincenzo Librandi, Mar 06 2012 *)

Formula

a(n) = A002063(n) + 2.
a(n) = 5*a(n-1) - 4*a(n-2).
G.f.: 2*x*(19-22*x)/((4*x-1)*(x-1)).
E.g.f.: exp(x)*(9*exp(3*x) + 2) - 11. - Elmo R. Oliveira, Mar 08 2025

Extensions

Edited by R. J. Mathar, Aug 21 2009
Previous Showing 11-20 of 24 results. Next