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 21-27 of 27 results.

A334908 Area/6 of primitive Pythagorean triangles generated by {{2, 0}, {1, -1}}^n * {{2}, {1}}, for n >= 0.

Original entry on oeis.org

1, 10, 220, 3080, 52976, 818720, 13333440, 211474560, 3398520576, 54257082880, 869067996160, 13897453373440, 222420341682176, 3558236809994240, 56935698394234880, 910939899548958720, 14575288593717067776, 233202615903456460800
Offset: 0

Views

Author

Ralf Steiner, May 16 2020

Keywords

Comments

Matrix {{2, 0}, {1, -1}} is [g_{-2}] given by Firstov in eq. (24).
These primitive Pythagorean triples are also given by Lee Price as (M_2)^n (3,4,5)^T (T for transposed), with M_2 = {{2, 1, 1}, {2, -2, 2}, {2, -1, 3}}.
For a primitive Pythagorean triangle (x, y, z) = (u^2-v^2, 2*u*v, u^2+v^2) the area is A = x*y/2 = u*v*(u^2 - v^2) = z*h/2 with altitude h, and h is an irreducible fraction. Here:
x(n) = A084175(n+2).
y(n) = 4*(A084175(n+1) - A084175(n)) = A054881(n+2).
= 2*A192382(n+1) = 4*A003683(n+1).
z(n) = A084175(n+2) + 2*A084175(n+1) - 4*A084175(n).
= A108924(n+2)/2 = A084175(n+2) + 2*A139818(n+1).
= A000302(n+1) + A139818(n+1).
u(n) = A000079(n+1) = 2^(n+1).
v(n) = A001045(n+1) = (2^(n+1) + (-1)^n)/3.
For the area A(n): Limit_{n -> oo} (3^3/(2^(4*n+7)))*A(n) = 1. See the formula section. - Wolfdieter Lang, Jun 14 2020

Examples

			a(0) = 3*4/12 = 1 for the triangle (3, 4, 5).
		

Crossrefs

Programs

  • Magma
    [(2^(2*n+1)*(2^(2*n+5) -3) +(-2)^n*(3*2^(2*n+3) -1))/81: n in [0..40]]; // G. C. Greubel, Feb 18 2023
    
  • Mathematica
    Table[(2^(2*n+1)*(2^(2*n+5) -3) + (-2)^n*(3*2^(2*n+3) -1))/3^4, {n,0,40}]
  • SageMath
    [(2^(2*n+1)*(2^(2*n+5) -3) +(-2)^n*(3*2^(2*n+3) -1))/81 for n in range(41)] # G. C. Greubel, Feb 18 2023

Formula

a(n) = ( 2^(4*n+6) - 3*2^(2*n+1) - 3*(-2)^(3*n+3) - (-2)^n )/3^4.
G.f.: 1 / ((1 + 2*x)*(1 - 4*x)*(1 + 8*x)*(1 - 16*x)). - Colin Barker, Jun 11 2020
E.g.f.: (1/81)*(24*exp(-8*x) - exp(-2*x) - 6*exp(4*x) + 64*exp(16*x)). - G. C. Greubel, Feb 18 2023

A368043 Triangle read by rows: T(n, k) = 2^(n + k).

Original entry on oeis.org

1, 2, 4, 4, 8, 16, 8, 16, 32, 64, 16, 32, 64, 128, 256, 32, 64, 128, 256, 512, 1024, 64, 128, 256, 512, 1024, 2048, 4096, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144
Offset: 0

Views

Author

Peter Luschny, Dec 09 2023

Keywords

Examples

			[0]  [  1]
[1]  [  2,   4]
[2]  [  4,   8,  16]
[3]  [  8,  16,  32,    64]
[4]  [ 16,  32,  64,   128,  256]
[5]  [ 32,  64,  128,  256,  512, 1024]
[6]  [ 64, 128,  256,  512, 1024, 2048,  4096]
[7]  [128, 256,  512, 1024, 2048, 4096,  8192, 16384]
[8]  [256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536]
		

