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 51-60 of 63 results. Next

A361670 Squarefree part of the n-th triangular number.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 7, 1, 5, 55, 66, 78, 91, 105, 30, 34, 17, 19, 190, 210, 231, 253, 69, 3, 13, 39, 42, 406, 435, 465, 31, 33, 561, 595, 70, 74, 703, 741, 195, 205, 861, 903, 946, 110, 115, 1081, 282, 6, 1, 51, 1326, 1378, 159, 165, 385, 399, 1653, 1711, 1770, 1830, 1891, 217, 14, 130, 2145, 2211, 2278
Offset: 1

Views

Author

R. J. Mathar, Mar 20 2023

Keywords

Comments

a(n) / A083481(n) is either 2 or 1/2 depending on A136480(n) being even or odd, which is indicated by A039963(n).
a(n) = 1 for n>0 in A001108. - Michel Marcus, Mar 22 2023

Crossrefs

Cf. A000217, A007913, A083481 (of oblong), A361671 (of tetrahedral).

Programs

  • Maple
    a:= n-> mul(i[1]^irem(i[2], 2), i=ifactors(n*(n+1)/2)[2]):
    seq(a(n), n=1..70);  # Alois P. Heinz, Mar 20 2023
  • PARI
    a(n) = core(n*(n+1)/2); \\ Michel Marcus, Mar 22 2023
  • Python
    from sympy.ntheory.factor_ import core
    def A361670(n): return core(n*(n+1)>>1) # Chai Wah Wu, Mar 20 2023
    

Formula

a(n) = A007913(A000217(n)).

A082649 Triangle of coefficients in expansion of sinh^2(n*x) in powers of sinh(x).

Original entry on oeis.org

1, 4, 4, 16, 24, 9, 64, 128, 80, 16, 256, 640, 560, 200, 25, 1024, 3072, 3456, 1792, 420, 36, 4096, 14336, 19712, 13440, 4704, 784, 49, 16384, 65536, 106496, 90112, 42240, 10752, 1344, 64, 65536, 294912, 552960, 559104, 329472, 114048, 22176, 2160, 81, 262144, 1310720, 2785280, 3276800, 2329600
Offset: 1

Views

Author

Gary W. Adamson, May 16 2003, suggested by Herb Conn

Keywords

Comments

Using arcsin(x) = Pi/2 - arccos(x), valid for -1 < = x <= 1, we find sin^2(k*arcsin(x)) = sin^2(k*arccos(x)) for k odd, while sin^2(k*arcsin(x)) = 1 - sin^2(k*arccos(x)) for k even. Thus the expansion of sin^2(n*x) in powers of cos(x) will produce a similar table of coefficients. See the example section below. - Peter Bala, Feb 02 2017

Examples

			sinh^2 x = sinh^2 x
sinh^2 2x = 4 sinh^4 x + 4 sinh^2 x
sinh^2 3x = 16 sinh^6 x + 24 sinh^4 x + 9 sinh^2 x
sinh^2 4x = 64 sinh^8 x + 128 sinh^6 x + 80 sinh^4 x + 16 sinh^2 x
sinh^2 5x = 256 sinh^10 x + 640 sinh^8 x + 560 sinh^6 x + 200 sinh^4 x + 25 sinh^2 x
From _Peter Bala_, Feb 02 2016: (Start)
sin^2(x) = 1 - cos^2(x);
sin^2(2*x) = -4*cos^4(x) + 4*cos^2(x);
sin^2(3*x) = 1 - (16*cos^6(x) - 24*cos^4(x) + 9*cos^2(x));
sin^2(4*x) = -64*cos^8(x) + 128*cos^6(x) - 80*cos^4(x) + 16*cos^2(x);
sin^2(5*x) = 1 - (256*cos^10(x) - 640*cos^8(x) + 560*cos^6(x) - 200*cos^4(x) + 25*cos^2(x)). (End)
		

Crossrefs

A001108 gives row sums.
Closely related to A123583 and A123588.

