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

A246695 Row sums of the triangular array A246694.

Original entry on oeis.org

1, 3, 9, 18, 35, 57, 91, 132, 189, 255, 341, 438, 559, 693, 855, 1032, 1241, 1467, 1729, 2010, 2331, 2673, 3059, 3468, 3925, 4407, 4941, 5502, 6119, 6765, 7471, 8208, 9009, 9843, 10745, 11682, 12691, 13737, 14859, 16020, 17261, 18543, 19909, 21318, 22815
Offset: 0

Views

Author

Clark Kimberling, Sep 01 2014

Keywords

Comments

Also partial sums of A257083. - Reinhard Zumkeller, Apr 17 2015

Examples

			First 5 rows of A246694 preceded by sums
sum = 1: ...... 1
sum = 3: ...... 1 ... 2
sum = 9: ...... 3 ... 2 ... 4
sum = 18: ..... 3 ... 5 ... 4 ... 6
sum = 35: ..... 7 ... 5 ... 8 ... 6 ... 9
		

Crossrefs

Programs

  • Haskell
    a246695 n = a246695_list !! n
    a246695_list = scanl1 (+) a257083_list
    -- Reinhard Zumkeller, Apr 17 2015
  • Mathematica
    z = 25; t[0, 0] = 1; t[1, 0] = 1; t[1, 1] = 2;
    t[n_, 0] := If[OddQ[n], t[n - 1, n - 2] + 1, t[n - 1, n - 1] + 1];
    t[n_, 1] := If[OddQ[n], t[n - 1, n - 1] + 1, t[n - 1, n - 2] + 1];
    t[n_, k_] := t[n, k - 2] + 1; A246695 = Table[Sum[t[n, k], {k, 0, n}], {n, 0, z}]

Formula

Conjectured linear recurrence: a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6), with a(0) = 1, a(1) = 3, a(2) = 9, a(3) = 18, a(4) = 35, a(5) = 57, a(6) = 91.
Conjectured g.f.: (1 + x + 2*x^2 + x^3 + x^4)/((x - 1)^4*(x + 1)^2).
Conjecture: a(n) = (1/8)*(n + 1)*((-1)^n + 2*n^2 + 4*n + 7). - Eric Simon Jacob, Jul 19 2023 [This conjecture is correct; compare A377802, note offset 1. - Werner Schulte, Nov 22 2024]

Extensions

Corrected and edited by M. F. Hasler, Nov 17 2014

A271713 Numbers n such that 3*n - 5 is a square.

Original entry on oeis.org

2, 3, 7, 10, 18, 23, 35, 42, 58, 67, 87, 98, 122, 135, 163, 178, 210, 227, 263, 282, 322, 343, 387, 410, 458, 483, 535, 562, 618, 647, 707, 738, 802, 835, 903, 938, 1010, 1047, 1123, 1162, 1242, 1283, 1367, 1410, 1498, 1543, 1635, 1682, 1778, 1827, 1927, 1978, 2082, 2135, 2243, 2298
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 12 2016

Keywords

Comments

Quasipolynomial of order 2 and degree 2. - Charles R Greathouse IV, Apr 12 2016
From Ray Chandler, Apr 13 2016: (Start)
Square roots of resulting squares gives A001651.
Sequence is the union of A141631 and A271740. (End)

Examples

			a(3) = 7 because 3*7 - 5 = 16 = 4^2.
		

Crossrefs

Cf. numbers n such that 3*n + k is a square: A120328 (k=-6), this sequence (k=-5), A056107 (k=-3), A257083 (k=-2), A033428 (k=0), A001082 (k=1), A080663 (k=3), A271675 (k=4), A100536 (k=6).

Programs

Formula

G.f.: x*(2 + x + x^3 + 2*x^4)/((1 - x)^3*(1 + x)^2). - Ilya Gutkovskiy, Apr 12 2016
a(n) = (3/2)*n^2 + O(n). - Charles R Greathouse IV, Apr 12 2016
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>5. - Wesley Ivan Hurt, Apr 13 2016

A257088 a(2*n) = 4*n if n>0, a(2*n + 1) = 2*n + 1, a(0) = 1.