Crossrefs

Cf. A000079 (T(n,0)), A004171 (T(n,n-1)), A000302 (T(n,n)), A171476 (row sums), A003683 (alternating row sums), A134353 (antidiagonal sums), A001018 (T(2n, n)), A094014 (T(n, n/2)), A002697.

Programs

  • Mathematica
    Array[2^Range[#,2#]&,10,0] (* Paolo Xausa, Dec 09 2023 *)
  • Python
    from functools import cache
    @cache
    def T_row(n: int) -> list[int]:
        if n == 0: return [1]
        row = T_row(n - 1) + [0]
        for k in range(n): row[k] *= 2
        row[n] = row[n - 1] * 2
        return row
    for n in range(11): print(T_row(n))

Formula

G.f.: 1/((1 - 2*x)*(1 - 4*x*y)). - Stefano Spezia, Dec 09 2023

A374098 a(n) = A112387(n)^2.

Original entry on oeis.org

1, 1, 4, 1, 16, 9, 64, 25, 256, 121, 1024, 441, 4096, 1849, 16384, 7225, 65536, 29241, 262144, 116281, 1048576, 466489, 4194304, 1863225, 16777216, 7458361, 67108864, 29822521, 268435456, 119311929, 1073741824, 477204025, 4294967296, 1908903481, 17179869184
Offset: 0

Views

Author

Paul Curtz, Jun 28 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 3, 0, 6, 0, -8}, {1, 1, 4, 1, 16, 9}, 35] (* Amiram Eldar, Jul 01 2024 *)

Formula

a(2*n) = A000302(n); a(2*n+1) = A139818(n+1).
(a(2*n) + a(2*n-1))^2 = A084175(n+1)^2 + 16*A003683(n)^2, for n >= 1. - Thomas Scheuerle, Jun 28 2024
G.f. ( 1+x+x^2-2*x^3-2*x^4 ) / ( (x-1)*(2*x+1)*(2*x-1)*(1+x)*(2*x^2+1) ). - R. J. Mathar, Aug 02 2024

A110953 Starting a priori with the fraction 1/1, the denominators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 9 times the bottom to get the new top.

Original entry on oeis.org

2, 12, 40, 176, 672, 2752, 10880, 43776, 174592, 699392, 2795520, 11186176, 44736512, 178962432, 715816960, 2863333376, 11453202432, 45813071872, 183251763200, 733008101376, 2932030308352, 11728125427712, 46912493322240, 187649990066176, 750599926710272
Offset: 1

Views

Author

Cino Hilliard, Sep 25 2005

Keywords

Comments

The limit of the sequence of fractions used to generate this sequence is 3.
Essentially the same as A003683. - R. J. Mathar, May 25 2009

References

  • Prime Obsession, John Derbyshire, Joseph Henry Press, April 2004, p. 16.

Programs

  • PARI
    g(n,k,typ) = /* typ = 1 numerator, 2 denominator, k = multiple of denom */ { local(a,b,x,tmp); a=1;b=1; for(x=1,n, tmp=b; b=a+b; a=k*tmp+a; if(typ==1,print1(a","),print1(b",")) ); print(); print(a/b+.) }
    
  • Python
    from itertools import islice
    def A110953_gen(): # generator of terms
        a, b = 1, 1
        while True:
            a, b = a+9*b, a+b
            yield b
    A110953_list = list(islice(A110953_gen(),30)) # Chai Wah Wu, Apr 15 2025

Formula

Given a(0)=1, b(0)=1 then for i>=1, a(i)/b(i) = (a(i-1)+ 9*b(i-1)) / (a(i-1) + b(i-1)).
From Chai Wah Wu, Apr 15 2025: (Start)
a(n) = 2*a(n-1) + 8*a(n-2) for n > 2.
G.f.: x*(-8*x - 2)/((2*x + 1)*(4*x - 1)). (End)

Extensions

a(21)-a(25) from Chai Wah Wu, Apr 15 2025