Programs

  • Maple
    g:= (1+x*y)/((1-x*y)*(1-(4+2*y)*x+x^2*y^2)):
    S:= series(g,x,15):
    seq(seq(coeff(coeff(S,x,n),y,k),k=0..n),n=0..14); # Robert Israel, Dec 20 2017
  • Mathematica
    Table[Reverse[CoefficientList[1/x TrigExpand[Sinh[n ArcSinh[Sqrt[x]]]^2], x]], {n, 7}] // Flatten (* Eric W. Weisstein, Apr 05 2017 *)
    Abs[Table[CoefficientList[x^n Piecewise[{{1 - ChebyshevT[n, 1/Sqrt[x]]^2, Mod[n, 2] == 0}, {ChebyshevT[n, 1/Sqrt[x]]^2, Mod[n, 2] == 1}}], x], {n, 10}]] // Flatten (* Eric W. Weisstein, Apr 05 2017 *)

Formula

Coefficients are: 4^(n-1), (2n)4^(n-2), (2n)(2n-3)4^(n-3)/2!, (2n)(2n-4)(2n-5)4^(n-4)/3!, (2n)(2n-5)(2n-6)(2n-7)4^(n-5)/4!, (2n)(2n-6)(2n-7)(2n-8)(2n-9)4^(n-6)/5!...
G.f. as triangle: (1+x*y)/((1-x*y)*(1-(4+2*y)*x+x^2*y^2)). - Robert Israel, Dec 20 2017

Extensions

More terms from Robert Israel, Dec 20 2017

A135203 For any integer n >= 1 the sequence gives the minimum power x for which n^x+(n-1)^x+(n-2)^x+...+1^x produces a perfect square.

Original entry on oeis.org

1, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Views

Author

Keywords

Comments

All 3's apart from 1's in positions given by A001108 and 2 for n=24.

Examples

			n=4 -> 4^3+3^3+2^3+1^3 = 64+27+8+1 = 100
n=5 -> 5^3+4^3+3^3+2^3+1^3 = 125+64+27+8+1 = 225
n=6 -> 6^3+5^3+4^3+3^3+2^3+1^3 = 216+125+64+27+8+1 = 441
		

Crossrefs

Cf. A001108.

Programs

  • Maple
    P:=proc(n) local a,i,k,j,ok,x; for i from 1 by 1 to n do x:=1; ok:=1; while ok=1 do a:=0; k:=i; while k>0 do a:=a+k^x; k:=k-1; od; if (trunc(sqrt(a)))^2=a then print(x); ok:=0; else x:=x+1; fi; od; od; end: P(100);
  • PARI
    A135203(n) = for(x=1,oo,if(issquare(sum(k=1,n,k^x)), return(x))); \\ Antti Karttunen, Sep 27 2018

Extensions

Offset and a typo in the definition corrected by Antti Karttunen, Sep 27 2018

A144844 a(n) = ((2 + sqrt(2))^n - (2 - sqrt(2))^n)^2/8.

Original entry on oeis.org

0, 1, 16, 196, 2304, 26896, 313600, 3655744, 42614784, 496754944, 5790601216, 67500196864, 786839961600, 9172078759936, 106917585289216, 1246322708463616, 14528202160472064, 169353135091941376, 1974124812461670400, 23012085209172803584
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Sep 22 2008