Original entry on oeis.org

1, 1, 4, 3, 8, 5, 12, 7, 16, 9, 20, 11, 24, 13, 28, 15, 32, 17, 36, 19, 40, 21, 44, 23, 48, 25, 52, 27, 56, 29, 60, 31, 64, 33, 68, 35, 72, 37, 76, 39, 80, 41, 84, 43, 88, 45, 92, 47, 96, 49, 100, 51, 104, 53, 108, 55, 112, 57, 116, 59, 120, 61, 124, 63, 128
Offset: 0

Views

Author

Michael Somos, Apr 16 2015

Keywords

Examples

			G.f. = 1 + x + 4*x^2 + 3*x^3 + 8*x^4 + 5*x^5 + 12*x^6 + 7*x^7 + 16*x^8 + ...
		

Crossrefs

CF. A257083 (partial sums), A246695.

Programs

  • Haskell
    import Data.List (transpose)
    a257088 n = a257088_list !! n
    a257088_list = concat $ transpose [a008574_list, a005408_list]
    -- Reinhard Zumkeller, Apr 17 2015
  • Mathematica
    a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], n, True, 2 n];
    a[ n_] := SeriesCoefficient[ (1 + x + 2*x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4), {x, 0, n}];
  • PARI
    {a(n) = if( n<1, n==0, n%2, n, 2*n)};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 + x + 2*x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4) + x * O(x^n), n))};
    

Formula

Euler transform of length 4 sequence [ 1, 3, -1, -1].
a(n) is multiplicative with a(2^e) = 2^(e+1) if e>0, otherwise a(p^e) = p^e.
G.f.: (1 + x + 2*x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4).
G.f.: (1 - x^3) * (1 - x^4) / ((1 - x) * (1 - x^2)^3).
MOBIUS transform of A215947 is [1, 4, 3, 8, 5, ...].
a(n) = n * A040001(n) if n>0.
a(n) + a(n-1) = A007310(n) if n>0.
a(n) = A001082(n+1) - A001082(n) if n>0.
Binomial transform with a(0)=0 is A128543 if n>0.
a(2*n) = A008574(n). a(2*n + 1) = A005408(n).
a(n) = A022998(n) if n>0. - R. J. Mathar, Apr 19 2015
From Amiram Eldar, Jan 28 2025: (Start)
Dirichlet g.f.: (1+2^(1-s)) * zeta(s-1).
Sum_{k=1..n} a(k) ~ (3/4) * n^2. (End)
a(n) = gcd(n^n, 2*n). - Mia Boudreau, Jun 27 2025

A271675 Numbers m such that 3*m + 4 is a square.

Original entry on oeis.org

0, 4, 7, 15, 20, 32, 39, 55, 64, 84, 95, 119, 132, 160, 175, 207, 224, 260, 279, 319, 340, 384, 407, 455, 480, 532, 559, 615, 644, 704, 735, 799, 832, 900, 935, 1007, 1044, 1120, 1159, 1239, 1280, 1364, 1407, 1495, 1540, 1632, 1679, 1775, 1824, 1924, 1975, 2079, 2132, 2240, 2295, 2407
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 12 2016

Keywords

Comments

7 is the unique prime in this sequence. If m is in this sequence, then 3*m + 4 = k^2 for k is nonzero integer, that is, m = (k^2 - 4)/3 = (k-2)*(k+2)/3. So m can be only prime if one of divisors is prime and another one is 1. Otherwise there should be more than 1 prime divisors, that is n must be composite. - Altug Alkan, Apr 12 2016
From Ray Chandler, Apr 12 2016: (Start)
Square roots of resulting squares gives A001651 (with a different starting point).
Sequence is the union of (positive terms) in A140676 and A270710. (End)
The sequence terms are the exponents in the expansion of Sum_{n >= 0} q^n*(1 - q)*(1 - q^3)*...*(1 - q^(2*n+1)) = 1 - q^4 - q^7 + q^15 + q^20 - q^32 - q^50 + + - - .... - Peter Bala, Dec 19 2024

