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-3 of 3 results.

A270369 Expansion of g.f. (1-7*x)/(1-9*x).

Original entry on oeis.org

1, 2, 18, 162, 1458, 13122, 118098, 1062882, 9565938, 86093442, 774840978, 6973568802, 62762119218, 564859072962, 5083731656658, 45753584909922, 411782264189298, 3706040377703682, 33354363399333138, 300189270593998242, 2701703435345984178, 24315330918113857602, 218837978263024718418
Offset: 0

Views

Author

Colin Barker, Mar 18 2016

Keywords

Crossrefs

Cf. A001019 (powers of 9), A054879 (partial sums), A132025.
Cf. similar sequences with g.f. (1-k*x)/(1-9*x) and k=0..8: A001019 (k=0; k=8 gives two initial 1's ), A055275 (k=1), A270472 (k=2), A092810 (k=3), A067403 (k=4), A270473 (k=5), A102518 (k=6), this sequence (k=7).

Programs

  • Mathematica
    CoefficientList[Series[(1-7x)/(1-9x),{x,0,20}],x] (* or *) Join[ {1}, NestList[9#&,2,20]] (* Harvey P. Dale, Oct 15 2017 *)
  • PARI
    Vec((1-7*x)/(1-9*x) + O(x^30))

Formula

G.f.: (1-7*x)/(1-9*x).
a(n) = 9*a(n-1) for n>1.
a(n) = 2*9^(n-1) for n>0.
From Amiram Eldar, May 08 2023: (Start)
Sum_{n>=0} 1/a(n) = 25/16.
Sum_{n>=0} (-1)^n/a(n) = 11/20.
Product_{n>=1} (1 - 1/a(n)) = A132025. (End)
E.g.f.: (2*exp(9*x) + 7)/9. - Elmo R. Oliveira, Mar 25 2025

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)

A356879 Numbers k such that the sum k^x + k^y can be a square with {x, y} >= 0.

Original entry on oeis.org

0, 2, 3, 8, 15, 18, 24, 32, 35, 48, 50, 63, 72, 80, 98, 99, 120, 128, 143, 162, 168, 195, 200, 224, 242, 255, 288, 323, 338, 360, 392, 399, 440, 450, 483, 512, 528, 575, 578, 624, 648, 675, 722, 728, 783, 800, 840, 882, 899, 960, 968, 1023, 1058, 1088, 1152, 1155, 1224
Offset: 0

Views

Author

Karl-Heinz Hofmann, Sep 12 2022

Keywords

Comments

Characteristics of the terms:
- Any x combined with any y is a solution.
This special case is valid only for k = 0 (exception: x = y = 0).
- Any x is possible and if x is odd: y = x. If x is even: y = x + 3.
This special case is valid only for k = 2 (see A356880).
- Only even x combined with y = x + 1 gives a solution.
Those terms are the terms of A132411.
- Only odd x combined with y = x gives a solution.
Those terms are the terms of A001105.
- Any x is possible and if x is odd: y = x. If x is even: y = x + 1.
Those terms are the terms of A132592.

Examples

			Squares that can be produced with k = 8: 8^0 + 8^1 = 9; 8^1 + 8^1 = 16; 8^2 + 8^3 = 576; 8^3 + 8^3 = 1024; 8^4 + 8^5 = 36864; 8^5 + 8^5 = 65536; 8^6 + 8^7 = 2359296, ....
		

Crossrefs

Cf. A132411 is a subsequence (except A132411(1)), A001105 is a subsequence.
Cf. A132592 is a subsequence.
Cf. A356880 (k = 2), A270473 (k = 3).

Programs

  • Mathematica
    Select[Range[0, 1225], IntegerQ[Sqrt[# + 1]] || IntegerQ[Sqrt[#/2]] &] (* Amiram Eldar, Sep 18 2022 *)
  • Python
    from gmpy2 import is_square
    print([n for n in range(0,1225) if is_square(n+1) or (n % 2 == 0 and is_square(n//2))])
Showing 1-3 of 3 results.