Keywords

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); [ Integers()!a: a in [ ((2+r2)^n-(2-r2)^n)^2/8: n in [0..19] ] ]; // Klaus Brockhaus, Oct 20 2008
    
  • Magma
    I:=[0,1,16]; [n le 3 select I[n] else 14*Self(n-1)-28*Self(n-2)+8*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Feb 05 2018
    
  • Mathematica
    Table[ Simplify[ ((2 + Sqrt@2)^n - (2 - Sqrt@2)^n)^2/8], {n, 0, 19}] (* Robert G. Wilson v, Sep 24 2008 *)
    CoefficientList[Series[x (1 + 2 x) / ((1 - 2 x) (1 - 12 x + 4 x^2)), {x, 0, 33}], x] (* Vincenzo Librandi, Feb 06 2018 *)
    LinearRecurrence[{14,-28,8},{0,1,16},20] (* Harvey P. Dale, Apr 12 2020 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(x*(1+2*x)/((1-2*x)*(1-12*x+4*x^2)) )) \\ G. C. Greubel, Sep 27 2018

Formula

From R. J. Mathar, Sep 24 2008: (Start)
G.f.: x*(1+2*x)/((1-2*x)*(1-12*x+4*x^2)).
a(n) = 2^(n-2)*(A001109(n+1) - 3*A001109(n) - 1) = 2^(n-1)*A001108(n). (End)
a(n) = 14*a(n-1) - 28*a(n-2) + 8*a(n-3) for n > 2; a(0) = 0, a(1) = 1; a(2) = 16. - Klaus Brockhaus, Jul 15 2009
a(n) = A007070(n-1)^2 = (((2+sqrt(2))^n - (2-sqrt(2))^n) / sqrt(8))^2. - Franklin T. Adams-Watters, Aug 06 2009
a(n) = 2^(n-3)*(Q(2*n) - 2), where Q(m) are the Pell-Lucas numbers (A002203). - G. C. Greubel, Sep 27 2018

A174541 Baron Münchhausen's Sequence.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
Offset: 1

Views

Author

Tanya Khovanova, Konstantin Knop, and Alexey Radul, Mar 21 2010

Keywords

Comments

Let n coins weighing 1, 2, ..., n grams be given. Suppose Baron Münchhausen knows which coin weighs how much, but his audience does not. Then a(n) is the minimum number of weighings the Baron must conduct on a balance scale, so as to unequivocally demonstrate the weight of at least one of the coins.
After a(1) = 0, a(n) is either 1 or 2 for all n.
a(n) = 1 for n triangular, n triangular-plus-one, T_n a square, and T_n a square-plus-one, where T_n is the n-th triangular number; a(n) = 2 for all other n > 1.

Examples

			a(7) = 1 because the weighing 1 + 2 + 3 < 7 conclusively demonstrates the weight of the seven-gram coin.
		

Crossrefs

Programs

  • Mathematica
    triangularQ[n_] := IntegerQ[ Sqrt[8n+1]]; a[1] = 0; a[n_ /; triangularQ[n] || triangularQ[n-1] || IntegerQ[ Sqrt[n*(n+1)/2]] || IntegerQ[ Sqrt[n*(n+1)/2 - 1]]] = 1; a[] = 2; Table[a[n], {n, 1, 105}] (* _Jean-François Alcover, Jul 30 2012, after comments *)
  • Scheme
    ;;; The following Scheme program generates terms of Baron
    ;;; Münchhausen's Sequence.
    (define (acceptable? n)
      (or (triangle? n)
          (= n 2)
          (triangle? (- n 1))
          (square? (triangle n))
          (square? (- (triangle n) 1))))
    (stream-map
     (lambda (n)
       (if (= n 1)
           0
           (if (acceptable? n)
               1
               2)))
     (the-integers))

A205185 Period 6: repeat [1, 8, 9, 8, 1, 0].

Original entry on oeis.org

1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8
Offset: 1

Views

Author

Ant King, Jan 24 2012

Keywords

Comments

The terms of this sequence are the units' digits of the indices of those nonzero triangular numbers that are also perfect squares (A001108).

Examples

			As the fourth nonzero triangular number that is also a perfect square is A000217(288), and 288 has units' digit A010879(288)=8, then a(4)=8.
		

Crossrefs

Programs

Formula

G.f.: x*(1+7x+x^2) / ((1-x)*(1+x)*(1-x+x^2)).
a(n) = a(n-6) for n>6.
a(n) = 9-a(n-3) for n>3.
a(n) = a(n-1) - a(n-3) + a(n-4) for n>4.
a(n) = 1/6*(27+(-1)^n*(5-32*cos(2*n*Pi/3))).

A212797 Number of spanning trees in C_2 X C_n.

Original entry on oeis.org

2, 32, 294, 2304, 16810, 117600, 799694, 5326848, 34928082, 226195360, 1450199542, 9220780800, 58221203066, 365440965344, 2282085037470, 14187697422336, 87860208024994, 542209573735200, 3335797263902918, 20465738163774720, 125247216613782858
Offset: 1

Views

Author

N. J. A. Sloane, May 27 2012

Keywords

Comments

From Harry Richman and Alois P. Heinz, Jan 31 2023: (Start)
Row 2 of array in A212796.
a(n) is a divisibility sequence, i.e., if m divides n then a(m) divides a(n), since A001108 is one. (End)

Crossrefs

Programs

  • PARI
    default(realprecision, 120);
    {a(n) = round(n*2^(2*n-1)*prod(k=1, n-1, 1+sin(k*Pi/n)^2))} \\ Seiichi Manyama, Jan 13 2021
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec(2*x*deriv(x*(1+x)/((1-x)*(1-6*x+x^2)))) \\ Seiichi Manyama, Jan 13 2021

Formula

G.f.: 2*x*(1+2*x-14*x^2+2*x^3+x^4)/((x-1)^2*(1-6*x+x^2)^2) . - R. J. Mathar, Apr 16 2018
Conjecture: a(n) = 16*A001109(n+1) +3*A001109(n) -16*(A144133(n)-6*A144133(n-1)) -n = 3*A144133(n-1) -2*A144133(n-2) +3*A144133(n-3) -n. - R. J. Mathar, Apr 16 2018
From Seiichi Manyama, Jan 13 2021: (Start)
a(n) = 2 * n * A001108(n).
a(n) = 14*a(n-1) - 63*a(n-2) + 100*a(n-3) - 63*a(n-4) + 14*a(n-5) - a(n-6) for n > 6. (End)

Extensions

More terms from Seiichi Manyama, Jan 13 2021

A214728 Least k such that n + (n+1) + ... + (n+k-1) is a square.

Original entry on oeis.org

1, 1, 3, 5, 1, 9, 11, 13, 15, 1, 19, 3, 2, 25, 27, 29, 1, 33, 5, 37, 39, 8, 43, 45, 2, 1, 3, 53, 55, 57, 59, 61, 9, 65, 67, 6, 1, 8, 75, 11, 2, 81, 83, 5, 87, 9, 13, 3, 95, 1, 99, 101, 18, 15, 107, 109, 111, 8, 10, 117, 2, 121, 24, 125, 1, 129, 131, 19, 135, 25, 139, 6
Offset: 0

Views

Author

Alex Ratushnyak, Jul 27 2012

Keywords

Comments

a(n) is the number of consecutive integers starting from n needed to sum up to a perfect square.
Indices of 1's: A000290.
Indices of 2's: A046092(k), k!=A001108(m).
If a(n) is bigger than previous terms then a(n)=n*2-1, for example a(5)=9 is bigger than previous maximum, and a(5)=5*2-1.
Terms of A108269 never appear in a(n).

Examples

			a(2): 2+3+4 = 9, three summands, so a(2)=3.
a(3): 3+4+5+6+7 = 25, five summands, so a(3)=5.
a(12): 12+13 = 25, so a(12)=2.
		

Crossrefs

Programs

  • C
    int main() {  // OK with GCC
      unsigned long long i, n, sum, sr;
      for (n=0; n<333; ++n) {
        for (sum=0, i=n; i==n || sr*sr!=sum; ++i)  sr=sqrt(sum+=i);
        printf("%llu, ", i-n);
      }
    }
  • Mathematica
    lks[n_]:=Module[{k=1},While[!IntegerQ[Sqrt[Total[Range[n,n+k-1]]]], k++];k]; lks/@Range[0,80] (* Harvey P. Dale, Mar 14 2016 *)

A308085 a(n) is the least positive number k such that n*(n-1)/2 + k*(k-1)/2 is a square.

Original entry on oeis.org

1, 1, 2, 3, 4, 2, 6, 7, 1, 9, 10, 6, 3, 13, 14, 2, 16, 17, 18, 4, 6, 21, 3, 23, 24, 9, 5, 27, 13, 4, 30, 31, 2, 6, 34, 35, 5, 37, 38, 16, 7, 30, 23, 6, 44, 20, 46, 8, 16, 1, 7, 51, 12, 53, 9, 42, 23, 8, 58, 59, 60, 10, 27, 63, 9, 65, 20, 67, 11, 69, 6, 10, 72, 3, 44, 12, 21, 77, 11, 34, 80, 46
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jun 05 2019

Keywords

Comments

a(n) <= n-1 if n > 1, because (n-1)*(n-2)/2 + n*(n-1)/2 = (n-1)^2.
a(7*k+2) <= k and a(7*k+6) <= k+2, because (7*k+2)*(7*k+1)/2 + k*(k-1)/2 = (5*k+1)^2 and (7*k+6)*(7*k+5)/2 + (k+2)*(k+1)/2 = (5*k+4)^2.
From Bernard Schott, Jun 27 2019: (Start)
a(m) = 1 iff the triangular number t(m-1) = (m-1)*m/2 is a square, so iff m-1 is in A001108, or m in A055997.
a(m) = 2 iff the triangular number t(m-1) + 1 is a square, so iff m-1 is in A006451. (End)

Examples

			a(5) = 4 because 4*3/2 + 5*4/2 = 4^2 and none of 1*0/2 + 5*4/2, 2*1/2 + 5*4/2, 3*2/2 + 5*4/2 are squares.
		

Crossrefs

Cf. A000217, A055997 (a(n)=1).

Programs

  • Maple
    f:= proc(n) local k;
      for k from 1 do
        if issqr((k*(k-1)+n*(n-1))/2) then return k fi
      od
    end proc:
    map(f, [$1..100]);
  • PARI
    a(n) = {my(k=1); while (!issquare(n*(n-1)/2 + k*(k-1)/2), k++); k;} \\ Michel Marcus, Jun 27 2019

A334009 Triangle read by rows: T(n, k) = binomial(n + k - 1, 2*k - 1) * 4^(k - 1) * n/k, 1 <= k <= n.

Original entry on oeis.org

1, 4, 4, 9, 24, 16, 16, 80, 128, 64, 25, 200, 560, 640, 256, 36, 420, 1792, 3456, 3072, 1024, 49, 784, 4704, 13440, 19712, 14336, 4096, 64, 1344, 10752, 42240, 90112, 106496, 65536, 16384, 81, 2160, 22176, 114048, 329472, 559104, 552960, 294912, 65536, 100
Offset: 1

Views

Author

Michael Somos, Apr 12 2020

Keywords

Comments

Let P(n, x) := Sum_{k=1..n} T(n, k)*x^k. Then P(n, P(m, x)) = P(n*m, x) for all n and m in Z.
The r=4 case of the Logistic Map is 4*x*(1 - x) = -P(1, -x). The r=2 case leads to A193862.

Examples

			First four rows:
.1
.4...4
.9..24..16
16..80.128..64
		

Crossrefs

Programs

  • Mathematica
    T[ n_, k_] := If[k == 0, 0, Binomial[n + k - 1, 2 k - 1] 4^(k - 1) n / k];
  • PARI
    {T(n, k) = if(k == 0, 0, binomial(n + k - 1, 2*k - 1) * 4^(k - 1) * n/k)};

Formula

P(n, x) = sinh(n * arcsinh(sqrt(x)))^2 = (hypergeom([-n, n], [1/2], -x) - 1)/2 are the row polynomials.
G.f.: Sum_{n, m} T(n, k) * x^k * y^n = x * y * (1 + y) / ((1 - y) * (1 - (2 + 4*x)*y + y^2)).
Row sums are A001108.
T(n, k) = (-1)^n * (-4)^(k-1) * A039598(-k - 1, n - 1) for all n in Z if k<0.
T(n, k) = -(-1)^(n+k) * A123588(n,k) if 1 <= k <= n.
Previous Showing 51-60 of 63 results. Next