A292847 a(n) is the smallest odd prime of the form ((1 + sqrt(2*n))^k - (1 - sqrt(2*n))^k)/(2*sqrt(2*n)).

Original entry on oeis.org

5, 7, 101, 11, 13, 269, 17, 19, 509, 23, 709, 821, 29, 31, 46957, 55399, 37, 168846239, 41, 43, 9177868096974864412935432937651459122761, 47, 485329129, 2789, 53, 3229, 3461, 59, 61, 1563353111, 139237612541, 67, 5021, 71, 73, 484639, 6221, 79, 6869, 83, 7549
Offset: 1

Views

Author

XU Pingya, Sep 24 2017

Keywords

Examples

			For k = {1, 2, 3, 4, 5}, ((1 + sqrt(6))^k - (1 - sqrt(6))^k)/(2*sqrt(6)) = {1, 2, 9, 28, 101}. 101 is odd prime, so a(3) = 101.
		

Crossrefs

Programs

  • Mathematica
    g[n_, k_] := ((1 + Sqrt[n])^k - (1 - Sqrt[n])^k)/(2Sqrt[n]);
    Table[k = 3; While[! PrimeQ[Expand@g[2n, k]], k++]; Expand@g[2n, k], {n, 41}]
  • PARI
    g(n,k) = ([0,1;2*n-1,2]^k*[0;1])[1,1]
    a(n) = for(k=3,oo,if(ispseudoprime(g(n,k)),return(g(n,k)))) \\ Jason Yuen, Apr 12 2025

Formula

When 2*n + 3 = p is prime, a(n) = p.

A352692 a(n) + a(n+1) = 2^n for n >= 0 with a(0) = 4.

Original entry on oeis.org

4, -3, 5, -1, 9, 7, 25, 39, 89, 167, 345, 679, 1369, 2727, 5465, 10919, 21849, 43687, 87385, 174759, 349529, 699047, 1398105, 2796199, 5592409, 11184807, 22369625, 44739239, 89478489, 178956967, 357913945, 715827879, 1431655769, 2863311527, 5726623065, 11453246119, 22906492249
Offset: 0

Views

Author

Paul Curtz, Mar 29 2022

Keywords

Comments

Difference table D(n,k) = D(n-1,k+1) - D(n-1,k), D(0,k) = a(k):
4, -3, 5, -1, 9, 7, 25, ...
-7, 8, -6, 10, -2, 18, 14, 50, ...
15, -14, 16, -12, 20, -4, 36, 28, 100, ...
-29, 30, -28, 32, -24, 40, -8, 72, 56, 200, ...
59, -58, 60, -56, 64, -48, 80, -16, 144, 112, 400, ...
...
The diagonals are given by D(n,n+k) = a(k)*2^n.
D(n,1) = -(-1)^n* A340627(n).
a(n) - a(n) = 0, 0, 0, 0, 0, ... (trivially)
a(n+1) + a(n) = 1, 2, 4, 8, 16, ... = 2^n (by definition)
a(n+2) - a(n) = 1, 2, 4, 8, 16, ... = 2^n
a(n+3) + a(n) = 3, 6, 12, 24, 48, ... = 2^n*3
a(n+4) - a(n) = 5, 10, 20, 40, 80, ... = 2^n*5
a(n+5) + a(n) = 11, 22, 44, 88, 176, ... = 2^n*11
(...)
This table is given by T(r,n) = A001045(r)*2^n with r, n >= 0.
Sums of antidiagonals are A045883(n).
Main diagonal: A192382(n).
First upper diagonal: A054881(n+1).
First subdiagonal: A003683(n+1).
Second subdiagonal: A246036(n).
Now consider the array from c(n) = (-1)^n*a(n) with its difference table:
4, 3, 5, 1, 9, -7, 25, -39, ... = c(n)
-1, 2, -4, 8, -16, 32, -64, 128, ... = -A122803(n)
3, -6, 12, -24, 48, -96, 192, -384, ... =
-9, 18, -36, 72, -144, 288, -576, 1152, ...
27, -54, 108, -216, 432, -864, 1728, -3456, ...
...
The first subdiagonal is -A000400(n). The second is A169604(n).