Examples

			a(4) = 32 because 3*32 + 4 = 100 = 10*10.
		

Crossrefs

Cf. numbers n such that 3*n + k is a square: A120328 (k=-6), A271713 (k=-5), A056107 (k=-3), A257083 (k=-2), A033428 (k=0), A001082 (k=1), A080663 (k=3), this sequence (k=4), A100536 (k=6).

Programs

  • Magma
    [n: n in [0..4000] | IsSquare(3*n+4)];
    
  • Mathematica
    Select[Range[0,2500], IntegerQ@ Sqrt[3 # + 4] &] (* Michael De Vlieger, Apr 12 2016 *)
    LinearRecurrence[{1,2,-2,-1,1},{0,4,7,15,20},60] (* Harvey P. Dale, Dec 09 2016 *)
  • Python
    from gmpy2 import is_square
    for n in range(0,10**5):
        if(is_square(3*n+4)):print(n)
    # Soumil Mandal, Apr 12 2016

Formula

O.g.f.: x^2*(4 + 3*x - x^3)/((1 + x)^2*(1 - x)^3).
E.g.f.: 1 + (1 - 2*x)*exp(-x)/8 - 3*(3 - 4*x - 2*x^2)*exp(x)/8.
a(n) = A001082(n+1) - 1 = (6*n*(n+1) + (2*n + 1)*(-1)^n - 1)/8 - 1. Therefore: a(2*k+1) = k*(3*k+4), a(2*k) = (k+1)*(3*k-1).
Sum_{n>=2} 1/a(n) = 19/16 - Pi/(4*sqrt(3)). - Amiram Eldar, Jul 26 2024

Extensions

Edited and extended by Bruno Berselli, Apr 12 2016

A271723 Numbers k such that 3*k - 8 is a square.

Original entry on oeis.org

3, 4, 8, 11, 19, 24, 36, 43, 59, 68, 88, 99, 123, 136, 164, 179, 211, 228, 264, 283, 323, 344, 388, 411, 459, 484, 536, 563, 619, 648, 708, 739, 803, 836, 904, 939, 1011, 1048, 1124, 1163, 1243, 1284, 1368, 1411, 1499, 1544, 1636, 1683, 1779, 1828, 1928, 1979, 2083, 2136, 2244, 2299
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 13 2016

Keywords

Comments

Square roots of resulting squares gives A001651. - Ray Chandler, Apr 14 2016

Examples

			a(1) = 3 because 3*3 - 8 = 1^2.
		

Crossrefs

Cf. A001651.
Cf. numbers n such that 3*n + k is a square: this sequence (k=-8), A120328 (k=-6), A271713 (k=-5), A056107 (k=-3), A257083 (k=-2), A033428 (k=0), A001082 (k=1), A080663 (k=3), A271675 (k=4), A100536 (k=6), A271741 (k=7), A067725 (k=9).

Programs

  • Magma
    [n: n in [1..2400] | IsSquare(3*n-8)];
    
  • Maple
    seq(seq(((3*m+k)^2+8)/3, k=1..2),m=0..50); # Robert Israel, Dec 05 2016
  • Mathematica
    Select[Range@ 2400, IntegerQ@ Sqrt[3 # - 8] &] (* Bruno Berselli, Apr 14 2016 *)
    LinearRecurrence[{1,2,-2,-1,1},{3,4,8,11,19},60] (* Harvey P. Dale, Oct 02 2020 *)
  • Python
    from gmpy2 import is_square
    [n for n in range(3000) if is_square(3*n-8)] # Bruno Berselli, Dec 05 2016
    
  • Python
    [(6*(n-1)*n-(2*n-1)*(-1)**n+23)/8 for n in range(1, 60)] # Bruno Berselli, Dec 05 2016

Formula

From Ilya Gutkovskiy, Apr 13 2016: (Start)
G.f.: x*(3 + x - 2*x^2 + x^3 + 3*x^4)/((1 - x)^3*(1 + x)^2).
a(n) = (6*(n - 1)*n - (2*n - 1)*(-1)^n + 23)/8. (End)
Showing 1-5 of 5 results.