Crossrefs

If a(0) = k then A001045 (k=0), A078008 (k=1), A140966 (k=2), A154879 (k=3), this sequence (k=4).
Essentially the same as A115335.

Programs

  • Maple
    a := proc(n) option remember; ifelse(n = 0, 4, 2^(n-1) - a(n-1)) end: # Peter Luschny, Mar 29 2022
    A352691 := proc(n)
        (11*(-1)^n + 2^n)/3
    end proc: # R. J. Mathar, Apr 26 2022
  • Mathematica
    LinearRecurrence[{1, 2}, {4, -3}, 40] (* Amiram Eldar, Mar 29 2022 *)
  • PARI
    a(n) = (11*(-1)^n + 2^n)/3; \\ Thomas Scheuerle, Mar 29 2022

Formula

abs(a(n)) = A115335(n-1) for n >= 1.
a(3*n) - (-1)^n*4 = A132805(n).
a(3*n+1) + (-1)^n*4 = A082311(n).
a(3*n+2) - (-1)^n*4 = A082365(n).
From Thomas Scheuerle, Mar 29 2022: (Start)
G.f.: (-4 + 7*x)/(-1 + x + 2*x^2).
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(m + 2*n-k) = a(m)*2^n.
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(1 + n-k) = -(-1)^n*A340627(n).
a(n) = (11*(-1)^n + 2^n)/3.
a(n + 2*m) = a(n) + A002450(m)*2^n.
a(2*n) = A192382(n+1) + (-1)^n*a(n).
a(n) = ( A045883(n) - Sum_{k=0..n-1}(-1)^k*a(k) )/n, for n > 0. (End)
a(n) = A001045(n) + 4*(-1)^n.
a(n+1) = 2*a(n) -11*(-1)^n.
a(n+2) = a(n) + 2^n.
a(n+4) = a(n) + A020714(n).
a(n+6) = a(n) + A175805(n).
a(2*n) = A163868(n).
a(2*n+1) = (2^(2*n+1) - 11)/3.

Extensions

Warning: The DATA is correct, but there may be errors in the COMMENTS, which should be rechecked. - Editors of OEIS, Apr 26 2022
Edited by M. F. Hasler, Apr 26 2022.

A370627 a(n) = 2^(n - 1)*((-1)^(n + 1) + 7*2^n)/3 = 2^(n - 1)*A062092(n).

Original entry on oeis.org

1, 5, 18, 76, 296, 1200, 4768, 19136, 76416, 305920, 1223168, 4893696, 19572736, 78295040, 313171968, 1252704256, 5010784256, 20043202560, 80172679168, 320690978816, 1282763390976, 5131054612480, 20524216352768, 82096869605376, 328387470032896, 1313549896908800, 5254199554080768
Offset: 0

Views

Author

Paul Curtz, Jul 03 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, 8}, {1, 5}, 27] (* Amiram Eldar, Jul 03 2024 *)
  • PARI
    a(n) = 2^(n-1)*((-1)^(n+1) + 7*2^n)/3 \\ Thomas Scheuerle, Jul 03 2024

Formula

Binomial transform of A133125.
G.f.: (1 + 3*x)/(1 - 2*x - 8*x^2).
E.g.f.: (1/3)*exp(x)*(3*exp(3*x) + sinh(3*x)).
a(n) = 2*a(n-1) + 8*a(n-2), for n > 1.
a(n) = 4*a(n-1) + (-2)^n, for n > 0.
a(n) = (a(n+2) - 2*a(n+1))/8.
From Thomas Scheuerle, Jul 03 2024: (Start)
a(n) = 2^(n - 1)*((-1)^(n + 1) + 7*2^n)/3.
a(n) = A003683(n) + 4^n.
a(n) = A255470(2^n - 1) - A255470(2^(n-1) - 1) = A255471(n) - A255471(n-1), for n > 0. (End)
Binomial transform: A108982.
Previous Showing 21-27 of 27 results.